]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3865: Convert taxonIsNamedHybrid field to xs:string from xs:boolean for now...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 19 May 2011 20:43:17 +0000 (20:43 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 19 May 2011 20:43:17 +0000 (20:43 +0000)
services/taxonomy/3rdparty/nuxeo-platform-cs-taxonomy/src/main/resources/schemas/taxon_common.xsd
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
services/taxonomy/jaxb/src/main/resources/taxon_common.xsd

index aee7f777f49cdb9b756fa64e35102d5ca06ace36..905c74b53808ca25e2272e43decc77bfb26d7bb6 100644 (file)
@@ -41,7 +41,7 @@
     <xs:element name="taxonNameSourceCode" type="xs:string"/>
     <xs:element name="taxonGUID" type="xs:string"/>
     <xs:element name="taxonNote" type="xs:string"/>
-    <xs:element name="taxonIsNamedHybrid" type="xs:boolean"/>
+    <xs:element name="taxonIsNamedHybrid" type="xs:string"/>
 
     <xs:complexType name="taxonAuthorGroupList">
         <xs:sequence>
index f68033e3b23a8dab6f7e88f3bdcf557d636d89b7..b2ec5d6909844ddb779b11439ff4fb8a3ec187b7 100644 (file)
@@ -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,
index c55861d435e1d57a7a13ea842e3f051c75c7e1fb..6d24897fe61a2cff2c341ae9a92fc05c00498d88 100644 (file)
@@ -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<String> 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,
index 69d871355e928f71680e0e67ad7c3bc393d42ec0..03c4ae4f294d796fa5ae3fcf1d7ae6eda1113d4b 100644 (file)
@@ -40,7 +40,7 @@
                 <xs:element name="taxonNameSourceCode" type="xs:string"/>
                 <xs:element name="taxonGUID" type="xs:string"/>
                 <xs:element name="taxonNote" type="xs:string"/>
-                <xs:element name="taxonIsNamedHybrid" type="xs:boolean"/>
+                <xs:element name="taxonIsNamedHybrid" type="xs:string"/>
 
             </xs:sequence>
         </xs:complexType>