]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3178: Quick hack to disable use of garbage refNames in taxonomy authority...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 12 Oct 2011 01:40:13 +0000 (01:40 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 12 Oct 2011 01:40:13 +0000 (01:40 +0000)
services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java
services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java

index b2ec5d6909844ddb779b11439ff4fb8a3ec187b7..f9c92a4572b907d4551f776471f5b3cf220b6eec 100644 (file)
@@ -40,8 +40,8 @@ public class TaxonomyAuthorityClientUtils {
         TaxonomyauthorityCommon Taxonomyauthority = new TaxonomyauthorityCommon();
         Taxonomyauthority.setDisplayName(displayName);
         Taxonomyauthority.setShortIdentifier(shortIdentifier);
-        String refName = createTaxonomyAuthRefName(shortIdentifier, displayName);
-        Taxonomyauthority.setRefName(refName);
+        // String refName = createTaxonomyAuthRefName(shortIdentifier, displayName);
+        // Taxonomyauthority.setRefName(refName);
         Taxonomyauthority.setVocabType("Taxonomyauthority"); //FIXME: REM - Should this really be hard-coded?
         PoxPayloadOut multipart = new PoxPayloadOut(TaxonomyAuthorityClient.SERVICE_PAYLOAD_NAME);
         PayloadOutputPart commonPart = multipart.addPart(Taxonomyauthority, MediaType.APPLICATION_XML_TYPE);
@@ -71,8 +71,8 @@ public class TaxonomyAuthorityClientUtils {
         String shortId = taxonInfo.get(TaxonJAXBSchema.SHORT_IDENTIFIER);
         String displayName = taxonInfo.get(TaxonJAXBSchema.DISPLAY_NAME);
         taxon.setShortIdentifier(shortId);
-        String taxonomyRefName = createTaxonomyRefName(taxonomyAuthRefName, shortId, displayName);
-        taxon.setRefName(taxonomyRefName);
+        // String taxonomyRefName = createTaxonomyRefName(taxonomyAuthRefName, shortId, displayName);
+        // taxon.setRefName(taxonomyRefName);
         String value = null;
         value = taxonInfo.get(TaxonJAXBSchema.DISPLAY_NAME_COMPUTED);
         boolean displayNameComputed = (value == null) || value.equalsIgnoreCase("true");
index 314e5f11a7d9d0bcc2d3654e306bf5e831560590..f535c0901aa819e349c7e137590ca65ca44650bf 100644 (file)
@@ -169,9 +169,9 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         TaxonomyAuthorityClient client = new TaxonomyAuthorityClient();
         String shortId = createIdentifier();
         String displayName = "displayName-" + shortId;
-        String baseRefName =
-                TaxonomyAuthorityClientUtils.createTaxonomyAuthRefName(shortId, null);
-
+        // String baseRefName =
+        //        TaxonomyAuthorityClientUtils.createTaxonomyAuthRefName(shortId, null);
+        final String EMPTY_REFNAME = "";
         PoxPayloadOut multipart =
                 TaxonomyAuthorityClientUtils.createTaxonomyAuthorityInstance(
                 displayName, shortId, client.getCommonPartName());
@@ -200,7 +200,7 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         // Store the ID returned from the first resource created
         // for additional tests below.
         if (knownResourceId == null) {
-            setKnownResource(newID, shortId, baseRefName);
+            setKnownResource(newID, shortId, EMPTY_REFNAME);
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
             }
@@ -1123,9 +1123,14 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI
         nonexMap.put(TaxonJAXBSchema.NAME, TEST_TAXON_FULL_NAME);
         nonexMap.put(TaxonJAXBSchema.SHORT_IDENTIFIER, "nonEx");
         nonexMap.put(TaxonJAXBSchema.TERM_STATUS, TEST_TERM_STATUS);
+        // PoxPayloadOut multipart =
+        //        TaxonomyAuthorityClientUtils.createTaxonInstance(
+        //        TaxonomyAuthorityClientUtils.createTaxonomyRefName(knownResourceRefName, "nonEx", "Non Existent"),
+        //        nonexMap, NULL_TAXON_AUTHOR_GROUP_LIST, NULL_TAXON_CITATION_LIST,
+        //        client.getItemCommonPartName());
+        final String EMPTY_REFNAME = "";
         PoxPayloadOut multipart =
-                TaxonomyAuthorityClientUtils.createTaxonInstance(
-                TaxonomyAuthorityClientUtils.createTaxonomyRefName(knownResourceRefName, "nonEx", "Non Existent"),
+                TaxonomyAuthorityClientUtils.createTaxonInstance(EMPTY_REFNAME,
                 nonexMap, NULL_TAXON_AUTHOR_GROUP_LIST, NULL_TAXON_CITATION_LIST,
                 client.getItemCommonPartName());
         ClientResponse<String> res =