<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
<service:params>
<service:ListResultsFields>
- <!-- The default fields should probably be omitted here -->
<service:ListResultField>
<service:element>displayName</service:element>
<service:xpath>displayName</service:xpath>
<service:element>vocabType</service:element>
<service:xpath>vocabType</service:xpath>
</service:ListResultField>
- <service:ListResultField>
- <service:element>taxonFullName</service:element>
- <service:xpath>taxonFullName</service:xpath>
- </service:ListResultField>
</service:ListResultsFields>
</service:params>
</service:DocHandlerParams>
<service:params>
<service:ListResultsFields>
<!-- Omit the standard AuthorityItem items (they are handled by the code) -->
+ <service:ListResultField>
+ <service:element>taxonFullName</service:element>
+ <service:xpath>taxonFullName</service:xpath>
+ </service:ListResultField>
</service:ListResultsFields>
</service:params>
</service:DocHandlerParams>
private String getCommonSchemaNameForDocType(String docType) {
String common_schema = null;
- if("Person".equals(docType))
- common_schema = PersonAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
- else if("Organization".equals(docType))
- common_schema = OrgAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
- else if("Locationitem".equals(docType))
- common_schema = LocationAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
- else if("Taxon".equals(docType))
- common_schema = TaxonomyAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
- //else leave it null.
+ if(docType!=null) {
+ // HACK - Use startsWith to allow for extension of schemas.
+ if(docType.startsWith("Person"))
+ common_schema = PersonAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
+ else if(docType.startsWith("Organization"))
+ common_schema = OrgAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
+ else if(docType.startsWith("Locationitem"))
+ common_schema = LocationAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
+ else if(docType.startsWith("Taxon"))
+ common_schema = TaxonomyAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME;
+ //else leave it null.
+ }
return common_schema;
}