import eu.etaxonomy.cdm.database.ICdmDataSource;\r
import eu.etaxonomy.cdm.io.common.IImportConfigurator;\r
import eu.etaxonomy.cdm.io.common.ImportConfiguratorBase;\r
-import eu.etaxonomy.cdm.io.common.ImportStateBase;\r
-import eu.etaxonomy.cdm.model.reference.Database;\r
+import eu.etaxonomy.cdm.model.reference.IDatabase;\r
import eu.etaxonomy.cdm.model.reference.ReferenceBase;\r
+import eu.etaxonomy.cdm.model.reference.ReferenceFactory;\r
\r
/**\r
* @author a.mueller\r
public class TcsRdfImportConfigurator extends ImportConfiguratorBase<TcsRdfImportState> implements IImportConfigurator {\r
private static final Logger logger = Logger.getLogger(TcsRdfImportConfigurator.class);\r
\r
+ //if false references in this rdf file are not published in the bibliography list\r
+ private boolean isPublishReferences = true;\r
+ \r
//rdfNamespace\r
- Namespace rdfNamespace;\r
+ private Namespace rdfNamespace;\r
//TaxonConcept namespace\r
- Namespace tcNamespace;\r
+ private Namespace tcNamespace;\r
//TaxonName namespace\r
- Namespace tnNamespace;\r
+ private Namespace tnNamespace;\r
//TDWG common namespace\r
- Namespace commonNamespace;\r
+ private Namespace commonNamespace;\r
//TDWG geoNamespace\r
- Namespace geoNamespace;\r
+ private Namespace geoNamespace;\r
//publicationNamespace\r
- Namespace publicationNamespace;\r
+ private Namespace publicationNamespace;\r
+ //palmNamespace\r
+ private Namespace palmNamespace;\r
\r
//TODO \r
protected static Namespace nsTcom = Namespace.getNamespace("http://rs.tdwg.org/ontology/voc/Common#");\r
geoNamespace = root.getNamespace(prefix);\r
prefix = "tpub";\r
publicationNamespace = root.getNamespace(prefix);\r
+ \r
+ prefix = "tpalm";\r
+ palmNamespace = root.getNamespace(prefix);\r
+ \r
if (rdfNamespace == null || tcNamespace == null || tnNamespace == null ||\r
- commonNamespace == null || geoNamespace == null || publicationNamespace == null){\r
+ commonNamespace == null || geoNamespace == null || publicationNamespace == null \r
+ || palmNamespace == null){\r
logger.warn("At least one Namespace is NULL");\r
}\r
return true;\r
//TODO\r
if (this.sourceReference == null){\r
logger.warn("getSource Reference not yet fully implemented");\r
- sourceReference = Database.NewInstance();\r
+ ReferenceFactory refFactory = ReferenceFactory.newInstance();\r
+ sourceReference = refFactory.newDatabase();\r
sourceReference.setTitleCache("XXX");\r
}\r
return sourceReference;\r
public void setPublicationNamespace(Namespace publicationNamespace) {\r
this.publicationNamespace = publicationNamespace;\r
}\r
+ /**\r
+ * @return the palmNamespace\r
+ */\r
+ public Namespace getPalmNamespace() {\r
+ return palmNamespace;\r
+ }\r
+\r
+ /**\r
+ * @param palmNamespace the palmNamespace to set\r
+ */\r
+ public void setPalmNamespace(Namespace palmNamespace) {\r
+ this.palmNamespace = palmNamespace;\r
+ }\r
+\r
+ /**\r
+ * if false references in this rdf file are not published in the bibliography list\r
+ * @return the isPublishReferences\r
+ */\r
+ public boolean isPublishReferences() {\r
+ return isPublishReferences;\r
+ }\r
+\r
+ /**\r
+ * @param isPublishReferences the isPublishReferences to set\r
+ */\r
+ public void setPublishReferences(boolean isPublishReferences) {\r
+ this.isPublishReferences = isPublishReferences;\r
+ }\r
\r
/* (non-Javadoc)\r
* @see eu.etaxonomy.cdm.io.common.IImportConfigurator#getNewState()\r