]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
5f6897b5b75fd5dd6eebefc137ac2f6c379c07bd
[tmp/jakarta-migration.git] /
1 /**     
2  * TaxonomyAuthorityClient.java
3  *
4  * {Purpose of This Class}
5  *
6  * {Other Notes Relating to This Class (Optional)}
7  *
8  * $LastChangedBy: $
9  * $LastChangedRevision$
10  * $LastChangedDate$
11  *
12  * This document is a part of the source code and related artifacts
13  * for CollectionSpace, an open source collections management system
14  * for museums and related institutions:
15  *
16  * http://www.collectionspace.org
17  * http://wiki.collectionspace.org
18  *
19  * Copyright © 2009 {Contributing Institution}
20  *
21  * Licensed under the Educational Community License (ECL), Version 2.0.
22  * You may not use this file except in compliance with this License.
23  *
24  * You may obtain a copy of the ECL 2.0 License at
25  * https://source.collectionspace.org/collection-space/LICENSE.txt
26  */
27 package org.collectionspace.services.client;
28
29 import javax.ws.rs.PathParam;
30 import javax.ws.rs.core.Response;
31
32 //import org.collectionspace.services.common.authorityref.AuthorityRefList;
33 import org.collectionspace.services.common.authorityref.AuthorityRefDocList;
34 import org.collectionspace.services.taxonomy.TaxonomyauthorityCommonList;
35 import org.collectionspace.services.taxonomy.TaxonCommonList;
36 import org.collectionspace.services.client.TaxonomyAuthorityProxy;
37
38 import org.jboss.resteasy.client.ClientResponse;
39 import org.jboss.resteasy.client.ProxyFactory;
40 import org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor;
41 import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
42 import org.jboss.resteasy.spi.ResteasyProviderFactory;
43
44 /**
45  * The Class TaxonomyAuthorityClient.
46  */
47 public class TaxonomyAuthorityClient extends AuthorityClientImpl<TaxonomyauthorityCommonList, TaxonCommonList, TaxonomyAuthorityProxy> {
48
49     public static final String SERVICE_NAME = "taxonomyauthorities";
50     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
51     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
52     public static final String SERVICE_PAYLOAD_NAME = "taxonomyauthority";
53     //
54     // Subitem constants
55     //
56     public static final String SERVICE_ITEM_NAME = "taxon";
57     public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
58     //
59     // Payload Part/Schema part names
60     //
61     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
62             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
63     public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
64             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
65
66     @Override
67     public String getServiceName() {
68         return SERVICE_NAME;
69     }
70
71     @Override
72     public String getServicePathComponent() {
73         return SERVICE_PATH_COMPONENT;
74     }
75
76     @Override
77     public String getCommonPartName() {
78         return getCommonPartName(SERVICE_PAYLOAD_NAME);
79     }
80
81     @Override
82     public String getItemCommonPartName() {
83         return getCommonPartName(SERVICE_ITEM_PAYLOAD_NAME);
84     }
85
86     @Override
87     public Class<TaxonomyAuthorityProxy> getProxyClass() {
88         return TaxonomyAuthorityProxy.class;
89     }
90
91     /*
92      * Proxied service calls.
93      */
94     /**
95      * @return list
96      * @see org.collectionspace.services.client.TaxonomyAuthorityProxy#readList()
97      */
98     public ClientResponse<TaxonomyauthorityCommonList> readList() {
99         return getProxy().readList();
100     }
101 }