import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.Image;
import be.nikiroo.utils.ImageUtils;
-import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
import be.nikiroo.utils.Progress;
/**
return false;
}
- @Override
- public String getSourceName() {
- return "text";
- }
-
@Override
protected Document loadDocument(URL source) throws IOException {
try {
sourceFile = new File(source.toURI());
- in = new MarkableFileInputStream(new FileInputStream(sourceFile));
+ in = new MarkableFileInputStream(sourceFile);
} catch (URISyntaxException e) {
throw new IOException("Cannot load the text document: " + source);
}
meta.setAuthor(getAuthor());
meta.setDate(getDate());
meta.setTags(new ArrayList<String>());
- meta.setSource(getSourceName());
+ meta.setSource(getType().getSourceName());
meta.setUrl(getSourceFile().toURI().toURL().toString());
meta.setPublisher("");
meta.setUuid(getSourceFile().toString());