Search in sources :

Example 1 with DefaultDistributor

use of org.apache.sis.metadata.iso.distribution.DefaultDistributor in project geotoolkit by Geomatys.

the class WriterTest method createMetadata.

/**
 * Creates the metadata object corresponding to the {@link #JSON} string.
 */
static DefaultMetadata createMetadata() {
    final AbstractIdentification identification = new AbstractIdentification();
    identification.setCitation(new DefaultCitation("Data \"title\""));
    identification.setExtents(singleton(new DefaultExtent(null, new DefaultGeographicBoundingBox(-11.4865013, -4.615912, 43.165467, 49.9990223), null, null)));
    final DefaultDistribution distribution = new DefaultDistribution();
    distribution.setDistributors(asList(new DefaultDistributor(new DefaultResponsibility(Role.AUTHOR, null, null)), new DefaultDistributor(new DefaultResponsibility(Role.COLLABORATOR, null, null))));
    final DefaultMetadata metadata = new DefaultMetadata();
    metadata.setFileIdentifier("An archive");
    metadata.setMetadataStandardName("ISO19115");
    metadata.setMetadataStandardVersion("2003/Cor.1:2006");
    metadata.setIdentificationInfo(singleton(identification));
    metadata.setDistributionInfo(singleton(distribution));
    return metadata;
}
Also used : DefaultResponsibility(org.apache.sis.metadata.iso.citation.DefaultResponsibility) DefaultGeographicBoundingBox(org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox) DefaultExtent(org.apache.sis.metadata.iso.extent.DefaultExtent) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation) AbstractIdentification(org.apache.sis.metadata.iso.identification.AbstractIdentification) DefaultMetadata(org.apache.sis.metadata.iso.DefaultMetadata) DefaultDistribution(org.apache.sis.metadata.iso.distribution.DefaultDistribution) DefaultDistributor(org.apache.sis.metadata.iso.distribution.DefaultDistributor)

Aggregations

DefaultMetadata (org.apache.sis.metadata.iso.DefaultMetadata)1 DefaultCitation (org.apache.sis.metadata.iso.citation.DefaultCitation)1 DefaultResponsibility (org.apache.sis.metadata.iso.citation.DefaultResponsibility)1 DefaultDistribution (org.apache.sis.metadata.iso.distribution.DefaultDistribution)1 DefaultDistributor (org.apache.sis.metadata.iso.distribution.DefaultDistributor)1 DefaultExtent (org.apache.sis.metadata.iso.extent.DefaultExtent)1 DefaultGeographicBoundingBox (org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox)1 AbstractIdentification (org.apache.sis.metadata.iso.identification.AbstractIdentification)1