File tree 2 files changed +16
-14
lines changed
common/src/main/cspace/config/services/tenants
relation/service/src/main/java/org/collectionspace/services/relation/nuxeo
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 2170
2170
<service : DocHandlerParams xmlns : service =" http://collectionspace.org/services/common/service" >
2171
2171
<service : params >
2172
2172
<service : ListResultsFields >
2173
- <!-- The default fields should probably be omitted here -->
2174
2173
<service : ListResultField >
2175
2174
<service : element >displayName</service : element >
2176
2175
<service : xpath >displayName</service : xpath >
2187
2186
<service : element >vocabType</service : element >
2188
2187
<service : xpath >vocabType</service : xpath >
2189
2188
</service : ListResultField >
2190
- <service : ListResultField >
2191
- <service : element >taxonFullName</service : element >
2192
- <service : xpath >taxonFullName</service : xpath >
2193
- </service : ListResultField >
2194
2189
</service : ListResultsFields >
2195
2190
</service : params >
2196
2191
</service : DocHandlerParams >
2238
2233
<service : params >
2239
2234
<service : ListResultsFields >
2240
2235
<!-- Omit the standard AuthorityItem items (they are handled by the code) -->
2236
+ <service : ListResultField >
2237
+ <service : element >taxonFullName</service : element >
2238
+ <service : xpath >taxonFullName</service : xpath >
2239
+ </service : ListResultField >
2241
2240
</service : ListResultsFields >
2242
2241
</service : params >
2243
2242
</service : DocHandlerParams >
Original file line number Diff line number Diff line change @@ -397,15 +397,18 @@ private void populateSubjectOrObjectValues(
397
397
398
398
private String getCommonSchemaNameForDocType (String docType ) {
399
399
String common_schema = null ;
400
- if ("Person" .equals (docType ))
401
- common_schema = PersonAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
402
- else if ("Organization" .equals (docType ))
403
- common_schema = OrgAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
404
- else if ("Locationitem" .equals (docType ))
405
- common_schema = LocationAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
406
- else if ("Taxon" .equals (docType ))
407
- common_schema = TaxonomyAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
408
- //else leave it null.
400
+ if (docType !=null ) {
401
+ // HACK - Use startsWith to allow for extension of schemas.
402
+ if (docType .startsWith ("Person" ))
403
+ common_schema = PersonAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
404
+ else if (docType .startsWith ("Organization" ))
405
+ common_schema = OrgAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
406
+ else if (docType .startsWith ("Locationitem" ))
407
+ common_schema = LocationAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
408
+ else if (docType .startsWith ("Taxon" ))
409
+ common_schema = TaxonomyAuthorityClient .SERVICE_ITEM_COMMON_PART_NAME ;
410
+ //else leave it null.
411
+ }
409
412
return common_schema ;
410
413
}
411
414
You can’t perform that action at this time.
0 commit comments