value = taxonomyInfo.get(TaxonomyJAXBSchema.DISPLAY_NAME_COMPUTED);
boolean displayNameComputed = (value==null) || value.equalsIgnoreCase("true");
taxonomy.setDisplayNameComputed(displayNameComputed);
- if((value = (String)taxonomyInfo.get(TaxonomyJAXBSchema.FULL_NAME))!=null)
+ if((value = (String)taxonomyInfo.get(TaxonomyJAXBSchema.NAME))!=null)
taxonomy.setTaxonFullName(value);
- if((value = (String)taxonomyInfo.get(TaxonomyJAXBSchema.TAXON_RANK))!=null)
+ if((value = (String)taxonomyInfo.get(TaxonomyJAXBSchema.RANK))!=null)
taxonomy.setTaxonRank(value);
if((value = (String)taxonomyInfo.get(TaxonomyJAXBSchema.TERM_STATUS))!=null)
taxonomy.setTermStatus(value);
}
displayName =
prepareDefaultDisplayName(
- taxonomyMap.get(TaxonomyJAXBSchema.FULL_NAME));
+ taxonomyMap.get(TaxonomyJAXBSchema.NAME));
}
if(logger.isDebugEnabled()){
return AuthorityClient.ITEMS;
}
- final String TEST_FULL_NAME = "Centaurus pleurexanthemus Green 1832-";
+ final String TEST_NAME = "Centaurus pleurexanthemus Green 1832-";
final String TEST_SHORTID = "CentauruspleurexanthemusGreen1832";
// TODO Make rank be a controlled vocab term, assuming that's how we'll implement it.
final String TEST_RANK = "5";
TaxonomyAuthorityClient client = new TaxonomyAuthorityClient();
Map<String, String> shelf1Map = new HashMap<String,String>();
// TODO Make loc type and status be controlled vocabs.
- shelf1Map.put(TaxonomyJAXBSchema.FULL_NAME, TEST_FULL_NAME);
- shelf1Map.put(TaxonomyJAXBSchema.TAXON_RANK, TEST_RANK);
+ shelf1Map.put(TaxonomyJAXBSchema.NAME, TEST_NAME);
+ shelf1Map.put(TaxonomyJAXBSchema.RANK, TEST_RANK);
shelf1Map.put(TaxonomyJAXBSchema.TERM_STATUS, TEST_STATUS);
String newID = TaxonomyAuthorityClientUtils.createItemInAuthority(vcsid,
String displayName = taxonomy.getDisplayName();
// Make sure displayName matches computed form
String expectedDisplayName =
- TaxonomyAuthorityClientUtils.prepareDefaultDisplayName(TEST_FULL_NAME);
+ TaxonomyAuthorityClientUtils.prepareDefaultDisplayName(TEST_NAME);
Assert.assertNotNull(displayName, expectedDisplayName);
// Update the shortName and verify the computed name is updated.
taxonomy.setCsid(null);
taxonomy.setDisplayNameComputed(true);
- taxonomy.setTaxonFullName("updated-" + TEST_FULL_NAME);
+ taxonomy.setTaxonFullName("updated-" + TEST_NAME);
expectedDisplayName =
- TaxonomyAuthorityClientUtils.prepareDefaultDisplayName("updated-" + TEST_FULL_NAME);
+ TaxonomyAuthorityClientUtils.prepareDefaultDisplayName("updated-" + TEST_NAME);
// Submit the updated resource to the service and store the response.
PoxPayloadOut output = new PoxPayloadOut(TaxonomyAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
// The only relevant ID may be the one used in update(), below.
TaxonomyAuthorityClient client = new TaxonomyAuthorityClient();
Map<String, String> nonexMap = new HashMap<String,String>();
- nonexMap.put(TaxonomyJAXBSchema.FULL_NAME, TEST_FULL_NAME);
+ nonexMap.put(TaxonomyJAXBSchema.NAME, TEST_NAME);
nonexMap.put(TaxonomyJAXBSchema.SHORT_IDENTIFIER, "nonEx");
nonexMap.put(TaxonomyJAXBSchema.TERM_STATUS, TEST_STATUS);
PoxPayloadOut multipart =
@Consumes("application/xml")
@Produces("application/xml")
public class TaxonomyAuthorityResource
- extends AuthorityResource<TaxonomyauthoritiesCommon, TaxonomyauthoritiesCommonList,
+ extends AuthorityResource<TaxonomyauthorityCommon, TaxonomyauthorityCommonList,
TaxonomyCommon, TaxonomyDocumentModelHandler> {
private final static String taxonomyAuthorityServiceName = "taxonomyauthorities";
* Instantiates a new taxonomy authority resource.
*/
public TaxonomyAuthorityResource() {
- super(TaxonomyauthoritiesCommon.class, TaxonomyAuthorityResource.class,
+ super(TaxonomyauthorityCommon.class, TaxonomyAuthorityResource.class,
LOCATIONAUTHORITIES_COMMON, LOCATIONS_COMMON);
}
}
@Override
- public Class<TaxonomyauthoritiesCommon> getCommonPartClass() {
- return TaxonomyauthoritiesCommon.class;
+ public Class<TaxonomyauthorityCommon> getCommonPartClass() {
+ return TaxonomyauthorityCommon.class;
}
}