Search in sources :

Example 1 with DefaultImageDescription

use of org.apache.sis.metadata.iso.content.DefaultImageDescription in project sis by apache.

the class TreeTableFormatTest method testImageDescription.

/**
 * Tests the formatting of a {@link DefaultImageDescription} object.
 */
@Test
public void testImageDescription() {
    final DefaultImageDescription image = new DefaultImageDescription();
    image.setAttributeGroups(Arrays.asList(new DefaultAttributeGroup(null, createBand(0.25, 0.26)), new DefaultAttributeGroup(null, createBand(0.28, 0.29))));
    final String text = format.format(image.asTreeTable());
    assertMultilinesEquals("Image description\n" + "  ├─Attribute group (1 of 2)\n" + "  │   └─Attribute\n" + "  │       ├─Max value………………… 0.26\n" + "  │       ├─Min value………………… 0.25\n" + "  │       └─Units…………………………… cm\n" + "  └─Attribute group (2 of 2)\n" + "      └─Attribute\n" + "          ├─Max value………………… 0.29\n" + "          ├─Min value………………… 0.28\n" + "          └─Units…………………………… cm\n", text);
}
Also used : DefaultImageDescription(org.apache.sis.metadata.iso.content.DefaultImageDescription) SimpleInternationalString(org.apache.sis.util.iso.SimpleInternationalString) DefaultAttributeGroup(org.apache.sis.metadata.iso.content.DefaultAttributeGroup) Test(org.junit.Test) DefaultCitationTest(org.apache.sis.metadata.iso.citation.DefaultCitationTest)

Example 2 with DefaultImageDescription

use of org.apache.sis.metadata.iso.content.DefaultImageDescription 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;
}
Also used : DefaultImageDescription(org.apache.sis.metadata.iso.content.DefaultImageDescription) DefaultFeatureCatalogueDescription(org.apache.sis.metadata.iso.content.DefaultFeatureCatalogueDescription) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation) DefaultMetadata(org.apache.sis.metadata.iso.DefaultMetadata) DefaultIdentifier(org.apache.sis.metadata.iso.DefaultIdentifier)

Example 3 with DefaultImageDescription

use of org.apache.sis.metadata.iso.content.DefaultImageDescription 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;
}
Also used : DefaultImageDescription(org.apache.sis.metadata.iso.content.DefaultImageDescription) DefaultFeatureCatalogueDescription(org.apache.sis.metadata.iso.content.DefaultFeatureCatalogueDescription) DefaultCitation(org.apache.sis.metadata.iso.citation.DefaultCitation) DefaultMetadata(org.apache.sis.metadata.iso.DefaultMetadata) DefaultCoverageDescription(org.apache.sis.metadata.iso.content.DefaultCoverageDescription) DefaultIdentifier(org.apache.sis.metadata.iso.DefaultIdentifier)

Aggregations

DefaultImageDescription (org.apache.sis.metadata.iso.content.DefaultImageDescription)3 DefaultIdentifier (org.apache.sis.metadata.iso.DefaultIdentifier)2 DefaultMetadata (org.apache.sis.metadata.iso.DefaultMetadata)2 DefaultCitation (org.apache.sis.metadata.iso.citation.DefaultCitation)2 DefaultFeatureCatalogueDescription (org.apache.sis.metadata.iso.content.DefaultFeatureCatalogueDescription)2 DefaultCitationTest (org.apache.sis.metadata.iso.citation.DefaultCitationTest)1 DefaultAttributeGroup (org.apache.sis.metadata.iso.content.DefaultAttributeGroup)1 DefaultCoverageDescription (org.apache.sis.metadata.iso.content.DefaultCoverageDescription)1 SimpleInternationalString (org.apache.sis.util.iso.SimpleInternationalString)1 Test (org.junit.Test)1