Search in sources :

Example 6 with DefaultResponsibleParty

use of org.apache.sis.metadata.iso.citation.DefaultResponsibleParty in project sis by apache.

the class DirectReferenceSystemTest method createMetadata.

/**
 * Creates the metadata object to be tested.
 *
 * @param  legacy  {@code true} for using the legacy {@code ResponsibleParty} instead of {@code Responsibility}.
 *                 This is sometime needed for comparison purpose with unmarshalled metadata.
 */
@SuppressWarnings("deprecation")
private static DefaultMetadata createMetadata(final boolean legacy) {
    final DefaultMetadata metadata = new DefaultMetadata();
    final DefaultCitation citation = new DefaultCitation("EPSG Geodetic Parameter Dataset");
    Collection<ResponsibleParty> r = HardCodedCitations.EPSG.getCitedResponsibleParties();
    if (legacy) {
        r = singleton(new DefaultResponsibleParty(TestUtilities.getSingleton(r)));
    }
    citation.setCitedResponsibleParties(r);
    final DirectReferenceSystem refSys = new DirectReferenceSystem(new ImmutableIdentifier(citation, null, "4326"));
    metadata.setReferenceSystemInfo(singleton(refSys));
    return metadata;
}
Also used : DefaultResponsibleParty(org.apache.sis.metadata.iso.citation.DefaultResponsibleParty) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation) DefaultMetadata(org.apache.sis.metadata.iso.DefaultMetadata) ResponsibleParty(org.opengis.metadata.citation.ResponsibleParty) DefaultResponsibleParty(org.apache.sis.metadata.iso.citation.DefaultResponsibleParty) ImmutableIdentifier(org.apache.sis.metadata.iso.ImmutableIdentifier)

Aggregations

DefaultResponsibleParty (org.apache.sis.metadata.iso.citation.DefaultResponsibleParty)6 DefaultCitation (org.apache.sis.metadata.iso.citation.DefaultCitation)5 ImmutableIdentifier (org.apache.sis.metadata.iso.ImmutableIdentifier)2 DefaultIndividual (org.apache.sis.metadata.iso.citation.DefaultIndividual)2 DefaultOrganisation (org.apache.sis.metadata.iso.citation.DefaultOrganisation)2 SimpleInternationalString (org.apache.sis.util.iso.SimpleInternationalString)2 ResponsibleParty (org.opengis.metadata.citation.ResponsibleParty)2 DefaultMetadata (org.apache.sis.metadata.iso.DefaultMetadata)1 AbstractParty (org.apache.sis.metadata.iso.citation.AbstractParty)1 DefaultAddress (org.apache.sis.metadata.iso.citation.DefaultAddress)1 DefaultCitationTest (org.apache.sis.metadata.iso.citation.DefaultCitationTest)1 DefaultContact (org.apache.sis.metadata.iso.citation.DefaultContact)1 DefaultResponsibility (org.apache.sis.metadata.iso.citation.DefaultResponsibility)1 DefaultProcessing (org.apache.sis.metadata.iso.lineage.DefaultProcessing)1 Test (org.junit.Test)1 Identifier (org.opengis.metadata.Identifier)1 Citation (org.opengis.metadata.citation.Citation)1 PresentationForm (org.opengis.metadata.citation.PresentationForm)1 InternationalString (org.opengis.util.InternationalString)1