]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
0345d378d2496312977d7e97f6bf5de0449e7c67
[tmp/jakarta-migration.git] /
1 /**
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:
5  *
6  * http://www.collectionspace.org http://wiki.collectionspace.org
7  *
8  * Copyright 2009 University of California, Berkeley
9  *
10  * Licensed under the Educational Community License (ECL), Version 2.0. You may
11  * not use this file except in compliance with this License.
12  *
13  * You may obtain a copy of the ECL 2.0 License at
14  *
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
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
21  * the License.
22  */
23 package org.collectionspace.services.location;
24
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;
30
31 import javax.ws.rs.Consumes;
32 import javax.ws.rs.Path;
33 import javax.ws.rs.Produces;
34
35 @Path(LocationAuthorityClient.SERVICE_PATH)
36 @Consumes("application/xml")
37 @Produces("application/xml")
38 public class LocationAuthorityResource
39         extends AuthorityResource<LocationauthoritiesCommon, LocationDocumentModelHandler> {
40
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);
46
47     public LocationAuthorityResource() {
48         super(LocationauthoritiesCommon.class, LocationAuthorityResource.class,
49                 LOCATIONAUTHORITIES_COMMON, LOCATIONS_COMMON);
50     }
51
52     @Override
53     public String getServiceName() {
54         return locationAuthorityServiceName;
55     }
56
57     public String getItemServiceName() {
58         return locationServiceName;
59     }
60
61     @Override
62     public Class<LocationauthoritiesCommon> getCommonPartClass() {
63         return LocationauthoritiesCommon.class;
64     }
65
66     @Override
67     public String getItemTermInfoGroupXPathBase() {
68         return LocationAuthorityClient.TERM_INFO_GROUP_XPATH_BASE;
69     }
70 }