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 Regents of the University of California
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
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,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
24 package org.collectionspace.services.jaxrs;
26 import org.collectionspace.services.account.AccountResource;
27 import org.collectionspace.services.collectionobject.CollectionObjectResource;
28 import org.collectionspace.services.id.IDResource;
29 import org.collectionspace.services.intake.IntakeResource;
30 import org.collectionspace.services.relation.NewRelationResource;
31 import org.collectionspace.services.acquisition.AcquisitionResource;
32 import org.collectionspace.services.dimension.DimensionResource;
33 import org.collectionspace.services.contact.ContactResource;
35 import org.collectionspace.services.vocabulary.VocabularyResource;
37 //import org.collectionspace.services.query.QueryResource;
39 import javax.ws.rs.core.Application;
40 import java.util.HashSet;
44 * CollectionSpaceJaxRsApplication, the root application
45 * for enumerating Resource classes in the Services Layer,
46 * which in turn respond to and route REST-based requests.
48 * $LastChangedRevision$
52 public class CollectionSpaceJaxRsApplication extends Application {
54 private Set<Object> singletons = new HashSet<Object>();
55 private Set<Class<?>> empty = new HashSet<Class<?>>();
57 public CollectionSpaceJaxRsApplication() {
58 singletons.add(new AccountResource());
59 singletons.add(new CollectionObjectResource());
60 singletons.add(new IDResource());
61 singletons.add(new IntakeResource());
62 singletons.add(new AcquisitionResource());
63 singletons.add(new NewRelationResource());
64 singletons.add(new VocabularyResource());
65 singletons.add(new DimensionResource());
66 singletons.add(new ContactResource());
68 // singletons.add(new QueryResource());
69 // singletons.add(new DomainIdentifierResource());
70 // singletons.add(new PingResource());
74 public Set<Class<?>> getClasses() {
79 public Set<Object> getSingletons() {