]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
aa48b0423b2ab881b5822017dbf9d8af2fb160fa
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts for
3  * CollectionSpace, an open source collections management system for museums and
4  * related institutions:
5  *
6  * http://www.collectionspace.org http://wiki.collectionspace.org
7  *
8  * Copyright © 2009 The Regents of the University of California
9  *
10  * Licensed under the Educational Community License (ECL), Version 2.0. You may
11  * not use this file except in compliance with this License.
12  *
13  * You may obtain a copy of the ECL 2.0 License at
14  * https://source.collectionspace.org/collection-space/LICENSE.txt
15  */
16 package org.collectionspace.services.client;
17
18 import org.collectionspace.services.material.MaterialauthoritiesCommon;
19 import org.collectionspace.services.material.MaterialsCommon;
20
21 /**
22  * The Class MaterialAuthorityClient.
23  */
24 public class MaterialAuthorityClient extends AuthorityClientImpl<MaterialauthoritiesCommon, MaterialsCommon, MaterialAuthorityProxy> {
25
26     public static final String SERVICE_NAME = "materialauthorities";
27     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
28     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
29     public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
30     public static final String TERM_INFO_GROUP_XPATH_BASE = "materialTermGroupList";
31     //
32     // Subitem constants
33     //
34     public static final String SERVICE_ITEM_NAME = "materials";
35     public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
36     //
37     // Payload Part/Schema part names
38     //
39     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
40             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
41     public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
42             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
43
44     //
45     // Constructors
46     //
47     public MaterialAuthorityClient() throws Exception {
48         super();
49     }
50     
51     public MaterialAuthorityClient(String clientPropertiesFilename) throws Exception {
52                 super(clientPropertiesFilename);
53         }
54     
55     @Override
56     public String getServiceName() {
57         return SERVICE_NAME;
58     }
59
60     @Override
61     public String getServicePathComponent() {
62         return SERVICE_PATH_COMPONENT;
63     }
64
65     @Override
66     public String getItemCommonPartName() {
67         return getCommonPartName(SERVICE_ITEM_NAME);
68     }
69
70     @Override
71     public Class<MaterialAuthorityProxy> getProxyClass() {
72         return MaterialAuthorityProxy.class;
73     }
74
75     @Override
76     public String getInAuthority(MaterialsCommon item) {
77         return item.getInAuthority();
78     }
79
80     @Override
81     public void setInAuthority(MaterialsCommon item, String inAuthorityCsid) {
82         item.setInAuthority(inAuthorityCsid);
83     }
84 }