use of org.apache.sis.metadata.iso.citation.DefaultAddress in project sis by apache.
the class TreeNodeTest method metadataWithHierarchy.
/**
* Creates a metadata hierarchy to be used for the tests.
* This method creates the following metadata:
*
* {@preformat text
* Citation
* ├─Title…………………………………………………………………………………………… Some title
* ├─Alternate title (1 of 2)………………………………………… First alternate title
* ├─Alternate title (2 of 2)………………………………………… Second alternate title
* ├─Edition……………………………………………………………………………………… Some edition
* ├─Cited responsible party (1 of 2)
* │ └─Organisation
* │ ├─Name…………………………………………………………………………… Some organisation
* │ └─Role…………………………………………………………………………… Distributor
* ├─Cited responsible party (2 of 2)
* │ └─Individual
* │ ├─Name…………………………………………………………………………… Some person of contact
* │ ├─Contact info
* │ │ └─Address
* │ │ └─Electronic mail address…… Some email
* │ └─Role…………………………………………………………………………… Point of contact
* ├─Presentation form (1 of 2)…………………………………… Map digital
* ├─Presentation form (2 of 2)…………………………………… map hardcopy
* └─Other citation details……………………………………………… Some other details
* }
*/
static DefaultCitation metadataWithHierarchy() {
final DefaultCitation citation = TreeNodeChildrenTest.metadataWithMultiOccurrences();
AbstractParty party = new DefaultOrganisation("Some organisation", null, null, null);
DefaultResponsibleParty responsibility = new DefaultResponsibleParty(Role.DISTRIBUTOR);
responsibility.setParties(singleton(party));
assertTrue(citation.getCitedResponsibleParties().add(responsibility));
// Add a second responsible party with deeper hierarchy.
final DefaultContact contact = new DefaultContact();
final DefaultAddress address = new DefaultAddress();
address.setElectronicMailAddresses(singleton("Some email"));
contact.setAddresses(singleton(address));
party = new DefaultIndividual("Some person of contact", null, contact);
responsibility = new DefaultResponsibleParty(Role.POINT_OF_CONTACT);
responsibility.setParties(singleton(party));
assertTrue(citation.getCitedResponsibleParties().add(responsibility));
return citation;
}
Aggregations