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;
36 import org.collectionspace.services.organization.OrgAuthorityResource;
37 import org.collectionspace.services.person.PersonAuthorityResource;
39 //import org.collectionspace.services.query.QueryResource;
41 import javax.ws.rs.core.Application;
42 import java.util.HashSet;
46 * CollectionSpaceJaxRsApplication, the root application
47 * for enumerating Resource classes in the Services Layer,
48 * which in turn respond to and route REST-based requests.
50 * $LastChangedRevision$
54 public class CollectionSpaceJaxRsApplication extends Application {
56 private Set<Object> singletons = new HashSet<Object>();
57 private Set<Class<?>> empty = new HashSet<Class<?>>();
59 public CollectionSpaceJaxRsApplication() {
60 singletons.add(new AccountResource());
61 singletons.add(new CollectionObjectResource());
62 singletons.add(new IDResource());
63 singletons.add(new IntakeResource());
64 singletons.add(new AcquisitionResource());
65 singletons.add(new NewRelationResource());
66 singletons.add(new VocabularyResource());
67 singletons.add(new OrgAuthorityResource());
68 singletons.add(new PersonAuthorityResource());
69 singletons.add(new DimensionResource());
70 singletons.add(new ContactResource());
72 // singletons.add(new QueryResource());
73 // singletons.add(new DomainIdentifierResource());
74 // singletons.add(new PingResource());
78 public Set<Class<?>> getClasses() {
83 public Set<Object> getSingletons() {