2 * This document is a part of the source code and related artifacts for
3 * CollectionSpace, an open source collections management system for museums and
4 * related institutions:
6 * http://www.collectionspace.org http://wiki.collectionspace.org
8 * Copyright 2009 University of California, Berkeley
10 * Licensed under the Educational Community License (ECL), Version 2.0. You may
11 * not use this file except in compliance with this License.
13 * You may obtain a copy of the ECL 2.0 License at
15 * https://source.collectionspace.org/collection-space/LICENSE.txt
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
19 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
20 * License for the specific language governing permissions and limitations under
23 package org.collectionspace.services.location;
25 import org.collectionspace.services.client.LocationAuthorityClient;
26 import org.collectionspace.services.common.vocabulary.AuthorityResource;
27 import org.collectionspace.services.location.nuxeo.LocationDocumentModelHandler;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
31 import javax.ws.rs.Consumes;
32 import javax.ws.rs.Path;
33 import javax.ws.rs.Produces;
35 @Path(LocationAuthorityClient.SERVICE_PATH)
36 @Consumes("application/xml")
37 @Produces("application/xml")
38 public class LocationAuthorityResource
39 extends AuthorityResource<LocationauthoritiesCommon, LocationDocumentModelHandler> {
41 private final static String locationAuthorityServiceName = "locationauthorities";
42 private final static String LOCATIONAUTHORITIES_COMMON = "locationauthorities_common";
43 private final static String locationServiceName = "locations";
44 private final static String LOCATIONS_COMMON = "locations_common";
45 final Logger logger = LoggerFactory.getLogger(LocationAuthorityResource.class);
47 public LocationAuthorityResource() {
48 super(LocationauthoritiesCommon.class, LocationAuthorityResource.class,
49 LOCATIONAUTHORITIES_COMMON, LOCATIONS_COMMON);
53 public String getServiceName() {
54 return locationAuthorityServiceName;
57 public String getItemServiceName() {
58 return locationServiceName;
62 public Class<LocationauthoritiesCommon> getCommonPartClass() {
63 return LocationauthoritiesCommon.class;
67 public String getItemTermInfoGroupXPathBase() {
68 return LocationAuthorityClient.TERM_INFO_GROUP_XPATH_BASE;