use of org.apache.sis.metadata.iso.citation.DefaultCitation in project sis by apache.
the class DefaultServiceIdentificationTest method create.
/**
* Creates the service identification to use for testing purpose.
*/
private static DefaultServiceIdentification create() {
final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
final DefaultCoupledResource resource = DefaultCoupledResourceTest.create(factory);
resource.setResourceReferences(singleton(new DefaultCitation("WMS specification")));
final DefaultServiceIdentification id = new DefaultServiceIdentification(// serviceType
factory.createGenericName(null, "Web Map Server"), // citation
NilReason.MISSING.createNilObject(Citation.class), // abstract
"A dummy service for testing purpose.");
id.setServiceTypeVersions(singleton("1.0"));
id.setCoupledResources(singleton(resource));
id.setCouplingType(UnsupportedCodeList.valueOf("LOOSE"));
id.setContainsOperations(singleton(resource.getOperation()));
return id;
}
use of org.apache.sis.metadata.iso.citation.DefaultCitation in project sis by apache.
the class MergerTest method createSample2.
/**
* Creates a metadata sample with content information of different kind in a different order
* than the one created by {@link #createSample1()}.
*/
private static DefaultMetadata createSample2() {
final DefaultFeatureCatalogueDescription features = new DefaultFeatureCatalogueDescription();
final DefaultImageDescription image = new DefaultImageDescription();
final DefaultMetadata metadata = new DefaultMetadata();
image.setProcessingLevelCode(new DefaultIdentifier("Level 2"));
metadata.getContentInfo().add(image);
features.setFeatureCatalogueCitations(Collections.singleton(new DefaultCitation("GPX file")));
features.setIncludedWithDataset(Boolean.TRUE);
metadata.getContentInfo().add(features);
metadata.getLanguages().add(Locale.FRENCH);
return metadata;
}
use of org.apache.sis.metadata.iso.citation.DefaultCitation in project sis by apache.
the class MergerTest method createSample1.
/**
* Creates a metadata sample with 3 content information of different kind.
*/
private static DefaultMetadata createSample1() {
final DefaultFeatureCatalogueDescription features = new DefaultFeatureCatalogueDescription();
final DefaultCoverageDescription coverage = new DefaultCoverageDescription();
final DefaultImageDescription image = new DefaultImageDescription();
final DefaultMetadata metadata = new DefaultMetadata();
features.setFeatureCatalogueCitations(Collections.singleton(new DefaultCitation("Shapefile")));
features.setIncludedWithDataset(Boolean.TRUE);
metadata.getContentInfo().add(features);
coverage.setProcessingLevelCode(new DefaultIdentifier("Level 1"));
metadata.getContentInfo().add(coverage);
image.setImagingCondition(ImagingCondition.CLOUD);
image.setCloudCoverPercentage(0.8);
metadata.getContentInfo().add(image);
metadata.getLanguages().add(Locale.JAPANESE);
metadata.getCharacterSets().add(StandardCharsets.UTF_16);
return metadata;
}
use of org.apache.sis.metadata.iso.citation.DefaultCitation in project sis by apache.
the class MetadataCopierTest method testCopy.
/**
* Tests {@link MetadataCopier#copy(Object)}.
*/
@Test
public void testCopy() {
final MetadataCopier copier = new MetadataCopier(MetadataStandard.ISO_19115);
final DefaultCitation original = HardCodedCitations.EPSG;
final DefaultCitation copy = (DefaultCitation) copier.copy(original);
assertNotSame(original, copy);
assertNotSame(getSingleton(original.getCitedResponsibleParties()), getSingleton(copy.getCitedResponsibleParties()));
assertEquals(original, copy);
}
use of org.apache.sis.metadata.iso.citation.DefaultCitation in project sis by apache.
the class MetadataBuilder method addOtherCitationDetails.
/**
* Adds other information required to complete the citation that is not recorded elsewhere.
* Storage location is:
*
* <ul>
* <li>{@code metadata/identificationInfo/citation/otherCitationDetails}</li>
* </ul>
*
* @param details other details, or {@code null} for no-operation.
*/
public final void addOtherCitationDetails(final CharSequence details) {
final InternationalString i18n = trim(details);
if (i18n != null) {
final DefaultCitation citation = citation();
citation.setOtherCitationDetails(append(citation.getOtherCitationDetails(), i18n));
}
}
Aggregations