Package org.geotools.feature.type

Examples of org.geotools.feature.type.SchemaImpl


  static final String URI = "gopher://localhost/test";
 
  SimpleFeatureTypeBuilder builder;
 
  protected void setUp() throws Exception {
    Schema schema = new SchemaImpl( "test" );
   
    FeatureTypeFactoryImpl typeFactory = new FeatureTypeFactoryImpl();
    AttributeType pointType =
      typeFactory.createGeometryType( new NameImpl( "test", "pointType" ), Point.class, null, false, false, Collections.EMPTY_LIST, null, null);   
    schema.put( new NameImpl( "test", "pointType" ), pointType );
   
    AttributeType intType =
      typeFactory.createAttributeType( new NameImpl( "test", "intType" ), Integer.class, false, false, Collections.EMPTY_LIST, null, null);
    schema.put( new NameImpl( "test", "intType" ), intType );
   
    builder = new SimpleFeatureTypeBuilder( new FeatureTypeFactoryImpl() );
    builder.setBindings(schema);
  }
View Full Code Here


                    }
                }
            }
        }

        Schema gtSchema = new SchemaImpl(schema.getTargetNamespace());

        for (Iterator itr = types.values().iterator(); itr.hasNext();) {
            AttributeType gtType = (AttributeType) itr.next();
            if (gtType.getName().getLocalPart() == null ) {
              throw new NullPointerException();
            }
            gtSchema.put(gtType.getName(), gtType);
        }

        Object[] input = new Object[] {
                gtSchema, Schemas.getTargetPrefix(schema), this
            };
View Full Code Here

     * @param version
     */
    protected void init() {
        List<Schema> schemas = new ArrayList<Schema>();
        schemas.add(new XSSchema().profile()); // encoding of common java types
        Schema hack = new SchemaImpl(XS.NAMESPACE);

        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        builder.setName("date");
        builder.setBinding(Date.class);
        hack.put(new NameImpl(XS.DATETIME), builder.buildType());

        schemas.add(hack);

        // GML 2
        //
View Full Code Here

    /**
     * Sets up the schema which maps xml schema types to attribute types.
     */
    protected Schema buildTypeSchema() {
        return new SchemaImpl( getNamespaceURI() );
    }
View Full Code Here

TOP

Related Classes of org.geotools.feature.type.SchemaImpl

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.