update ReferenceFactory method
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 24 Apr 2013 13:39:44 +0000 (13:39 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 24 Apr 2013 13:39:44 +0000 (13:39 +0000)
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/tcsxml/TcsXmlTransformer.java

index 0156f0438155538c65e57563ab3f8cf1776720cf..0fee62589a3f010bc46d17db8e456e69cda72df4 100644 (file)
@@ -164,7 +164,7 @@ public final class TcsXmlTransformer {
        \r
        /** Creates an cdm-Rank by the tcs rank\r
         */\r
-       public static Reference pubTypeStr2PubType (String strPubType) throws UnknownCdmTypeException{\r
+       public static Reference<?> pubTypeStr2PubType (String strPubType) throws UnknownCdmTypeException{\r
                String tcsRoot = "http://rs.tdwg.org/ontology/voc/PublicationCitation#";\r
                String tcsBook = tcsRoot + "Book";\r
                String tcsJournal = tcsRoot + "Journal";\r
@@ -194,15 +194,14 @@ public final class TcsXmlTransformer {
 //             SubReference    A Sub-Reference type publication.\r
 //             Thesis  A Thesis type publication.\r
 \r
-               ReferenceFactory refFactory = ReferenceFactory.newInstance();\r
                if (strPubType == null){return null;\r
-               }else if (tcsBookSection.equals(strPubType)){return refFactory.newBookSection();\r
-               }else if (tcsBook.equals(strPubType)){return refFactory.newBook();\r
-               }else if (tcsArticle.equals(strPubType)){return refFactory.newArticle();\r
-               }else if (tcsJournal.equals(strPubType)){return refFactory.newJournal();\r
-               }else if (tcsWebPage.equals(strPubType)){return refFactory.newWebPage();\r
-               }else if (tcsCommunication.equals(strPubType)){return refFactory.newPersonalCommunication();\r
-               }else if (tcsBookSeries.equals(strPubType)){return refFactory.newPrintSeries();\r
+               }else if (tcsBookSection.equals(strPubType)){return ReferenceFactory.newBookSection();\r
+               }else if (tcsBook.equals(strPubType)){return ReferenceFactory.newBook();\r
+               }else if (tcsArticle.equals(strPubType)){return ReferenceFactory.newArticle();\r
+               }else if (tcsJournal.equals(strPubType)){return ReferenceFactory.newJournal();\r
+               }else if (tcsWebPage.equals(strPubType)){return ReferenceFactory.newWebPage();\r
+               }else if (tcsCommunication.equals(strPubType)){return ReferenceFactory.newPersonalCommunication();\r
+               }else if (tcsBookSeries.equals(strPubType)){return ReferenceFactory.newPrintSeries();\r
                }       \r
                else {\r
                        throw new UnknownCdmTypeException("Unknown publication type " + strPubType);\r
@@ -211,7 +210,7 @@ public final class TcsXmlTransformer {
        \r
        /** Creates an cdm-RelationshipTermBase by the tcsRelationshipCategory\r
         */\r
-       public static RelationshipTermBase tcsRelationshipType2Relationship (String tcsRelationshipType, ResultWrapper<Boolean> inverse) throws UnknownCdmTypeException{\r
+       public static RelationshipTermBase<?> tcsRelationshipType2Relationship (String tcsRelationshipType, ResultWrapper<Boolean> inverse) throws UnknownCdmTypeException{\r
                if (tcsRelationshipType == null){ return null;\r
                \r
                //Synonym relationships\r