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