]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
789bb9d926637ade93a099c192d67b989217ca16
[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.MaterialsCommon;
19
20 /**
21  * The Class MaterialAuthorityClient.
22  */
23 public class MaterialAuthorityClient extends AuthorityClientImpl<MaterialsCommon, MaterialAuthorityProxy> {
24
25     public static final String SERVICE_NAME = "materialauthorities";
26     public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
27     public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
28     public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
29     public static final String TERM_INFO_GROUP_XPATH_BASE = "materialTermGroupList";
30     //
31     // Subitem constants
32     //
33     public static final String SERVICE_ITEM_NAME = "materials";
34     public static final String SERVICE_ITEM_PAYLOAD_NAME = SERVICE_ITEM_NAME;
35     //
36     // Payload Part/Schema part names
37     //
38     public static final String SERVICE_COMMON_PART_NAME = SERVICE_NAME
39             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
40     public static final String SERVICE_ITEM_COMMON_PART_NAME = SERVICE_ITEM_NAME
41             + PART_LABEL_SEPARATOR + PART_COMMON_LABEL;
42
43     //
44     // Constructors
45     //
46     public MaterialAuthorityClient() {
47         super();
48     }
49     
50     public MaterialAuthorityClient(String clientPropertiesFilename) {
51                 super(clientPropertiesFilename);
52         }
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_NAME);
67     }
68
69     @Override
70     public Class<MaterialAuthorityProxy> getProxyClass() {
71         return MaterialAuthorityProxy.class;
72     }
73
74     @Override
75     public String getInAuthority(MaterialsCommon item) {
76         return item.getInAuthority();
77     }
78
79     @Override
80     public void setInAuthority(MaterialsCommon item, String inAuthorityCsid) {
81         item.setInAuthority(inAuthorityCsid);
82     }
83 }