/**\r
- * This document is a part of the source code and related artifacts\r
- * for CollectionSpace, an open source collections management system\r
- * for museums and related institutions:\r
-\r
- * http://www.collectionspace.org\r
- * http://wiki.collectionspace.org\r
-\r
- * Copyright 2009 University of California at Berkeley\r
-\r
- * Licensed under the Educational Community License (ECL), Version 2.0.\r
- * You may not use this file except in compliance with this License.\r
-\r
- * You may obtain a copy of the ECL 2.0 License at\r
-\r
- * https://source.collectionspace.org/collection-space/LICENSE.txt\r
-\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * This document is a part of the source code and related artifacts for\r
+ * CollectionSpace, an open source collections management system for museums and\r
+ * related institutions:\r
+ *\r
+ * http://www.collectionspace.org http://wiki.collectionspace.org\r
+ *\r
+ * Copyright 2009 University of California at Berkeley\r
+ *\r
+ * Licensed under the Educational Community License (ECL), Version 2.0. You may\r
+ * not use this file except in compliance with this License.\r
+ *\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+ *\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r
+ * License for the specific language governing permissions and limitations under\r
+ * the License.\r
*/\r
package org.collectionspace.services.common.vocabulary;\r
\r
/**\r
* @author pschmitz\r
- * \r
+ *\r
*/\r
public interface AuthorityItemJAXBSchema {\r
- final static String IN_AUTHORITY = "inAuthority";\r
- final static String REF_NAME = "refName";\r
- final static String ORDER = "order";\r
- final static String SHORT_IDENTIFIER = "shortIdentifier";\r
- final static String CSID = "csid";\r
+\r
+ final static String IN_AUTHORITY = "inAuthority";\r
+ final static String REF_NAME = "refName";\r
+ final static String ORDER = "order";\r
+ final static String SHORT_IDENTIFIER = "shortIdentifier";\r
+ final static String CSID = "csid";\r
final static String DISPLAY_NAME = "displayName"; // This is the display name element for the Vocabulary service's item \r
- final static String TERM_DISPLAY_NAME = "termDisplayName";\r
- final static String TERM_NAME = "termName";\r
- final static String TERM_STATUS = "termStatus";\r
- final static String TERM_INFO_GROUP_SCHEMA_NAME = ""; // FIXME: REM - Needs\r
- // to be defined.\r
- // CSPACE-4813 - Remove all the below values and recompile all authorityitem\r
- // related classes\r
- final static String DISPLAY_NAME_COMPUTED = "displayNameComputed";\r
- final static String SHORT_DISPLAY_NAME = "shortDisplayName";\r
- final static String SHORT_DISPLAY_NAME_COMPUTED = "shortDisplayNameComputed";\r
- // final static String TERM_STATUS = "termStatus";\r
+ final static String TERM_DISPLAY_NAME = "termDisplayName"; // This is the display name element for all Authority services' items\r
+ final static String TERM_NAME = "termName";\r
+ final static String TERM_STATUS = "termStatus";\r
+ final static String TERM_INFO_GROUP_SCHEMA_NAME = ""; // FIXME: REM - Needs\r
+ // to be defined.\r
+ // CSPACE-4813 - Remove all the below values and recompile all authorityitem\r
+ // related classes\r
+ final static String DISPLAY_NAME_COMPUTED = "displayNameComputed";\r
+ final static String SHORT_DISPLAY_NAME = "shortDisplayName";\r
+ final static String SHORT_DISPLAY_NAME_COMPUTED = "shortDisplayNameComputed";\r
+ // final static String TERM_STATUS = "termStatus";\r
}\r
// for backwards compatibility, although its value is obtained
// from the termDisplayName field.
//
+ // Update: this name is now being changed to 'termDisplayName', both
+ // because this is the actual field name and because the app layer
+ // work to convert over to this field is underway. Per Patrick, the
+ // app layer treats lists, in at least some context(s), as sparse record
+ // payloads, and thus fields in list results must all be present in
+ // (i.e. represent a strict subset of the fields in) record schemas.
+ // - ADR 2012-05-11
+ //
+ //
// In CSPACE-5134, these list results will change substantially
// to return display names for both the preferred term and for
// each non-preferred term (if any).
- result.setElement(AuthorityItemJAXBSchema.DISPLAY_NAME);
+ result.setElement(AuthorityItemJAXBSchema.TERM_DISPLAY_NAME);
result.setXpath(NuxeoUtils.getPrimaryXPathPropertyName(
authorityItemCommonSchemaName, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME));
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
<service:properties xmlns:service="http://collectionspace.org/services/config/service">
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNameProperty</types:key>
- <types:value>displayName</types:value>
+ <types:value>termDisplayName</types:value>
</types:item>
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>objectNumberProperty</types:key>
import java.util.List;
import java.util.Map;
+import org.collectionspace.services.ConceptJAXBSchema;
import org.collectionspace.services.client.AbstractCommonListUtils;
import org.collectionspace.services.client.AuthorityClient;
import org.collectionspace.services.client.CollectionSpaceClient;
import org.collectionspace.services.client.ConceptAuthorityClientUtils;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
import org.collectionspace.services.concept.ConceptTermGroup;
import org.collectionspace.services.concept.ConceptTermGroupList;
import org.collectionspace.services.concept.ConceptauthoritiesCommon;
/** The logger. */
private final String CLASS_NAME = ConceptAuthorityServiceTest.class.getName();
private final Logger logger = LoggerFactory.getLogger(ConceptAuthorityServiceTest.class);
- private final String REFNAME = "refName";
- private final String DISPLAYNAME = "displayName";
private final static String CURRENT_DATE_UTC =
GregorianCalendarDateTimeUtils.currentDateUTC();
for (AbstractCommonList.ListItem item : items) {
String value =
- AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
+ AbstractCommonListUtils.ListItemGetElementValue(item, ConceptJAXBSchema.REF_NAME);
Assert.assertTrue((null != value), "Item refName is null!");
value =
- AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ AbstractCommonListUtils.ListItemGetElementValue(item, ConceptJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if(logger.isTraceEnabled()){
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
item, LocationJAXBSchema.REF_NAME);
Assert.assertTrue((null != value), "Item refName is null!");
value = AbstractCommonListUtils.ListItemGetElementValue(item,
- LocationJAXBSchema.DISPLAY_NAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ LocationJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if (logger.isTraceEnabled()) {
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger,
AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.REF_NAME);
Assert.assertTrue((null != value), "Item refName is null!");
value =
- AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.DISPLAY_NAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if (logger.isTraceEnabled()) {
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
// not termDisplayName, for backward compatibility.
// (The format of list items will change significantly in CSPACE-5134.)
value =
- AbstractCommonListUtils.ListItemGetElementValue(item, AuthorityItemJAXBSchema.DISPLAY_NAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ AbstractCommonListUtils.ListItemGetElementValue(item, AuthorityItemJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if (logger.isTraceEnabled()) {
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
item, PlaceJAXBSchema.REF_NAME);
Assert.assertTrue((null != value), "Item refName is null!");
value = AbstractCommonListUtils.ListItemGetElementValue(item,
- PlaceJAXBSchema.DISPLAY_NAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ PlaceJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if (logger.isTraceEnabled()) {
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger,
AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.REF_NAME);
Assert.assertTrue((null != value), "Item refName is null!");
value =
- AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.DISPLAY_NAME);
- Assert.assertTrue((null != value), "Item displayName is null!");
+ AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.TERM_DISPLAY_NAME);
+ Assert.assertTrue((null != value), "Item termDisplayName is null!");
}
if (logger.isTraceEnabled()) {
AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);