<!-- new claim as of 8.1.0 -->
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim.service</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim.service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
import org.collectionspace.services.index.IndexResource;
import org.collectionspace.services.loanin.LoaninResource;
import org.collectionspace.services.loanout.LoanoutResource;
-import org.collectionspace.services.nagpraclaim.NagpraClaimResource;
+import org.collectionspace.services.repatriationclaim.RepatriationClaimResource;
import org.collectionspace.services.nagprainventory.NagpraInventoryResource;
import org.collectionspace.services.summarydocumentation.SummaryDocumentationResource;
import org.collectionspace.services.transport.TransportResource;
addResourceToMapAndSingletons(new PropagationResource());
addResourceToMapAndSingletons(new PottagResource());
addResourceToMapAndSingletons(new ClaimResource());
- addResourceToMapAndSingletons(new NagpraClaimResource());
+ addResourceToMapAndSingletons(new RepatriationClaimResource());
addResourceToMapAndSingletons(new ReportResource());
addResourceToMapAndSingletons(new PublicItemResource());
addResourceToMapAndSingletons(new TransportResource());
FROM id_generators
);
--- NAGPRA_CLAIM_REFERENCE_NUMBER
-
-INSERT INTO id_generators
- (csid, displayname, description, priority, last_generated_id, id_generator_state)
- SELECT
- 'c4045ef4-a934-4a2e-8f92-edbf4069b64b',
- 'NAGPRA Claim Reference Number',
- 'Identifies a nagpra claim.',
- '9',
- '',
-'<org.collectionspace.services.id.SettableIDGenerator>
- <parts>
- <org.collectionspace.services.id.StringIDGeneratorPart>
- <initialValue>NCL</initialValue>
- <currentValue>NCL</currentValue>
- </org.collectionspace.services.id.StringIDGeneratorPart>
- <org.collectionspace.services.id.YearIDGeneratorPart>
- <currentValue></currentValue>
- </org.collectionspace.services.id.YearIDGeneratorPart>
- <org.collectionspace.services.id.StringIDGeneratorPart>
- <initialValue>.</initialValue>
- <currentValue>.</currentValue>
- </org.collectionspace.services.id.StringIDGeneratorPart>
- <org.collectionspace.services.id.NumericIDGeneratorPart>
- <maxLength>6</maxLength>
- <initialValue>1</initialValue>
- <currentValue>-1</currentValue>
- </org.collectionspace.services.id.NumericIDGeneratorPart>
- </parts>
-</org.collectionspace.services.id.SettableIDGenerator>'
- WHERE 'c4045ef4-a934-4a2e-8f92-edbf4069b64b' NOT IN
- (
- SELECT csid
- FROM id_generators
- );
-
-- NAGPRAINVENTORY_REFERENCE_NUMBER
INSERT INTO id_generators
</xs:sequence>
</xs:complexType>
- <xs:complexType name="alternativeTitleGroupList">
+ <xs:complexType name="alternativeIdentifierGroupList">
<xs:sequence>
- <xs:element name="alternativeTitleGroup" type="alternativeTitleGroup" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="alternativeIdentifierGroup" type="alternativeIdentifierGroup" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="alternativeTitleGroup">
+ <xs:complexType name="alternativeIdentifierGroup">
<xs:sequence>
- <xs:element name="alternativeTitle" type="xs:string" />
- <xs:element name="alternativeTitleNote" type="xs:string" />
+ <xs:element name="alternativeIdentifier" type="xs:string" />
+ <xs:element name="alternativeIdentifierNote" type="xs:string" />
</xs:sequence>
</xs:complexType>
+++ /dev/null
-/*
- * This document is a part of the source code and related artifacts
- * for CollectionSpace, an open source collections management system
- * for museums and related institutions:
- *
- * http://www.collectionspace.org
- * http://wiki.collectionspace.org
- *
- * Licensed under the Educational Community License (ECL), Version 2.0.
- * You may not use this file except in compliance with this License.
- *
- * You may obtain a copy of the ECL 2.0 License at
- * https://source.collectionspace.org/collection-space/LICENSE.txt
- */
-package org.collectionspace.services;
-
-public interface NagpraclaimJAXBSchema {}
+++ /dev/null
-/*
- * This document is a part of the source code and related artifacts
- * for CollectionSpace, an open source collections management system
- * for museums and related institutions:
- *
- * http://www.collectionspace.org
- * http://wiki.collectionspace.org
- *
- * Licensed under the Educational Community License (ECL), Version 2.0.
- * You may not use this file except in compliance with this License.
- *
- * You may obtain a copy of the ECL 2.0 License at
- * https://source.collectionspace.org/collection-space/LICENSE.txt
- */
-package org.collectionspace.services;
-
-public interface NagpraclaimListItemJAXBSchema {
- String CSID = "csid";
- String URI = "url";
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<!--
- Nagpraclaim schema (XSD)
-
- Entity : Nagpraclaim
- Part : Common
- Used for: JAXB binding between XML and Java objects
--->
-
-<xs:schema
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
- jaxb:version="1.0" elementFormDefault="unqualified"
- xmlns:ns="http://collectionspace.org/services/nagpraclaim"
- xmlns="http://collectionspace.org/services/nagpraclaim"
- targetNamespace="http://collectionspace.org/services/nagpraclaim"
- version="0.1"
->
-
-<!--
- Avoid XmlRootElement nightmare:
- See http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
--->
-
- <!-- NagpraClaim Information Group -->
- <xs:element name="nagpraclaims_common">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="claimNumber" type="xs:string" />
- <xs:element name="title" type="xs:string" />
- <xs:element name="claimDate" type="xs:date" />
- <xs:element name="types" type="types" />
- <xs:element name="notes" type="notes" />
- <xs:element name="treatmentNotes" type="treatmentNotes" />
- <xs:element name="alternativeTitleGroupList" type="alternativeTitleGroupList" />
-
- <xs:element name="partiesInvolvedGroupList" type="partiesInvolvedGroupList" />
- <xs:element name="geographicPlaceGroupList" type="geographicPlaceGroupList" />
- <xs:element name="timePeriodGroupList" type="timePeriodGroupList" />
- <xs:element name="culturalGroupList" type="culturalGroupList" />
- <xs:element name="archaeologicalSiteGroupList" type="archaeologicalSiteGroupList" />
-
- <xs:element name="nagpraStatusGroupList" type="nagpraStatusGroupList" />
- <xs:element name="nagpraDocumentationGroupList" type="nagpraDocumentationGroupList" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="types">
- <xs:sequence>
- <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="notes">
- <xs:sequence>
- <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="treatmentNotes">
- <xs:sequence>
- <xs:element name="treatmentNote" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="alternativeTitleGroupList">
- <xs:sequence>
- <xs:element name="alternativeTitleGroup" type="alternativeTitleGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="partiesInvolvedGroupList">
- <xs:sequence>
- <xs:element name="partiesInvolvedGroup" type="partiesInvolvedGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="geographicPlaceGroupList">
- <xs:sequence>
- <xs:element name="geographicPlaceGroup" type="geographicPlaceGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="timePeriodGroupList">
- <xs:sequence>
- <xs:element name="timePeriodGroup" type="timePeriodGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="culturalGroupList">
- <xs:sequence>
- <xs:element name="culturalGroup" type="culturalGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="archaeologicalSiteGroupList">
- <xs:sequence>
- <xs:element name="archaeologicalSiteGroup" type="archaeologicalSiteGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="nagpraStatusGroupList">
- <xs:sequence>
- <xs:element name="nagpraStatusGroup" type="nagpraStatusGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="nagpraDocumentationGroupList">
- <xs:sequence>
- <xs:element name="nagpraDocumentationGroup" type="nagpraDocumentationGroup" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="alternativeTitleGroup">
- <xs:sequence>
- <xs:element name="alternativeTitle" type="xs:string" />
- <xs:element name="alternativeTitleNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="partiesInvolvedGroup">
- <xs:sequence>
- <xs:element name="involvedParty" type="xs:string" />
- <xs:element name="involvedOnBehalfOf" type="xs:string" />
- <xs:element name="involvedRole" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="geographicPlaceGroup">
- <xs:sequence>
- <xs:element name="geographicPlace" type="xs:string" />
- <xs:element name="geographicPlaceNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="timePeriodGroup">
- <xs:sequence>
- <xs:element name="timePeriod" type="xs:string" />
- <xs:element name="timePeriodNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="culturalGroup">
- <xs:sequence>
- <xs:element name="culture" type="xs:string" />
- <xs:element name="cultureNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="archaeologicalSiteGroup">
- <xs:sequence>
- <xs:element name="archaeologicalSite" type="xs:string" />
- <xs:element name="archaeologicalSiteNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="nagpraStatusGroup">
- <xs:sequence>
- <xs:element name="statusGroup" type="xs:string" />
- <xs:element name="statusIndividual" type="xs:string" />
- <xs:element name="status" type="xs:string" />
- <xs:element name="statusDate" type="xs:date" />
- <xs:element name="statusNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="nagpraDocumentationGroup">
- <xs:sequence>
- <xs:element name="documentationGroup" type="xs:string" />
- <xs:element name="documentationIndividual" type="xs:string" />
- <xs:element name="documentationStatus" type="xs:string" />
- <xs:element name="documentationDate" type="xs:date" />
- <xs:element name="documentationNote" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
-</xs:schema>
+++ /dev/null
-/*
- * This document is a part of the source code and related artifacts
- * for CollectionSpace, an open source collections management system
- * for museums and related institutions:
- *
- * http://www.collectionspace.org
- * http://wiki.collectionspace.org
- *
- * Licensed under the Educational Community License (ECL), Version 2.0.
- * You may not use this file except in compliance with this License.
- *
- * You may obtain a copy of the ECL 2.0 License at
- *
- * https://source.collectionspace.org/collection-space/LICENSE.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.collectionspace.services.nagpraclaim.nuxeo;
-
-/**
- * NagpraclaimConstants specifies constants for the Nagpraclaim service
- *
- */
-public class NagpraClaimConstants {
-
- public static final String NUXEO_DOCTYPE = "Nagpraclaim";
- public static final String NUXEO_SCHEMA_NAME = "nagpraclaim";
- public static final String NUXEO_DC_TITLE = "CollectionSpace-Nagpraclaim";
-}
<module>publicitem</module>
<module>iterationreport</module>
<module>chronology</module>
- <module>nagpraclaim</module>
+ <module>repatriationclaim</module>
<module>nagprainventory</module>
<module>summarydocumentation</module>
<module>heldintrust</module>
-<project name="nagpraclaim" default="package" basedir=".">
+<project name="repatriationclaim" default="package" basedir=".">
<description>
- nagpraclaim service
+ repatriationclaim service
</description>
<!-- set global properties for this build -->
<property name="services.trunk" value="../.." />
<arg value="${mvn.opts}" />
</exec>
</target>
-</project>
\ No newline at end of file
+</project>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.nagpraclaim.client</artifactId>
- <name>services.nagpraclaim.client</name>
+ <artifactId>org.collectionspace.services.repatriationclaim.client</artifactId>
+ <name>services.repatriationclaim.client</name>
<dependencies>
<!-- CollectionSpace dependencies -->
- <dependency>
- <groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.authority.jaxb</artifactId>
- <optional>true</optional>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.jaxb</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.common</artifactId>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
<artifactId>org.collectionspace.services.client</artifactId>
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim.jaxb</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.person.client</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim.jaxb</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-nagpraclaim-client</finalName>
+ <finalName>collectionspace-services-repatriationclaim-client</finalName>
</build>
</project>
\ No newline at end of file
*/
package org.collectionspace.services.client;
-import org.collectionspace.services.nagpraclaim.NagpraclaimsCommon;
+import org.collectionspace.services.repatriationclaim.RepatriationClaimsCommon;
/**
- * NagpraclaimClient.java
+ * RepatriationClaimClient.java
*/
-public class NagpraClaimClient extends AbstractCommonListPoxServiceClientImpl<NagpraClaimProxy, NagpraclaimsCommon> {
+public class RepatriationClaimClient extends AbstractCommonListPoxServiceClientImpl<RepatriationClaimProxy, RepatriationClaimsCommon> {
- public static final String SERVICE_NAME = "nagpraclaims";
+ public static final String SERVICE_NAME = "repatriationclaims";
public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
- public NagpraClaimClient() throws Exception {
+ public RepatriationClaimClient() throws Exception {
super();
}
- public NagpraClaimClient(String clientPropertiesFilename) throws Exception {
+ public RepatriationClaimClient(String clientPropertiesFilename) throws Exception {
super(clientPropertiesFilename);
}
}
@Override
- public Class<NagpraClaimProxy> getProxyClass() {
- return NagpraClaimProxy.class;
+ public Class<RepatriationClaimProxy> getProxyClass() {
+ return RepatriationClaimProxy.class;
}
}
import javax.ws.rs.Produces;
/**
- * NagpraClaimProxy.java
+ * RepatriationClaimProxy.java
*/
-@Path(NagpraClaimClient.SERVICE_PATH_PROXY)
+@Path(RepatriationClaimClient.SERVICE_PATH_PROXY)
@Produces({"application/xml"})
@Consumes({"application/xml"})
-public interface NagpraClaimProxy extends CollectionSpaceCommonListPoxProxy {}
+public interface RepatriationClaimProxy extends CollectionSpaceCommonListPoxProxy {}
import javax.ws.rs.core.Response;
import org.collectionspace.services.client.AbstractCommonListUtils;
import org.collectionspace.services.client.CollectionSpaceClient;
-import org.collectionspace.services.client.NagpraClaimClient;
+import org.collectionspace.services.client.RepatriationClaimClient;
import org.collectionspace.services.client.PayloadInputPart;
import org.collectionspace.services.client.PayloadOutputPart;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.nagpraclaim.NagpraclaimsCommon;
+import org.collectionspace.services.repatriationclaim.RepatriationClaimsCommon;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
-public class NagpraClaimServiceTest extends AbstractPoxServiceTestImpl<AbstractCommonList, NagpraclaimsCommon> {
+public class RepatriationClaimServiceTest extends AbstractPoxServiceTestImpl<AbstractCommonList, RepatriationClaimsCommon> {
- private final Logger logger = LoggerFactory.getLogger(NagpraClaimServiceTest.class);
+ private final Logger logger = LoggerFactory.getLogger(RepatriationClaimServiceTest.class);
/** The service path component. */
- final String SERVICE_NAME = "nagpraclaims";
+ final String SERVICE_NAME = "repatriationclaims";
- final String SERVICE_PATH_COMPONENT = "nagpraclaims";
+ final String SERVICE_PATH_COMPONENT = "repatriationclaims";
/* (non-Javadoc)
* @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
*/
@Override
protected CollectionSpaceClient getClientInstance() throws Exception {
- return new NagpraClaimClient();
+ return new RepatriationClaimClient();
}
@Override
protected CollectionSpaceClient getClientInstance(String clientPropertiesFilename) throws Exception {
- return new NagpraClaimClient(clientPropertiesFilename);
+ return new RepatriationClaimClient(clientPropertiesFilename);
}
/* (non-Javadoc)
setupCreate();
// Submit the request to the service and store the response.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
String identifier = createIdentifier();
- PoxPayloadOut multipart = createNagpraClaimInstance(identifier);
+ PoxPayloadOut multipart = createRepatriationClaimInstance(identifier);
String newID = null;
Response res = client.create(multipart);
try {
setupRead();
// Submit the request to the service and store the response.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.read(knownResourceId);
PoxPayloadIn input;
try {
// Get the common part of the response and verify that it is not null.
PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
- NagpraclaimsCommon common = null;
+ RepatriationClaimsCommon common = null;
if (payloadInputPart != null) {
- common = (NagpraclaimsCommon) payloadInputPart.getBody();
+ common = (RepatriationClaimsCommon) payloadInputPart.getBody();
}
Assert.assertNotNull(common);
}
setupReadNonExistent();
// Submit the request to the service and store the response.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.read(NON_EXISTENT_ID);
try {
int statusCode = res.getStatus();
// Submit the request to the service and store the response.
AbstractCommonList list;
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.readList();
assertStatusCode(res, testName);
try {
setupRead();
// Retrieve the contents of a resource to update.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.read(knownResourceId);
PoxPayloadIn input;
try {
// Extract the common part from the response.
PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
- NagpraclaimsCommon common = null;
+ RepatriationClaimsCommon common = null;
if (payloadInputPart != null) {
- common = (NagpraclaimsCommon) payloadInputPart.getBody();
+ common = (RepatriationClaimsCommon) payloadInputPart.getBody();
}
Assert.assertNotNull(common);
common.setClaimNumber("updated-" + common.getClaimNumber());
logger.debug("to be updated object");
- logger.debug(objectAsXmlString(common, NagpraclaimsCommon.class));
+ logger.debug(objectAsXmlString(common, RepatriationClaimsCommon.class));
setupUpdate();
// Extract the updated common part from the response.
payloadInputPart = input.getPart(client.getCommonPartName());
- NagpraclaimsCommon updatedNagpraClaimCommon = null;
+ RepatriationClaimsCommon updatedRepatriationClaimCommon = null;
if (payloadInputPart != null) {
- updatedNagpraClaimCommon = (NagpraclaimsCommon) payloadInputPart.getBody();
+ updatedRepatriationClaimCommon = (RepatriationClaimsCommon) payloadInputPart.getBody();
}
- Assert.assertNotNull(updatedNagpraClaimCommon);
+ Assert.assertNotNull(updatedRepatriationClaimCommon);
// Check selected fields in the updated common part.
Assert.assertEquals(
- updatedNagpraClaimCommon.getClaimNumber(),
+ updatedRepatriationClaimCommon.getClaimNumber(),
common.getClaimNumber(),
"Data in updated object did not match submitted data.");
}
// Submit the request to the service and store the response.
// Note: The ID used in this 'create' call may be arbitrary.
// The only relevant ID may be the one used in update(), below.
- NagpraClaimClient client = new NagpraClaimClient();
- PoxPayloadOut multipart = createNagpraClaimInstance(NON_EXISTENT_ID);
+ RepatriationClaimClient client = new RepatriationClaimClient();
+ PoxPayloadOut multipart = createRepatriationClaimInstance(NON_EXISTENT_ID);
Response res = client.update(NON_EXISTENT_ID, multipart);
try {
int statusCode = res.getStatus();
setupDelete();
// Submit the request to the service and store the response.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.delete(knownResourceId);
try {
int statusCode = res.getStatus();
setupDeleteNonExistent();
// Submit the request to the service and store the response.
- NagpraClaimClient client = new NagpraClaimClient();
+ RepatriationClaimClient client = new RepatriationClaimClient();
Response res = client.delete(NON_EXISTENT_ID);
try {
int statusCode = res.getStatus();
@Override
protected PoxPayloadOut createInstance(String identifier) throws Exception {
- return createNagpraClaimInstance(identifier);
+ return createRepatriationClaimInstance(identifier);
}
/**
- * Creates the nagpraclaim instance.
+ * Creates the repatriationClaim instance.
*
* @param claimNumber the exhibition number
* @return the multipart output
* @throws Exception
*/
- private PoxPayloadOut createNagpraClaimInstance(String claimNumber) throws Exception {
- NagpraclaimsCommon common = new NagpraclaimsCommon();
+ private PoxPayloadOut createRepatriationClaimInstance(String claimNumber) throws Exception {
+ RepatriationClaimsCommon common = new RepatriationClaimsCommon();
common.setClaimNumber(claimNumber);
PoxPayloadOut multipart = new PoxPayloadOut(this.getServicePathComponent());
- PayloadOutputPart commonPart = multipart.addPart(new NagpraClaimClient().getCommonPartName(), common);
+ PayloadOutputPart commonPart = multipart.addPart(new RepatriationClaimClient().getCommonPartName(), common);
- logger.debug("to be created, nagpraclaim common");
- logger.debug(objectAsXmlString(common, NagpraclaimsCommon.class));
+ logger.debug("to be created, repatriationclaim common");
+ logger.debug(objectAsXmlString(common, RepatriationClaimsCommon.class));
return multipart;
}
@Override
protected PoxPayloadOut createInstance(String commonPartName, String identifier) throws Exception {
- return createNagpraClaimInstance(identifier);
+ return createRepatriationClaimInstance(identifier);
}
@Override
- protected NagpraclaimsCommon updateInstance(NagpraclaimsCommon commonPartObject) {
+ protected RepatriationClaimsCommon updateInstance(RepatriationClaimsCommon commonPartObject) {
// TODO Auto-generated method stub
return null;
}
@Override
- protected void compareUpdatedInstances(NagpraclaimsCommon original, NagpraclaimsCommon updated) {
+ protected void compareUpdatedInstances(RepatriationClaimsCommon original, RepatriationClaimsCommon updated) {
// TODO Auto-generated method stub
}
}
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>org.collectionspace.services.nagpraclaim</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim</artifactId>
<groupId>org.collectionspace.services</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.nagpraclaim.jaxb</artifactId>
- <name>services.nagpraclaim.jaxb</name>
+ <artifactId>org.collectionspace.services.repatriationclaim.jaxb</artifactId>
+ <name>services.repatriationclaim.jaxb</name>
<dependencies>
<dependency>
<artifactId>org.collectionspace.services.jaxb</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.nagpra-jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-nagpraclaim-jaxb</finalName>
+ <finalName>collectionspace-services-repatriationclaim-jaxb</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+ RepatriationClaim schema (XSD)
+
+ Entity : RepatriationClaim
+ Part : Common
+ Used for: JAXB binding between XML and Java objects
+-->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ jaxb:version="2.0"
+ xmlns:nagpra="http://collectionspace.org/services/nagpra"
+ xmlns:ns="http://collectionspace.org/services/repatriationclaim"
+ xmlns="http://collectionspace.org/services/repatriationclaim"
+ targetNamespace="http://collectionspace.org/services/repatriationclaim"
+ version="0.1"
+>
+
+ <xs:import namespace="http://collectionspace.org/services/nagpra"
+ schemaLocation="maven:org.collectionspace.services:org.collectionspace.services.nagpra-jaxb:jar::!/nagpra_common.xsd"/>
+
+
+ <!-- RepatriationClaim Information Group -->
+ <xs:element name="repatriationclaims_common">
+ <xs:annotation>
+ <xs:appinfo>
+ <jaxb:class name="RepatriationClaimsCommon" />
+ </xs:appinfo>
+ </xs:annotation>
+
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="claimNumber" type="xs:string" />
+ <xs:element name="title" type="xs:string" />
+ <xs:element name="claimDate" type="xs:date" />
+ <xs:element name="types" type="types" />
+ <xs:element name="notes" type="notes" />
+ <xs:element name="treatmentNotes" type="nagpra:treatmentNotes" />
+ <xs:element name="alternativeIdentifierGroupList" type="nagpra:alternativeIdentifierGroupList" />
+
+ <xs:element name="partiesInvolvedGroupList" type="nagpra:partiesInvolvedGroupList" />
+ <xs:element name="geographicPlaceGroupList" type="nagpra:geographicPlaceGroupList" />
+ <xs:element name="timePeriodGroupList" type="nagpra:timePeriodGroupList" />
+ <xs:element name="culturalGroupList" type="nagpra:culturalGroupList" />
+ <xs:element name="archaeologicalSiteGroupList" type="nagpra:archaeologicalSiteGroupList" />
+
+ <xs:element name="statusGroupList" type="nagpra:statusGroupList" />
+ <xs:element name="documentationGroupList" type="nagpra:documentationGroupList" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="types">
+ <xs:sequence>
+ <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="notes">
+ <xs:sequence>
+ <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.nagpraclaim</artifactId>
- <name>services.nagpraclaim</name>
+ <artifactId>org.collectionspace.services.repatriationclaim</artifactId>
+ <name>services.repatriationclaim</name>
<packaging>pom</packaging>
<properties>
<parent>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>org.collectionspace.services.nagpraclaim.service</artifactId>
- <name>services.nagpraclaim.service</name>
+ <artifactId>org.collectionspace.services.repatriationclaim.service</artifactId>
+ <name>services.repatriationclaim.service</name>
<packaging>jar</packaging>
<dependencies>
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim.jaxb</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim.jaxb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.collectionspace.services</groupId>
- <artifactId>org.collectionspace.services.nagpraclaim.client</artifactId>
+ <artifactId>org.collectionspace.services.repatriationclaim.client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
</dependencies>
<build>
- <finalName>collectionspace-services-nagpraclaim</finalName>
+ <finalName>collectionspace-services-repatriationclaim</finalName>
</build>
</project>
\ No newline at end of file
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.nagpraclaim;
+package org.collectionspace.services.repatriationclaim;
import javax.ws.rs.Consumes;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
-import org.collectionspace.services.client.NagpraClaimClient;
+import org.collectionspace.services.client.RepatriationClaimClient;
import org.collectionspace.services.common.NuxeoBasedResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-@Path(NagpraClaimClient.SERVICE_PATH)
+@Path(RepatriationClaimClient.SERVICE_PATH)
@Consumes("application/xml")
@Produces("application/xml")
-public class NagpraClaimResource extends NuxeoBasedResource {
-
- final Logger logger = LoggerFactory.getLogger(NagpraClaimResource.class);
+public class RepatriationClaimResource extends NuxeoBasedResource {
@Override
protected String getVersionString() {
- final String lastChangeRevision = "$LastChangedRevision$";
- return lastChangeRevision;
+ return "$LastChangedRevision$";
}
@Override
public String getServiceName() {
- return NagpraClaimClient.SERVICE_NAME;
+ return RepatriationClaimClient.SERVICE_NAME;
}
@Override
- public Class<NagpraclaimsCommon> getCommonPartClass() {
- return NagpraclaimsCommon.class;
+ public Class<RepatriationClaimsCommon> getCommonPartClass() {
+ return RepatriationClaimsCommon.class;
}
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.nagpraclaim.nuxeo;
+package org.collectionspace.services.repatriationclaim.nuxeo;
-import org.collectionspace.services.nagpraclaim.NagpraclaimsCommon;
import org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler;
+import org.collectionspace.services.repatriationclaim.RepatriationClaimsCommon;
-/** NagpraClaimDocumentModelHandler
+/**
+ * RepatriationClaimDocumentModelHandler
*/
-public class NagpraClaimDocumentModelHandler extends NuxeoDocumentModelHandler<NagpraclaimsCommon> {}
+public class RepatriationClaimDocumentModelHandler extends NuxeoDocumentModelHandler<RepatriationClaimsCommon> {}
* You may obtain a copy of the ECL 2.0 License at
* https://source.collectionspace.org/collection-space/LICENSE.txt
*/
-package org.collectionspace.services.nagpraclaim.nuxeo;
+package org.collectionspace.services.repatriationclaim.nuxeo;
import org.collectionspace.services.client.PoxPayloadIn;
import org.collectionspace.services.client.PoxPayloadOut;
import org.collectionspace.services.common.document.InvalidDocumentException;
import org.collectionspace.services.common.document.ValidatorHandlerImpl;
-import org.collectionspace.services.nagpraclaim.NagpraclaimsCommon;
+import org.collectionspace.services.repatriationclaim.RepatriationClaimsCommon;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Validation handler for NagpraClaim. Checks for the common part and claimNumber on create.
+ * Validation handler for a RepatriationClaim. Checks for the common part and claimNumber on create.
*/
-public class NagpraClaimValidatorHandler extends ValidatorHandlerImpl<PoxPayloadIn, PoxPayloadOut> {
+public class RepatriationClaimValidatorHandler extends ValidatorHandlerImpl<PoxPayloadIn, PoxPayloadOut> {
- private static final String COMMON_PART_MISSING = "Validation exception: nagpraclaims_common part is missing";
+ private static final String COMMON_PART_MISSING = "Validation exception: repatriationclaims_common part is missing";
private static final String CLAIM_NUMBER_MISSING =
- "Validation exception: The nagpra claim field \"claimNumber\" cannot be empty or missing";
+ "Validation exception: The repatriation claim field \"claimNumber\" cannot be empty or missing";
- private final Logger logger = LoggerFactory.getLogger(NagpraClaimValidatorHandler.class);
+ private final Logger logger = LoggerFactory.getLogger(RepatriationClaimValidatorHandler.class);
@Override
protected Class<?> getCommonPartClass() {
- return NagpraclaimsCommon.class;
+ return RepatriationClaimsCommon.class;
}
@Override
protected void handleCreate() throws InvalidDocumentException {
- final NagpraclaimsCommon claim = (NagpraclaimsCommon) getCommonPart();
+ final RepatriationClaimsCommon claim = (RepatriationClaimsCommon) getCommonPart();
if (claim == null) {
logger.error(COMMON_PART_MISSING);
throw new InvalidDocumentException(COMMON_PART_MISSING);