From: Aron Roberts Date: Sat, 7 May 2011 04:58:55 +0000 (+0000) Subject: CSPACE-3865: Create tests now work; next to work on failing read tests. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=2a4440814d82bfed7c48140795a9aa0b18283128;p=tmp%2Fjakarta-migration.git CSPACE-3865: Create tests now work; next to work on failing read tests. --- diff --git a/services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java b/services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java index 42063d35c..833e067e8 100644 --- a/services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java +++ b/services/taxonomy/client/src/main/java/org/collectionspace/services/client/TaxonomyAuthorityClientUtils.java @@ -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 res) { MultivaluedMap mvm = res.getMetadata(); - String uri = (String) ((ArrayList) mvm.get("Taxonomy")).get(0); + String uri = (String) ((ArrayList) mvm.get("Location")).get(0); if(logger.isDebugEnabled()){ logger.debug("extractId:uri=" + uri); } diff --git a/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java b/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java index d83adf87f..a75e40337 100644 --- a/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java +++ b/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java @@ -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 list = coList.getTaxonListItem(); Iterator 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();