Package org.geotools.feature.simple

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.nillable()


       
        for ( int i = 0; i < names.size(); i++ ) {
            String attName = names.get( i );
            if ( mandatory.contains( attName ) ) {
                b.minOccurs( 1 );
                b.nillable(false);
            }
            if ( "description".equalsIgnoreCase( attName) ) {
                b.length( 5000 );
            }
           
View Full Code Here


        typeBuilder.setNamespaceURI(TEST.TestFeature.getNamespaceURI());

        typeBuilder.add("name", String.class);
        typeBuilder.add("description", String.class);
        typeBuilder.add("geom", Point.class);
        typeBuilder.nillable(true);
        typeBuilder.add("count", Integer.class);
        typeBuilder.nillable(true);
        typeBuilder.add("date", Date.class);

        SimpleFeatureType type = (SimpleFeatureType) typeBuilder.buildFeatureType();
View Full Code Here

        typeBuilder.add("name", String.class);
        typeBuilder.add("description", String.class);
        typeBuilder.add("geom", Point.class);
        typeBuilder.nillable(true);
        typeBuilder.add("count", Integer.class);
        typeBuilder.nillable(true);
        typeBuilder.add("date", Date.class);

        SimpleFeatureType type = (SimpleFeatureType) typeBuilder.buildFeatureType();

        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);
View Full Code Here

    }
   
    @Test
    public void testNullableAttributes() {
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.nillable(true);
        tb.add("a", String.class);
        tb.nillable(false);
        tb.add("b", String.class);
        tb.nillable(true);
        tb.add("c", String.class);
View Full Code Here

    @Test
    public void testNullableAttributes() {
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.nillable(true);
        tb.add("a", String.class);
        tb.nillable(false);
        tb.add("b", String.class);
        tb.nillable(true);
        tb.add("c", String.class);
        tb.setName("test");
        SimpleFeatureType schema = tb.buildFeatureType();
View Full Code Here

        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.nillable(true);
        tb.add("a", String.class);
        tb.nillable(false);
        tb.add("b", String.class);
        tb.nillable(true);
        tb.add("c", String.class);
        tb.setName("test");
        SimpleFeatureType schema = tb.buildFeatureType();
       
        PropertyIsBetween between = ff.between(ff.property("a"), ff.property("b"), ff.property("c"));
View Full Code Here

    }

    public void testBogusCreation() throws Exception {
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName( "test1" );
        tb.nillable(false).add( "billy", String.class );
        tb.nillable(false).add( "jimmy", String.class );
       
        SimpleFeatureType test = tb.buildFeatureType();
//        try {
//            SimpleFeatureBuilder.build(test, (Object[])null, null);
View Full Code Here

    public void testBogusCreation() throws Exception {
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setName( "test1" );
        tb.nillable(false).add( "billy", String.class );
        tb.nillable(false).add( "jimmy", String.class );
       
        SimpleFeatureType test = tb.buildFeatureType();
//        try {
//            SimpleFeatureBuilder.build(test, (Object[])null, null);
//            fail("no error");
View Full Code Here

                    if(Point.class.isAssignableFrom(binding)) {
                        tb.add(ad);
                    } else {
                        tb.minOccurs(ad.getMinOccurs());
                        tb.maxOccurs(ad.getMaxOccurs());
                        tb.nillable(ad.isNillable());
                        tb.add(ad.getLocalName(), Point.class, gd.getCoordinateReferenceSystem());
                    }
                } else {
                    tb.add(ad);
                }
View Full Code Here

                            throw new RuntimeException("Don't know how to handle geometries of type "
                                    + binding.getCanonicalName());
                        }
                        tb.minOccurs(ad.getMinOccurs());
                        tb.maxOccurs(ad.getMaxOccurs());
                        tb.nillable(ad.isNillable());
                        tb.add(ad.getLocalName(), target, gd.getCoordinateReferenceSystem());
                    }
                } else {
                    tb.add(ad);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.