Package org.opengis.metadata

Examples of org.opengis.metadata.ExtendedElementInformation


     *
     * @throws NoSuchMethodException Should never happen.
     */
    @Test
    public void testGetDomainValue() throws NoSuchMethodException {
        final ExtendedElementInformation information = new PropertyInformation<Double>(HardCodedCitations.ISO_19115,
                "maxRelativeHumidity", EnvironmentalRecord.class.getMethod("getMaxRelativeHumidity"), Double.class,
                DefaultEnvironmentalRecord.class.getMethod("getMaxRelativeHumidity").getAnnotation(ValueRange.class));

        final InternationalString domainValue = information.getDomainValue();
        assertNotNull(domainValue);
        assertEquals("[0.0 … 100.0]", domainValue.toString());
        assertEquals("[0 … 100]", domainValue.toString(Locale.ENGLISH));
        assertEquals("[0 … 100]", domainValue.toString(Locale.FRENCH));
        assertInstanceOf("Specific to SIS implementation.", Range.class, domainValue);
View Full Code Here


            this.informations = informations = new PropertyInformation<?>[standardCount];
        }
        if (index < 0 || index >= informations.length) {
            return null;
        }
        ExtendedElementInformation information = informations[index];
        if (information == null) {
            final Class<?> elementType = elementTypes[index];
            final String   name        = name(index, KeyNamePolicy.UML_IDENTIFIER);
            final Method   getter      = getters[index];
            ValueRange range = null;
View Full Code Here

    @Override
    final Iterator<Map.Entry<String,ExtendedElementInformation>> iterator() {
        return new Iter() {
            @Override
            public Map.Entry<String,ExtendedElementInformation> next() {
                final ExtendedElementInformation value = accessor.information(index);
                if (value == null) {
                    // PropertyAccessor.information(int) never return null if the index is valid.
                    throw new NoSuchElementException();
                }
                return new SimpleImmutableEntry<String,ExtendedElementInformation>(accessor.name(index++, keyPolicy), value);
View Full Code Here

            this.informations = informations = new PropertyInformation<?>[standardCount];
        }
        if (index < 0 || index >= informations.length) {
            return null;
        }
        ExtendedElementInformation information = informations[index];
        if (information == null) {
            final Class<?> elementType = elementTypes[index];
            final String   name        = name(index, KeyNamePolicy.UML_IDENTIFIER);
            final Method   getter      = getters[index];
            ValueRange range = null;
View Full Code Here

     *
     * @throws NoSuchMethodException Should never happen.
     */
    @Test
    public void testGetDomainValue() throws NoSuchMethodException {
        final ExtendedElementInformation information = new PropertyInformation<Double>(HardCodedCitations.ISO_19115,
                "maxRelativeHumidity", EnvironmentalRecord.class.getMethod("getMaxRelativeHumidity"), Double.class,
                DefaultEnvironmentalRecord.class.getMethod("getMaxRelativeHumidity").getAnnotation(ValueRange.class));

        final InternationalString domainValue = information.getDomainValue();
        assertNotNull(domainValue);
        assertEquals("[0.0 … 100.0]", domainValue.toString());
        assertEquals("[0 … 100]", domainValue.toString(Locale.ENGLISH));
        assertEquals("[0 … 100]", domainValue.toString(Locale.FRENCH));
        assertInstanceOf("Specific to SIS implementation.", Range.class, domainValue);
View Full Code Here

    /**
     * Tests {@link SpecialCases#information(int)}.
     */
    @Test
    public void testPropertyInformation() {
        final ExtendedElementInformation info = accessor.information(accessor.indexOf("westBoundLongitude", true));
        final InternationalString domain = info.getDomainValue();
        assertInstanceOf("Expected numerical information about range.", NumberRange.class, domain);
        final NumberRange<?> range = (NumberRange) domain;
        assertEquals(-180, range.getMinDouble(), STRICT);
        assertEquals(+180, range.getMaxDouble(), STRICT);
    }
View Full Code Here

TOP

Related Classes of org.opengis.metadata.ExtendedElementInformation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.