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