<!-- inAuthority is the csid of the owning OrgAuthority -->
<xs:element name="inAuthority" type="xs:string" />
<xs:element name="refName" type="xs:string"/>
- <xs:element name="displayName" type="xs:string"/>
+ <xs:element name="shortName" type="xs:string"/>
<xs:element name="longName" type="xs:string"/>
+ <xs:element name="nameAdditions" type="xs:string"/>
+ <xs:element name="contactName" type="xs:string"/>
+ <xs:element name="foundingDate" type="xs:string"/>
+ <xs:element name="dissolutionDate" type="xs:string"/>
+ <xs:element name="foundingPlace" type="xs:string"/>
+ <xs:element name="function" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:schema>
String identifier = createIdentifier();
String refName = createRefName(identifier);
MultipartOutput multipart = createOrganizationInstance(vcsid,
- identifier, refName, "Longer Name for "+identifier,
- "This is a fake organization that was created by a test method.");
+ identifier, refName, "Longer Name for "+identifier,
+ null, "joe@org.org", "1910", null, "Anytown, USA", "testing",
+ "This is a fake organization that was created by a test method." );
ClientResponse<Response> res = client.createItem(vcsid, multipart);
int statusCode = res.getStatus();
Assert.assertNotNull(organization);
// Update the contents of this resource.
- organization.setDisplayName("updated-" + organization.getDisplayName());
+ organization.setShortName("updated-" + organization.getShortName());
if(logger.isDebugEnabled()){
logger.debug("to be updated Organization");
logger.debug(objectAsXmlString(organization,
Assert.assertNotNull(updatedOrganization);
// Verify that the updated resource received the correct data.
- Assert.assertEquals(updatedOrganization.getDisplayName(),
- organization.getDisplayName(),
+ Assert.assertEquals(updatedOrganization.getShortName(),
+ organization.getShortName(),
"Data in updated Organization did not match submitted data.");
}
// The only relevant ID may be the one used in update(), below.
MultipartOutput multipart = createOrganizationInstance(
knownResourceId, NON_EXISTENT_ID, createRefName(NON_EXISTENT_ID),
- null, null);
+ null, null, null, null, null, null, null, null);
ClientResponse<MultipartInput> res =
client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);
int statusCode = res.getStatus();
}
private MultipartOutput createOrganizationInstance(String inAuthority,
- String displayName, String refName, String longName, String description) {
+ String shortName, String refName, String longName,
+ String nameAdditions, String contactName,
+ String foundingDate, String dissolutionDate, String foundingPlace,
+ String function, String description ) {
OrganizationsCommon organization = new OrganizationsCommon();
- organization.setDisplayName(displayName);
+ organization.setShortName(shortName);
if(refName!=null)
organization.setRefName(refName);
if(longName!=null)
organization.setLongName(longName);
+ if(nameAdditions!=null)
+ organization.setNameAdditions(nameAdditions);
+ if(contactName!=null)
+ organization.setContactName(contactName);
+ if(foundingDate!=null)
+ organization.setFoundingDate(foundingDate);
+ if(dissolutionDate!=null)
+ organization.setDissolutionDate(dissolutionDate);
+ if(foundingPlace!=null)
+ organization.setFoundingPlace(foundingPlace);
+ if(function!=null)
+ organization.setFunction(function);
if(description!=null)
organization.setDescription(description);
MultipartOutput multipart = new MultipartOutput();
if(logger.isDebugEnabled()){
logger.debug("Import: Create Item: \""+itemName+"\" in orgAuthorityulary: \"" + orgAuthorityName +"\"");
}
- MultipartOutput multipart = createOrganizationInstance(itemName, refName);
+ MultipartOutput multipart = createOrganizationInstance(itemName, refName,
+ null, null, null, null, null, null, null, null, null );
ClientResponse<Response> res = client.createItem(vcsid, multipart);
int statusCode = res.getStatus();
return multipart;
}
- private MultipartOutput createOrganizationInstance(
- String displayName, String refName) {
- OrganizationsCommon organization = new OrganizationsCommon();
- organization.setDisplayName(displayName);
- organization.setRefName(refName);
+ private MultipartOutput createOrganizationInstance(String inAuthority,
+ String shortName, String refName, String longName,
+ String nameAdditions, String contactName,
+ String foundingDate, String dissolutionDate, String foundingPlace,
+ String function, String description ) {
+ OrganizationsCommon organization = new OrganizationsCommon();
+ organization.setShortName(shortName);
+ if(refName!=null)
+ organization.setRefName(refName);
+ if(longName!=null)
+ organization.setLongName(longName);
+ if(nameAdditions!=null)
+ organization.setNameAdditions(nameAdditions);
+ if(contactName!=null)
+ organization.setContactName(contactName);
+ if(foundingDate!=null)
+ organization.setFoundingDate(foundingDate);
+ if(dissolutionDate!=null)
+ organization.setDissolutionDate(dissolutionDate);
+ if(foundingPlace!=null)
+ organization.setFoundingPlace(foundingPlace);
+ if(function!=null)
+ organization.setFunction(function);
+ if(description!=null)
+ organization.setDescription(description);
MultipartOutput multipart = new MultipartOutput();
- OutputPart commonPart = multipart.addPart(organization, MediaType.APPLICATION_XML_TYPE);
+ OutputPart commonPart = multipart.addPart(organization,
+ MediaType.APPLICATION_XML_TYPE);
commonPart.getHeaders().add("label", client.getItemCommonPartName());
if(logger.isDebugEnabled()){
<!-- Common identifier -->
<xs:element name="csid" type="xs:string" />
- <!-- Vocabularyitem Information Group -->
- <xs:element name="displayName" type="xs:string"/>
+ <!-- Organization Information Group -->
<xs:element name="refName" type="xs:string"/>
+ <xs:element name="shortName" type="xs:string"/>
<xs:element name="longName" type="xs:string"/>
+ <xs:element name="nameAdditions" type="xs:string"/>
+ <xs:element name="contactName" type="xs:string"/>
+ <xs:element name="foundingDate" type="xs:string"/>
+ <xs:element name="dissolutionDate" type="xs:string"/>
+ <xs:element name="foundingPlace" type="xs:string"/>
+ <xs:element name="function" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
private MultipartOutput createOrganizationInstance(\r
String displayName, String refName) {\r
OrganizationsCommon organization = new OrganizationsCommon();\r
- organization.setDisplayName(displayName);\r
+ organization.setShortName(displayName);\r
organization.setRefName(refName);\r
MultipartOutput multipart = new MultipartOutput();\r
OutputPart commonPart = multipart.addPart(organization, MediaType.APPLICATION_XML_TYPE);\r