<template mode="any">/layouts/layout_default_template.xhtml</template>
</templates>
<rows>
- <row><widget>addressText</widget></row>
+ <row><widget>addressType1</widget></row>
+ <row><widget>addressText1</widget></row>
<row><widget>postcode</widget></row>
- <row><widget>addressType</widget></row>
</rows>
- <widget name="addressText" type="text">
+ <widget name="addressText1" type="text">
<labels>
- <label mode="any">addressText</label>
+ <label mode="any">addressText1</label>
</labels>
<translated>true</translated>
<fields>
- <field schema="contacts_common">addressText</field>
+ <field schema="contacts_common">addressText1</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="addressType" type="text">
+ <widget name="addressType1" type="text">
<labels>
- <label mode="any">addressType</label>
+ <label mode="any">addressType1</label>
</labels>
<translated>true</translated>
<fields>
- <field schema="contacts_common">addressType</field>
+ <field schema="contacts_common">addressType1</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
Contact schema (XSD)
<!-- Note: the following is currently a representative subset -->
<!-- of the full Address Information schema specified at -->
<!-- http://wiki.collectionspace.org/display/collectionspace/Contact+Information+Schema -->
- <!-- as this schema is believed to still be in flux. -->
-
-<!-- Address Information Group -->
- <xs:element name="addressText" type="xs:string"/>
- <xs:element name="postcode" type="xs:string"/>
- <xs:element name="addressType" type="xs:string"/>
+ <!-- as this schema is still in flux. -->
+
+ <!-- The use of numbered field names, below, is an expedient for -->
+ <!-- release 0.5 ("Jupiter"). This will be handled instead in future -->
+ <!-- releases via the standard scalar repeatability methods; e.g. -->
+ <!-- minOccurs="{minValue}" maxOccurs="unbounded" attributes. -->
+
+ <!-- Initially, in release 0.5, this entire group will be repeatable, -->
+ <!-- as a result of Contact records being made a repeatable -->
+ <!-- sub-resource of Person and Organization. -->
+ <xs:element name="csid" type="xs:string" />
+ <xs:element name="addressType1" type="xs:string"/>
+ <xs:element name="addressType2" type="xs:string"/>
+ <xs:element name="addressType3" type="xs:string"/>
+ <xs:element name="addressText1" type="xs:string"/>
+ <xs:element name="addressText2" type="xs:string"/>
+ <xs:element name="addressText3" type="xs:string"/>
+ <xs:element name="postcode1" type="xs:string"/>
+ <xs:element name="postcode2" type="xs:string"/>
+ <xs:element name="postcode3" type="xs:string"/>
+ <xs:element name="email1" type="xs:string"/>
+ <xs:element name="email2" type="xs:string"/>
+ <xs:element name="email3" type="xs:string"/>
+ <xs:element name="telephoneNumber1" type="xs:string"/>
+ <xs:element name="telephoneNumber2" type="xs:string"/>
+ <xs:element name="telephoneNumber3" type="xs:string"/>
+ <xs:element name="faxNumber1" type="xs:string"/>
+ <xs:element name="faxNumber2" type="xs:string"/>
+ <xs:element name="faxNumber3" type="xs:string"/>
+ <xs:element name="notes" type="xs:string"/>
</xs:schema>
logger.debug(testName + ": list-item[" + i + "] csid=" +
item.getCsid());
logger.debug(testName + ": list-item[" + i + "] objectNumber=" +
- item.getAddressText());
+ item.getAddressText1());
logger.debug(testName + ": list-item[" + i + "] URI=" +
item.getUri());
i++;
Assert.assertNotNull(contact);
// Update the content of this resource.
- contact.setAddressText("updated-" + contact.getAddressText());
- contact.setPostcode("updated-" + contact.getPostcode());
+ contact.setAddressText1("updated-" + contact.getAddressText1());
+ contact.setPostcode1("updated-" + contact.getPostcode1());
if(logger.isDebugEnabled()){
logger.debug("to be updated object");
logger.debug(objectAsXmlString(contact, ContactsCommon.class));
client.getCommonPartName(), ContactsCommon.class);
Assert.assertNotNull(updatedContact);
- Assert.assertEquals(updatedContact.getPostcode(),
- contact.getPostcode(),
+ Assert.assertEquals(updatedContact.getPostcode1(),
+ contact.getPostcode1(),
"Data in updated object did not match submitted data.");
}
private MultipartOutput createContactInstance(String identifier) {
return createContactInstance(
- "addressText-" + identifier,
+ "addressText1-" + identifier,
"postcode-" + identifier,
- "addressType-" + identifier);
+ "addressType1-" + identifier);
}
- private MultipartOutput createContactInstance(String addressText,
- String postcode, String addressType) {
+ private MultipartOutput createContactInstance(String addressText1,
+ String postcode, String addressType1) {
ContactsCommon contact = new ContactsCommon();
- contact.setAddressText(addressText);
- contact.setPostcode(postcode);
- contact.setAddressType(addressType);
+ contact.setAddressText1(addressText1);
+ contact.setPostcode1(postcode);
+ contact.setAddressType1(addressType1);
MultipartOutput multipart = new MultipartOutput();
OutputPart commonPart =
multipart.addPart(contact, MediaType.APPLICATION_XML_TYPE);
*
*/
public interface ContactJAXBSchema {
- final static String ADDRESS_TEXT = "addressText";
- final static String POSTCODE = "postcode";
- final static String ADDRESS_TYPE = "addressType";
+ final static String ADDRESS_TYPE1 = "addressType1";
+ final static String ADDRESS_TYPE2 = "addressType2";
+ final static String ADDRESS_TYPE3 = "addressType3";
+ final static String ADDRESS_TEXT1 = "addressText1";
+ final static String ADDRESS_TEXT2 = "addressText2";
+ final static String ADDRESS_TEXT3 = "addressText3";
+ final static String POSTCODE1 = "postcode1";
+ final static String POSTCODE2 = "postcode2";
+ final static String POSTCODE3 = "postcode3";
+ final static String EMAIL1 = "email1";
+ final static String EMAIL2 = "email2";
+ final static String EMAIL3 = "email3";
+ final static String TELEPHONE_NUMBER1 = "telephoneNumber1";
+ final static String TELEPHONE_NUMBER2 = "telephoneNumber2";
+ final static String TELEPHONE_NUMBER3 = "telephoneNumber3";
+ final static String FAX_NUMBER1 = "faxNumber1";
+ final static String FAX_NUMBER2 = "faxNumber2";
+ final static String FAX_NUMBER3 = "faxNumber3";
+ final static String NOTES = "notes";
}
// TODO Revisit which information unit(s) should be returned
// in each entry, in a list of contact information.
// Should this be addressText or some other unit(s)?
- final static String ADDRESS_TEXT = "addressText";
+ final static String ADDRESS_TEXT1 = "addressText1";
final static String CSID = "csid";
final static String URI = "url";
}
<!-- Note: the following is currently a representative subset -->
<!-- of the full Address Information schema specified at -->
<!-- http://wiki.collectionspace.org/display/collectionspace/Contact+Information+Schema -->
- <!-- as this schema is believed to still be in flux. -->
+ <!-- as this schema is still in flux. -->
+
+ <!-- The use of numbered field names, below, is an expedient for -->
+ <!-- release 0.5 ("Jupiter"). This will be handled instead in future -->
+ <!-- releases via the standard scalar repeatability methods; e.g. -->
+ <!-- minOccurs="{minValue}" maxOccurs="unbounded" attributes. -->
+
+ <!-- Initially, in release 0.5, this entire group will be repeatable, -->
+ <!-- as a result of Contact records being made a repeatable -->
+ <!-- sub-resource of Person and Organization. -->
<xs:element name="contacts_common">
<xs:complexType>
<xs:sequence>
<xs:element name="csid" type="xs:string" />
- <xs:element name="addressText" type="xs:string"/>
- <xs:element name="postcode" type="xs:string"/>
- <xs:element name="addressType" type="xs:string"/>
+ <xs:element name="addressType1" type="xs:string"/>
+ <xs:element name="addressType2" type="xs:string"/>
+ <xs:element name="addressType3" type="xs:string"/>
+ <xs:element name="addressText1" type="xs:string"/>
+ <xs:element name="addressText2" type="xs:string"/>
+ <xs:element name="addressText3" type="xs:string"/>
+ <xs:element name="postcode1" type="xs:string"/>
+ <xs:element name="postcode2" type="xs:string"/>
+ <xs:element name="postcode3" type="xs:string"/>
+ <xs:element name="email1" type="xs:string"/>
+ <xs:element name="email2" type="xs:string"/>
+ <xs:element name="email3" type="xs:string"/>
+ <xs:element name="telephoneNumber1" type="xs:string"/>
+ <xs:element name="telephoneNumber2" type="xs:string"/>
+ <xs:element name="telephoneNumber3" type="xs:string"/>
+ <xs:element name="faxNumber1" type="xs:string"/>
+ <xs:element name="faxNumber2" type="xs:string"/>
+ <xs:element name="faxNumber3" type="xs:string"/>
+ <xs:element name="notes" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="contact-list-item" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
- <xs:element name="addressText" type="xs:string"
+ <xs:element name="addressText1" type="xs:string"
minOccurs="1" />
<!-- uri to retrive contact details -->
<xs:element name="uri" type="xs:anyURI"
ContactListItem clistItem = new ContactListItem();
// TODO Revisit which information unit(s) should be returned
// in each entry, in a list of contact information.
- // Should this be addressText or some other unit(s)?
- clistItem.setAddressText((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
- ContactJAXBSchema.ADDRESS_TEXT));
+ // Should this be AddressText1 or some other unit(s)?
+ clistItem.setAddressText1((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
+ ContactJAXBSchema.ADDRESS_TEXT1));
String id = NuxeoUtils.extractId(docModel.getPathAsString());
clistItem.setUri(getServiceContextPath() + id);
clistItem.setCsid(id);