]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
45b7d75e81e57ef52ccd359e45105459d8c6e05d
[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 at 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.citation;
24
25 import javax.ws.rs.Consumes;
26 import javax.ws.rs.Path;
27 import javax.ws.rs.Produces;
28 import org.collectionspace.services.client.CitationAuthorityClient;
29 import org.collectionspace.services.contact.AuthorityResourceWithContacts;
30 import org.collectionspace.services.citation.nuxeo.CitationDocumentModelHandler;
31 import org.slf4j.Logger;
32 import org.slf4j.LoggerFactory;
33
34 /**
35  * CitationAuthorityResource
36  *
37  * Handles, dispatches, and returns responses to RESTful requests related to
38  * Citation authority-related resources.
39  */
40 @Path(CitationAuthorityClient.SERVICE_PATH)
41 @Consumes("application/xml")
42 @Produces("application/xml")
43 public class CitationAuthorityResource extends AuthorityResourceWithContacts<CitationauthoritiesCommon, CitationDocumentModelHandler> {
44
45     final Logger logger = LoggerFactory.getLogger(CitationAuthorityResource.class);
46
47     public CitationAuthorityResource() {
48         super(CitationauthoritiesCommon.class, CitationAuthorityResource.class,
49                 CitationAuthorityClient.SERVICE_COMMON_PART_NAME, CitationAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME);
50     }
51
52     @Override
53     public String getServiceName() {
54         return CitationAuthorityClient.SERVICE_NAME;
55     }
56
57     @Override
58     public String getItemServiceName() {
59         return CitationAuthorityClient.SERVICE_ITEM_NAME;
60     }
61
62     @Override
63     public String getItemTermInfoGroupXPathBase() {
64         return CitationAuthorityClient.TERM_INFO_GROUP_XPATH_BASE;
65     }
66
67     @Override
68     public Class<CitationauthoritiesCommon> getCommonPartClass() {
69         return CitationauthoritiesCommon.class;
70     }
71 }