From: Aron Roberts Date: Thu, 19 May 2011 20:43:17 +0000 (+0000) Subject: CSPACE-3865: Convert taxonIsNamedHybrid field to xs:string from xs:boolean for now... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=1aee82ba574d5d5c39e34eae8cee73c2667e6755;p=tmp%2Fjakarta-migration.git CSPACE-3865: Convert taxonIsNamedHybrid field to xs:string from xs:boolean for now, until we've established how to represent and save a boolean value end-to-end, including in the UI. --- diff --git a/services/taxonomy/3rdparty/nuxeo-platform-cs-taxonomy/src/main/resources/schemas/taxon_common.xsd b/services/taxonomy/3rdparty/nuxeo-platform-cs-taxonomy/src/main/resources/schemas/taxon_common.xsd index aee7f777f..905c74b53 100644 --- a/services/taxonomy/3rdparty/nuxeo-platform-cs-taxonomy/src/main/resources/schemas/taxon_common.xsd +++ b/services/taxonomy/3rdparty/nuxeo-platform-cs-taxonomy/src/main/resources/schemas/taxon_common.xsd @@ -41,7 +41,7 @@ - + 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 f68033e3b..b2ec5d690 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 @@ -97,7 +97,9 @@ public class TaxonomyAuthorityClientUtils { if ((value = (String) taxonInfo.get(TaxonJAXBSchema.TAXONOMIC_STATUS)) != null) { taxon.setTaxonomicStatus(value); } - + if ((value = (String) taxonInfo.get(TaxonJAXBSchema.TAXON_IS_NAMED_HYBRID)) != null) { + taxon.setTaxonIsNamedHybrid(value); + } if (taxonCitationList != null) { taxon.setTaxonCitationList(taxonCitationList); } @@ -106,7 +108,7 @@ public class TaxonomyAuthorityClientUtils { taxon.setTaxonAuthorGroupList(taxonAuthorGroupList); } - // FIXME: Add the Boolean field isNamedHybrid in sample instances. + // FIXME: When the field isNamedHybrid becomes Boolean, add it as such to sample instances. PoxPayloadOut multipart = new PoxPayloadOut(TaxonomyAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME); PayloadOutputPart commonPart = multipart.addPart(taxon, diff --git a/services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java b/services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java index c55861d43..6d24897fe 100644 --- a/services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java +++ b/services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java @@ -93,7 +93,7 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI final String TEST_TAXON_CURRENCY = "current"; final String TEST_TAXON_YEAR = "1832"; final String TEST_TAXONOMIC_STATUS = "valid"; - final boolean TEST_TAXON_IS_NAMED_HYBRID = false; + final String TEST_TAXON_IS_NAMED_HYBRID = "false"; final TaxonAuthorGroupList NULL_TAXON_AUTHOR_GROUP_LIST = null; final TaxonCitationList NULL_TAXON_CITATION_LIST = null; /** The known resource id. */ @@ -262,7 +262,8 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI taxonMap.put(TaxonJAXBSchema.TAXON_CURRENCY, TEST_TAXON_CURRENCY); taxonMap.put(TaxonJAXBSchema.TAXON_YEAR, TEST_TAXON_YEAR); taxonMap.put(TaxonJAXBSchema.TAXONOMIC_STATUS, TEST_TAXONOMIC_STATUS); - + taxonMap.put(TaxonJAXBSchema.TAXON_IS_NAMED_HYBRID, TEST_TAXON_IS_NAMED_HYBRID); + TaxonCitationList taxonCitationList = new TaxonCitationList(); List taxonCitations = taxonCitationList.getTaxonCitation(); taxonCitations.add(TEST_TAXON_CITATION); @@ -276,9 +277,7 @@ public class TaxonomyAuthorityServiceTest extends AbstractServiceTestImpl { //FI // FIXME: Add additional fields in the Taxon record here, // including at least one each of: - // * a repeatable field - // * a repeatable group of fields - // * a Boolean field + // * a Boolean field (when implemented) // * an authref field (when implemented) String newID = TaxonomyAuthorityClientUtils.createItemInAuthority(vcsid, diff --git a/services/taxonomy/jaxb/src/main/resources/taxon_common.xsd b/services/taxonomy/jaxb/src/main/resources/taxon_common.xsd index 69d871355..03c4ae4f2 100644 --- a/services/taxonomy/jaxb/src/main/resources/taxon_common.xsd +++ b/services/taxonomy/jaxb/src/main/resources/taxon_common.xsd @@ -40,7 +40,7 @@ - +