throw new SchemaException("Can only specify a single super type"); tb.setSuperType(superTypes[0]); tb.setSuperType(ABSTRACT_FEATURE_TYPE);
@Override protected SimpleFeatureType buildFeatureType() throws IOException { List<AttributeDescriptor> types = readAttributes(); SimpleFeatureType parent = null; GeometryDescriptor geomDescriptor = (GeometryDescriptor) types.get(0); Class<?> geomBinding = geomDescriptor.getType().getBinding(); if ((geomBinding == Point.class) || (geomBinding == MultiPoint.class)) { parent = BasicFeatureTypes.POINT; } else if ((geomBinding == Polygon.class) || (geomBinding == MultiPolygon.class)) { parent = BasicFeatureTypes.POLYGON; } else if ((geomBinding == LineString.class) || (geomBinding == MultiLineString.class)) { parent = BasicFeatureTypes.LINE; } SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder(); builder.setDefaultGeometry(geomDescriptor.getLocalName()); builder.addAll(types); builder.setName(entry.getName()); builder.setAbstract(false); if (parent != null) { builder.setSuperType(parent); } return builder.buildFeatureType(); }
builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
tb.setName("B"); tb.setNamespaceURI(uri); tb.setSuperType(typeA); tb.add("b", String.class); final SimpleFeatureType typeB = tb.buildFeatureType(); tb.setName("C"); tb.setNamespaceURI(uri); tb.setSuperType(typeB); tb.add("c", Integer.class); final SimpleFeatureType typeC = tb.buildFeatureType();
builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
tb.setSuperType((SimpleFeatureType) schema.getSuper());
tb.setCRS(firstFeatureCollectionSchema.getCoordinateReferenceSystem()); tb.setAbstract(firstFeatureCollectionSchema.isAbstract()); tb.setSuperType((SimpleFeatureType) firstFeatureCollectionSchema.getSuper()); tb.setName(firstFeatureCollectionSchema.getName());
tb.setSuperType(abstractType); tb.add("X", String.class); SimpleFeatureType abstractType2 = tb.buildFeatureType();
throw new SchemaException("Can only specify a single super type"); tb.setSuperType(superTypes[0]); tb.setSuperType(ABSTRACT_FEATURE_TYPE);
tb.setSuperType(BasicFeatureTypes.POINT); } else if ((geometryBinding == Polygon.class) || (geometryBinding == MultiPolygon.class)) { tb.setSuperType(BasicFeatureTypes.POLYGON); } else if ((geometryBinding == LineString.class) || (geometryBinding == MultiLineString.class)) { tb.setSuperType(BasicFeatureTypes.LINE);
builder.setSuperType(parent);
builder.setSuperType(parent);
builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
tb.setSuperType((SimpleFeatureType) schema.getSuper());
tb.setCRS(firstFeatureCollectionSchema.getCoordinateReferenceSystem()); tb.setAbstract(firstFeatureCollectionSchema.isAbstract()); tb.setSuperType((SimpleFeatureType) firstFeatureCollectionSchema.getSuper()); tb.setName(firstFeatureCollectionSchema.getName());