ref #1444 fix reference type handling for ERMS
[cdmlib-apps.git] / cdm-pesi / src / main / java / eu / etaxonomy / cdm / io / pesi / erms / ErmsReferenceImport.java
index eacbd58934869f3c2fd6b61e71badd8640a1d479..77b7d503ada328eef9afaa2b5754ffade094cac5 100644 (file)
@@ -109,18 +109,19 @@ public class ErmsReferenceImport
                String type = rs.getString("source_type");\r
                Reference ref;\r
                if (type.equalsIgnoreCase("p")){\r
-                       //TDOO is this correct? maybe mark as 'publication'\r
                        ref = ReferenceFactory.newGeneric();\r
                        MarkerType markerType = getMarkerType(state, ErmsTransformer.uuidMarkerRefPublication, "Publication", "Publication", "p");\r
                        ref.addMarker(markerType, true);\r
                }else if (type.equalsIgnoreCase("d")){\r
                        ref = ReferenceFactory.newDatabase();\r
                }else if (type.equalsIgnoreCase("e")){\r
-                       //TODO is this correct, maybe mark as "informal"\r
                        ref = ReferenceFactory.newGeneric();\r
+               MarkerType markerType = getMarkerType(state, ErmsTransformer.uuidMarkerRefInformal, "Informal", "Informal", "e");\r
+               ref.addMarker(markerType, true);\r
                }else if (type.equalsIgnoreCase("i")){\r
-                       //TODO is this correct?\r
                        ref = ReferenceFactory.newGeneric();\r
+               MarkerType markerType = getMarkerType(state, ErmsTransformer.uuidMarkerRefTypeI, "Ref type i", "Ref type i", "i");\r
+               ref.addMarker(markerType, true);\r
                }else{\r
                        ref = ReferenceFactory.newGeneric();\r
                        logger.warn("Unknown reference type: " + type + ". Created generic instead.");\r