Package org.opengis.feature.type

Examples of org.opengis.feature.type.AttributeType


     * @generated
     */
    public static final AttributeType DOUBLEORNILREASONLIST_TYPE = build_DOUBLEORNILREASONLIST_TYPE();
    
    private static AttributeType build_DOUBLEORNILREASONLIST_TYPE() {
        AttributeType builtType = new AbstractLazyAttributeTypeImpl(
                new NameImpl("http://www.opengis.net/gml/3.2","doubleOrNilReasonList"),
                java.lang.Object.class, false, false, null, null) {
            @Override
            public AttributeType buildSuper() {
                return XSSchema.ANYSIMPLETYPE_TYPE;
View Full Code Here


     * @generated
     */
    public static final AttributeType INTEGERLIST_TYPE = build_INTEGERLIST_TYPE();
    
    private static AttributeType build_INTEGERLIST_TYPE() {
        AttributeType builtType = new AbstractLazyAttributeTypeImpl(
                new NameImpl("http://www.opengis.net/gml/3.2","integerList"),
                java.lang.Object.class, false, false, null, null) {
            @Override
            public AttributeType buildSuper() {
                return XSSchema.ANYSIMPLETYPE_TYPE;
View Full Code Here

       
        try {
            parsedTypes.addSchemas(schemaIndex);
   
            Name typeName = Types.typeName(NS_URI, "simpleFeatureType");
            AttributeType type = parsedTypes.getAttributeType(typeName);
            Assert.assertNotNull(type);
            Assert.assertTrue(type.getClass().getName(), type instanceof ComplexType);
            Assert.assertTrue(type.getUserData().get(XSDTypeDefinition.class) instanceof XSDComplexTypeDefinition);
   
            ComplexType ft = (ComplexType) type;
            String local = ft.getName().getLocalPart();
            String uri = ft.getName().getNamespaceURI();
            Assert.assertEquals("simpleFeatureType", local);
View Full Code Here

        }
    }

    private void assertSimpleAttribute(AttributeDescriptor descriptor, Name name, Name typeName,
            Class<?> binding, int minOccurs, int maxOccurs) {
        AttributeType type;
        Assert.assertEquals(name, descriptor.getName());
        Assert.assertEquals(minOccurs, descriptor.getMinOccurs());
        Assert.assertEquals(maxOccurs, descriptor.getMaxOccurs());
        Assert.assertTrue(descriptor.getUserData().get(XSDElementDeclaration.class) instanceof XSDElementDeclaration);

        type = (AttributeType) descriptor.getType();
        Assert.assertNotNull(type);
        Assert.assertFalse(type instanceof ComplexType);
        Assert.assertEquals(typeName, type.getName());
        Assert.assertEquals(binding, type.getBinding());
        // they're prebuilt types, does not contains the emf information
        // assertTrue(type.getUserData(EmfAppSchemaReader.EMF_USERDATA_KEY)
        // instanceof XSDTypeDefinition);
    }
View Full Code Here

        AppSchemaFeatureTypeRegistry typeRegistry = new AppSchemaFeatureTypeRegistry();
        try {
            typeRegistry.addSchemas(schemaIndex);
           
            Name typeName = Types.typeName(NS_URI, "wq_plus_Type");
            AttributeType type = (AttributeType) typeRegistry.getAttributeType(typeName);
            Assert.assertTrue(type instanceof FeatureType);
            Assert.assertFalse(type instanceof SimpleFeatureType);
            Assert.assertEquals(typeName, type.getName());
            Assert.assertTrue(type.getUserData().get(XSDTypeDefinition.class) instanceof XSDComplexTypeDefinition);
   
            FeatureType wq_plus_Type = (FeatureType) type;
   
            // I do not think types have default geometries any more.
            // assertNotNull(wq_plus_Type.getDefaultGeometry());
            Assert.assertNotNull(wq_plus_Type.getSuper());
            typeName = Types.typeName(GML.NAMESPACE, GML.AbstractFeatureType.getLocalPart());
            Assert.assertEquals(typeName, wq_plus_Type.getSuper().getName());
            Assert.assertNotNull(wq_plus_Type.getDescriptors());
            Assert.assertEquals(8, ((ComplexFeatureTypeImpl) wq_plus_Type).getTypeDescriptors().size());
   
            Name name = Types.typeName(NS_URI, "wq_plus");
            AttributeDescriptor wqPlusDescriptor = typeRegistry.getDescriptor(name, null);
            Assert.assertNotNull(wqPlusDescriptor);
            Assert.assertEquals(name, wqPlusDescriptor.getName());
            Assert.assertSame(wq_plus_Type, wqPlusDescriptor.getType());
            Assert.assertTrue(wqPlusDescriptor.getUserData().get(XSDElementDeclaration.class) instanceof XSDElementDeclaration);
   
            typeName = Types.typeName(NS_URI, "measurementType");
            type = typeRegistry.getAttributeType(typeName);
            Assert.assertTrue(type instanceof ComplexType);
            Assert.assertFalse(type instanceof FeatureType);
            Assert.assertTrue(type.getUserData().get(XSDTypeDefinition.class) instanceof XSDComplexTypeDefinition);
   
            ComplexType measurementType = (ComplexType) type;
            Assert.assertEquals(typeName, measurementType.getName());
            Assert.assertTrue(measurementType.isIdentified());
            Assert.assertFalse(measurementType.isAbstract());
View Full Code Here

        AppSchemaFeatureTypeRegistry registry = new AppSchemaFeatureTypeRegistry();
        try {
            registry.addSchemas(schemaIndex);
   
            Name tcl = Types.typeName(NS_URI, "TypedCategoryListType");
            AttributeType typedCategoryListType = registry.getAttributeType(tcl);
            Assert.assertNotNull(typedCategoryListType);
            Assert.assertTrue(typedCategoryListType instanceof ComplexType);
   
            AttributeType superType = typedCategoryListType.getSuper();
            Assert.assertNotNull(superType);
            Name superName = superType.getName();
            Assert.assertEquals(XS.STRING.getNamespaceURI(), superName.getNamespaceURI());
            Assert.assertEquals(XS.STRING.getLocalPart(), superName.getLocalPart());
   
            Assert.assertNotNull(typedCategoryListType.getUserData().get(XSDTypeDefinition.class));
        }
View Full Code Here

    @Test
    public void testGML32Declared() {
        AppSchemaFeatureTypeRegistry registry = new AppSchemaFeatureTypeRegistry(gml32NS);
        registry.addSchemas(schemaIndex);
        AttributeType type = registry.getAttributeType(BOREHOLE_TYPE);
        assertTrue(type instanceof FeatureType);
    }
View Full Code Here

        // GEOT-4756: no namespace support provided.. due to namespaces not set in
        // mapping file. This is legitimate if the mapping doesn't use any GML attributes.
        // Previously, this won't work.
        AppSchemaFeatureTypeRegistry registry = new AppSchemaFeatureTypeRegistry();
        registry.addSchemas(schemaIndex);
        AttributeType type = registry.getAttributeType(BOREHOLE_TYPE);
        assertTrue(type instanceof FeatureType);
    }
View Full Code Here

            final ComplexType testType = (ComplexType) typeRegistry.getAttributeType(typeName);
   
            assertNotNull(testType);
            assertTrue(testType instanceof FeatureType);
   
            AttributeType superType = testType.getSuper();
            assertNotNull(superType);
   
            Name superTypeName = Types.typeName(AWNS, "SamplingSitePurposeType");
            assertEquals(superTypeName, superType.getName());
            // assertTrue(superType instanceof FeatureType);
   
            // ensure all needed types were parsed and aren't just empty proxies
            Map samplingProperties = new HashMap();
   
View Full Code Here

            Name dName = (Name) entry.getKey();
            Name expectedDescriptorTypeName = (Name) entry.getValue();

            AttributeDescriptor d = (AttributeDescriptor) Types.descriptor(parentType, dName);
            assertNotNull("Descriptor " + dName + " not found for type " + parentType.getName(), d);
            AttributeType type;
            try {
                type = (AttributeType) d.getType();
            } catch (Exception e) {
                LOGGER.log(Level.SEVERE, "type not parsed for "
                        + ((AttributeDescriptor) d).getName(), e);
                throw e;
            }
            assertNotNull(type);
            Name actualTypeName = type.getName();
            assertNotNull(actualTypeName);
            assertNotNull(type.getBinding());
            if (expectedDescriptorTypeName != null) {
                assertEquals("type mismatch for property " + dName, expectedDescriptorTypeName,
                        actualTypeName);
            }
        }
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.AttributeType

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.