]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
b2f1f239f4fd2bdc3e44d3862e8e785175e6d217
[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 org.collectionspace.services.taxonomy.TaxonCommon;
30
31 /**
32  * The Class TaxonomyAuthorityClient.
33  */
34 public class TaxonomyAuthorityClient extends AuthorityClientImpl<TaxonCommon, TaxonomyAuthorityProxy> {
35
36     public static final String SERVICE_NAME = "taxonomyauthority";
37     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
38     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
39     public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
40     public static final String TERM_INFO_GROUP_XPATH_BASE = "taxonTermGroup";
41     //
42     // Subitem constants
43     //
44     public static final String SERVICE_ITEM_NAME = "taxon";
45     public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
46     //
47     // Payload Part/Schema part names
48     //
49     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
50             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
51     public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
52             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
53
54     @Override
55     public String getServiceName() {
56         return SERVICE_NAME;
57     }
58
59     @Override
60     public String getServicePathComponent() {
61         return SERVICE_PATH_COMPONENT;
62     }
63
64     @Override
65     public String getItemCommonPartName() {
66         return getCommonPartName(SERVICE_ITEM_PAYLOAD_NAME);
67     }
68
69     @Override
70     public Class<TaxonomyAuthorityProxy> getProxyClass() {
71         return TaxonomyAuthorityProxy.class;
72     }
73
74         @Override
75         public String getInAuthority(TaxonCommon item) {
76                 return item.getInAuthority();
77         }
78
79         @Override
80         public void setInAuthority(TaxonCommon item, String inAuthorityCsid) {
81                 item.setInAuthority(inAuthorityCsid);
82         }
83 }