]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3865: Create tests now work; next to work on failing read tests.
authorAron Roberts <aron@socrates.berkeley.edu>
Sat, 7 May 2011 04:58:55 +0000 (04:58 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Sat, 7 May 2011 04:58:55 +0000 (04:58 +0000)
services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java
services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java

index 42063d35cf74c5fd93f1c066054ece9487e04c86..833e067e81ae57bb1b49bb9f6b5439a2c3ce3e57 100644 (file)
@@ -85,7 +85,7 @@ public class TaxonomyAuthorityClientUtils {
         commonPart.setLabel(headerLabel);
 
         if(logger.isDebugEnabled()){
-               logger.debug("to be created, taxonomy common ", taxonomy, TaxonCommon.class);
+               logger.debug("to be created, taxon common ", taxonomy, TaxonCommon.class);
         }
 
         return multipart;
@@ -158,7 +158,7 @@ public class TaxonomyAuthorityClientUtils {
         commonPart.setLabel(headerLabel);
 
         if(logger.isDebugEnabled()){
-               logger.debug("to be created, taxonomy common ", commonPartXML);
+               logger.debug("to be created, Taxon common ", commonPartXML);
         }
 
         return multipart;
@@ -226,16 +226,16 @@ public class TaxonomyAuthorityClientUtils {
     }
 
     /**
-     * Creates the taxonomy ref name.
+     * Creates the taxon ref name.
      *
      * @param taxonomyAuthRefName the Taxonomyauthority ref name
-     * @param shortId the taxonomy shortIdentifier
+     * @param shortId the taxon shortIdentifier
      * @param displaySuffix displayName to be appended, if non-null
      * @return the string
      */
     public static String createTaxonomyRefName(
                                                String taxonomyAuthRefName, String shortId, String displaySuffix) {
-       String refName = taxonomyAuthRefName+":taxonomy:name("+shortId+")";
+       String refName = taxonomyAuthRefName+":taxon:name("+shortId+")";
                if(displaySuffix!=null&&!displaySuffix.isEmpty())
                        refName += "'"+displaySuffix+"'";
        return refName;
@@ -243,7 +243,7 @@ public class TaxonomyAuthorityClientUtils {
 
     public static String extractId(ClientResponse<Response> res) {
         MultivaluedMap<String, Object> mvm = res.getMetadata();
-        String uri = (String) ((ArrayList<Object>) mvm.get("Taxonomy")).get(0);
+        String uri = (String) ((ArrayList<Object>) mvm.get("Location")).get(0);
         if(logger.isDebugEnabled()){
                logger.debug("extractId:uri=" + uri);
         }
index d83adf87f621a3288b8423469e97ab59587ddcf0..a75e403375e94ecf61ea907e956e3a1a2e29ea52 100644 (file)
@@ -64,7 +64,7 @@ public class TaxonDocumentModelHandler
     /**
      * Common part schema label
      */
-    private static final String COMMON_PART_LABEL = "taxonomy_common";
+    private static final String COMMON_PART_LABEL = "taxon_common";
     
     public TaxonDocumentModelHandler() {
        super(COMMON_PART_LABEL);
@@ -96,7 +96,7 @@ public class TaxonDocumentModelHandler
      * @throws Exception the exception
      */
     private void handleDisplayNames(DocumentModel docModel) throws Exception {
-       String commonPartLabel = getServiceContext().getCommonPartLabel("taxonomy");
+       String commonPartLabel = getServiceContext().getCommonPartLabel("taxon");
        Boolean displayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
                        TaxonomyJAXBSchema.DISPLAY_NAME_COMPUTED);
        Boolean shortDisplayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
@@ -150,8 +150,7 @@ public class TaxonDocumentModelHandler
         commonList.setFieldsReturned("displayName|refName|shortIdentifier|uri|csid");
                List<TaxonCommonList.TaxonListItem> list = coList.getTaxonListItem();
                Iterator<DocumentModel> iter = wrapDoc.getWrappedObject().iterator();
-               String commonPartLabel = getServiceContext().getCommonPartLabel(
-                               "taxonomy");
+               String commonPartLabel = getServiceContext().getCommonPartLabel("taxon");
                while (iter.hasNext()) {
                        DocumentModel docModel = iter.next();
                        TaxonListItem ilistItem = new TaxonListItem();