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;
}
Aggregations