Search in sources :

Example 11 with ResponsibleParty

use of org.opengis.metadata.citation.ResponsibleParty 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

ResponsibleParty (org.opengis.metadata.citation.ResponsibleParty)11 Test (org.junit.Test)5 Citation (org.opengis.metadata.citation.Citation)3 Extent (org.opengis.metadata.extent.Extent)3 ArrayList (java.util.ArrayList)2 Locale (java.util.Locale)2 CheckedArrayList (org.apache.sis.internal.util.CheckedArrayList)2 ImmutableIdentifier (org.apache.sis.metadata.iso.ImmutableIdentifier)2 DefaultCitation (org.apache.sis.metadata.iso.citation.DefaultCitation)2 DefaultResponsibleParty (org.apache.sis.metadata.iso.citation.DefaultResponsibleParty)2 DefaultDataIdentification (org.apache.sis.metadata.iso.identification.DefaultDataIdentification)2 Identifier (org.opengis.metadata.Identifier)2 CitationDate (org.opengis.metadata.citation.CitationDate)2 OnlineResource (org.opengis.metadata.citation.OnlineResource)2 Format (org.opengis.metadata.distribution.Format)2 GeographicExtent (org.opengis.metadata.extent.GeographicExtent)2 Identification (org.opengis.metadata.identification.Identification)2 InternationalString (org.opengis.util.InternationalString)2 HashMap (java.util.HashMap)1 Marshaller (javax.xml.bind.Marshaller)1