2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright 2009 University of California at Berkeley
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
16 * https://source.collectionspace.org/collection-space/LICENSE.txt
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
24 package org.collectionspace.services.vocabulary;
26 //import javax.ws.rs.Consumes;
27 //import javax.ws.rs.DELETE;
28 //import javax.ws.rs.GET;
29 //import javax.ws.rs.POST;
30 //import javax.ws.rs.PUT;
31 import javax.ws.rs.Path;
32 //import javax.ws.rs.PathParam;
33 //import javax.ws.rs.Produces;
34 //import javax.ws.rs.QueryParam;
35 //import javax.ws.rs.WebApplicationException;
36 //import javax.ws.rs.core.Context;
37 //import javax.ws.rs.core.MultivaluedMap;
38 //import javax.ws.rs.core.Response;
39 //import javax.ws.rs.core.UriBuilder;
40 //import javax.ws.rs.core.UriInfo;
42 //import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema;
43 //import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
44 import org.collectionspace.services.common.vocabulary.AuthorityResource;
45 import org.collectionspace.services.client.VocabularyClient;
47 //import org.collectionspace.services.common.AbstractMultiPartCollectionSpaceResourceImpl;
48 //import org.collectionspace.services.common.ClientType;
49 //import org.collectionspace.services.common.ServiceMain;
50 //import org.collectionspace.services.common.context.ServiceContext;
51 //import org.collectionspace.services.common.document.BadRequestException;
52 //import org.collectionspace.services.common.document.DocumentFilter;
53 //import org.collectionspace.services.common.document.DocumentHandler;
54 //import org.collectionspace.services.common.document.DocumentNotFoundException;
55 //import org.collectionspace.services.common.security.UnauthorizedException;
56 //import org.collectionspace.services.common.query.IQueryManager;
57 import org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler;
58 //import org.jboss.resteasy.plugins.providers.multipart.PoxPayloadIn;
59 //import org.jboss.resteasy.plugins.providers.multipart.PoxPayloadOut;
60 //import org.jboss.resteasy.util.HttpResponseCodes;
61 import org.slf4j.Logger;
62 import org.slf4j.LoggerFactory;
65 * The Class VocabularyResource.
67 //@Path("/vocabularies")
68 @Path("/" + VocabularyClient.SERVICE_PATH_COMPONENT)
69 public class VocabularyResource extends
70 AuthorityResource<VocabulariesCommon, VocabulariesCommonList, VocabularyitemsCommonList,
71 VocabularyItemDocumentModelHandler> {
73 private final static String vocabularyServiceName = VocabularyClient.SERVICE_PATH_COMPONENT;
74 // private final static String vocabularyServiceName = "vocabularies";
76 private final static String VOCABULARIES_COMMON = "vocabularies_common";
78 private final static String vocabularyItemServiceName = "vocabularyitems";
79 private final static String VOCABULARYITEMS_COMMON = "vocabularyitems_common";
82 final Logger logger = LoggerFactory.getLogger(VocabularyResource.class);
85 * Instantiates a new VocabularyResource.
87 public VocabularyResource() {
88 super(VocabulariesCommon.class, VocabularyResource.class,
89 VOCABULARIES_COMMON, VOCABULARYITEMS_COMMON);
93 * @see org.collectionspace.services.common.AbstractCollectionSpaceResourceImpl#getServiceName()
96 public String getServiceName() {
97 return vocabularyServiceName;
101 * Gets the item service name.
103 * @return the item service name
106 public String getItemServiceName() {
107 return vocabularyItemServiceName;
111 * @see org.collectionspace.services.common.CollectionSpaceResource#getCommonPartClass()
114 public Class<VocabulariesCommon> getCommonPartClass() {
115 return VocabulariesCommon.class;