--- /dev/null
+package org.collectionspace.services.advancedsearch.model;
+
+import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
+import org.collectionspace.services.collectionobject.MaterialGroupList;
+
+public class MaterialModel {
+
+ public static String material(CollectionobjectsCommon collectionObject) {
+ String material = null;
+ if (collectionObject != null && collectionObject.getMaterialGroupList() != null) {
+ MaterialGroupList materialGroup = collectionObject.getMaterialGroupList();
+ if (!materialGroup.getMaterialGroup().isEmpty()) {
+ material = materialGroup.getMaterialGroup().get(0).getMaterial();
+ }
+ }
+ return material;
+ }
+}
import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
import org.collectionspace.services.collectionobject.domain.naturalhistory_extension.CollectionobjectsNaturalhistory;
+import org.collectionspace.services.collectionobject.domain.naturalhistory_extension.DeterminationHistoryGroup;
+import org.collectionspace.services.collectionobject.domain.naturalhistory_extension.DeterminationHistoryGroupList;
import org.collectionspace.services.collectionobject.domain.naturalhistory_extension.TaxonomicIdentGroup;
import org.collectionspace.services.collectionobject.domain.naturalhistory_extension.TaxonomicIdentGroupList;
return form;
}
+
+ public static String determinationTaxon(final CollectionobjectsNaturalhistory naturalHistory) {
+ String taxon = null;
+ if (naturalHistory != null && naturalHistory.getTaxonomicIdentGroupList() != null) {
+ DeterminationHistoryGroupList determinationGroupList = naturalHistory.getDeterminationHistoryGroupList();
+ List<DeterminationHistoryGroup> determinationGroups = determinationGroupList.getDeterminationHistoryGroup();
+ if (!determinationGroups.isEmpty()) {
+ DeterminationHistoryGroup group = determinationGroups.get(0);
+ taxon = group.getDeterminationTaxon();
+ }
+ }
+
+ return taxon;
+ }
}
<xs:element name="objectProductionDate" type="xs:string" nillable="true"/>
<xs:element name="objectProductionPlace" type="xs:string" nillable="true"/>
+ <!-- for materials profile -->
+ <xs:element name="material" type="xs:string" nillable="true"/>
+
+ <!-- for herbarium profile -->
+ <xs:element name="determinationTaxon" type="xs:string" nillable="true"/>
+
<xs:element name="contentConcepts" type="contentConcepts" nillable="true"/>
<xs:element name="nagpraCategories" type="nagpraCategories" nillable="true"/>
</xs:sequence>
import org.collectionspace.services.advancedsearch.model.BriefDescriptionListModel;
import org.collectionspace.services.advancedsearch.model.ContentConceptListModel;
import org.collectionspace.services.advancedsearch.model.FieldCollectionModel;
+import org.collectionspace.services.advancedsearch.model.MaterialModel;
import org.collectionspace.services.advancedsearch.model.NAGPRACategoryModel;
import org.collectionspace.services.advancedsearch.model.ObjectNameListModel;
import org.collectionspace.services.advancedsearch.model.ObjectProductionModel;
});
item.setForm(TaxonModel.preservationForm(collectionObject));
+ item.setMaterial(MaterialModel.material(collectionObject));
// from media resource
if (!blobInfo.isEmpty()) {
if (naturalHistory != null) {
item.setTaxon(TaxonModel.taxon(naturalHistory));
+ item.setDeterminationTaxon(TaxonModel.determinationTaxon(naturalHistory));
}
if (objectsNAGPRA != null) {
<xs:element name="fieldHigherGeography" type="xs:string"/>
<xs:element name="taxonomicIdentGroupList" type="taxonomicIdentGroupList"/>
+ <xs:element name="determinationHistoryGroupList" type="determinationHistoryGroupList"/>
<xs:element name="typeSpecimenGroupList" type="typeSpecimenGroupList"/>
<xs:element name="fieldCollElevationGroupList" type="fieldCollElevationGroupList"/>
<xs:element name="fieldCollDepthGroupList" type="fieldCollDepthGroupList"/>
<xs:element name="notes" type="xs:string"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="determinationHistoryGroupList">
+ <xs:sequence>
+ <xs:element name="determinationHistoryGroup" type="determinationHistoryGroup" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="determinationHistoryGroup">
+ <xs:sequence>
+ <xs:element name="determinationQualifier" type="xs:string"/>
+ <xs:element name="determinationRefPage" type="xs:string"/>
+ <xs:element name="determinationInstitution" type="xs:string"/>
+ <xs:element name="determinationTaxon" type="xs:string"/>
+ <xs:element name="determinationKind" type="xs:string"/>
+ <xs:element name="determinationReference" type="xs:string"/>
+ <xs:element name="determinationNote" type="xs:string"/>
+ <xs:element name="determinationBy" type="xs:string"/>
+ <!-- DateGroup is a structured date; omitting for now since this schema is out of date
+ <xs:element name="determinationDateGroup" type="xs:string"/>
+ -->
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="typeSpecimenGroupList">
<xs:sequence>