From e1861eb1d9463ec2bd2a0d0eb4dc010dab63f034 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Tue, 18 May 2010 21:28:31 +0000 Subject: [PATCH] Let the RdfTripleImporter handle .rdf and application/rdf+xml files. git-svn-id: http://google-refine.googlecode.com/svn/trunk@819 7d457c2a-affb-35e4-300a-418c747d4874 --- .../commands/project/CreateProjectCommand.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/commands/project/CreateProjectCommand.java b/src/main/java/com/metaweb/gridworks/commands/project/CreateProjectCommand.java index ea48c490f..5325cb0c3 100644 --- a/src/main/java/com/metaweb/gridworks/commands/project/CreateProjectCommand.java +++ b/src/main/java/com/metaweb/gridworks/commands/project/CreateProjectCommand.java @@ -48,6 +48,7 @@ import com.metaweb.gridworks.commands.Command; import com.metaweb.gridworks.importers.ExcelImporter; import com.metaweb.gridworks.importers.Importer; import com.metaweb.gridworks.importers.MarcImporter; +import com.metaweb.gridworks.importers.RdfTripleImporter; import com.metaweb.gridworks.importers.TsvCsvImporter; import com.metaweb.gridworks.importers.XmlImporter; import com.metaweb.gridworks.model.Project; @@ -457,9 +458,10 @@ public class CreateProjectCommand extends Command { } else if("application/xml".equals(contentType) || "text/xml".equals(contentType) || "application/rss+xml".equals(contentType) || - "application/atom+xml".equals(contentType) || - "application/rdf+xml".equals(contentType)) { + "application/atom+xml".equals(contentType)) { return new XmlImporter(); + } else if("application/rdf+xml".equals(contentType)) { + return new RdfTripleImporter(); } else if ("application/marc".equals(contentType)) { return new MarcImporter(); } @@ -471,11 +473,13 @@ public class CreateProjectCommand extends Command { return new ExcelImporter(true); } else if ( fileName.endsWith(".xml") || - fileName.endsWith(".rdf") || fileName.endsWith(".atom") || fileName.endsWith(".rss") ) { return new XmlImporter(); + } else if ( + fileName.endsWith(".rdf")) { + return new RdfTripleImporter(); } else if ( fileName.endsWith(".mrc") || fileName.endsWith(".marc") ||