import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
/**
* @author pplitzner
- * @date 16.06.2015
- *
+ * @since 16.06.2015
*/
public class AbcdParseUtility {
private static final Logger logger = Logger.getLogger(AbcdParseUtility.class);
-
public static URI parseFirstUri(NodeList nodeList, SpecimenImportReport report){
URI uri = null;
String textContent = parseFirstTextContent(nodeList);
return date;
}
- public static Reference parseFirstReference(NodeList referenceNodeList, ICdmApplicationConfiguration cdmAppController){
+ public static Reference parseFirstReference(NodeList referenceNodeList, ICdmRepository cdmAppController){
String referenceCitation = AbcdParseUtility.parseFirstTextContent(referenceNodeList);
//check if reference already exists
- List<Reference> matchingReferences = cdmAppController.getReferenceService().findByTitle(Reference.class, referenceCitation, MatchMode.EXACT, null, null, null, null, null).getRecords();
+ List<Reference> matchingReferences = cdmAppController.getReferenceService().findByTitleWithRestrictions(Reference.class, referenceCitation, MatchMode.EXACT, null, null, null, null, null).getRecords();
Reference reference;
if(matchingReferences.size()==1){
reference = matchingReferences.iterator().next();
}
return unitAssociationWrapper;
}
-
-}
+}
\ No newline at end of file