Commit 2abbb6c6 authored by Thibault Ehrhart's avatar Thibault Ehrhart

NewsCollector: use new model and filename format

parent 069de580
......@@ -39,7 +39,7 @@ public class AgenceFrancePresse {
Files.list(monthDir).filter(file -> file.toFile().isDirectory()).forEach(dayDir -> {
final Path turtleFile = Paths.get(DUMP_PATH + FileSystems.getDefault().getSeparator() +
langDir.getFileName() + FileSystems.getDefault().getSeparator() + yearDir.getFileName() + "_" +
monthDir.getFileName() + "_" + dayDir.getFileName() + ".ttl");
monthDir.getFileName() + "_" + dayDir.getFileName() + ".news.ttl");
if (Files.exists(turtleFile)) {
// TODO: check if --reset flag is set
AgenceFrancePresse.LOGGER.info("Skipping parsing of " + dayDir.toString());
......
......@@ -225,7 +225,7 @@ public class NewsArticle {
model.add(ResourceFactory.createResource(NewsArticle.BASE_URI +
UUIDGenerator.generateUUID(this.id)), RDF.type,
ResourceFactory.createResource("http://iptc.org/std/rNews/2011-10-07#NewsItem"));
ResourceFactory.createResource("http://iptc.org/std/rNews/2011-10-07#Article"));
// Identifier
model.add(ResourceFactory.createResource(NewsArticle.BASE_URI +
......@@ -282,7 +282,7 @@ public class NewsArticle {
for (final Map.Entry<String, String> entry : this.descriptions.entrySet()) {
model.add(ResourceFactory.createResource(NewsArticle.BASE_URI +
UUIDGenerator.generateUUID(this.id)),
ResourceFactory.createProperty("http://iptc.org/std/rNews/2011-10-07#description"),
ResourceFactory.createProperty("http://iptc.org/std/rNews/2011-10-07#articleBody"),
ResourceFactory.createLangLiteral(entry.getValue(), entry.getKey()));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment