@Override protected SimpleFeatureType buildTargetFeatureType() { // create schema SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder(); for (AttributeDescriptor descriptor : delegate.getSchema().getAttributeDescriptors()) { if (!(descriptor.getType() instanceof GeometryTypeImpl) || (!delegate.getSchema().getGeometryDescriptor().equals(descriptor))) { tb.add(descriptor); } else { AttributeTypeBuilder builder = new AttributeTypeBuilder(); builder.setBinding(MultiPolygon.class); AttributeDescriptor attributeDescriptor = builder.buildDescriptor(descriptor.getLocalName(), builder.buildType()); tb.add(attributeDescriptor); if (tb.getDefaultGeometry() == null) { tb.setDefaultGeometry(descriptor.getLocalName()); } } } tb.setDescription(delegate.getSchema().getDescription()); tb.setCRS(delegate.getSchema().getCoordinateReferenceSystem()); tb.setName(delegate.getSchema().getName()); return tb.buildFeatureType(); }
builder.setName(featureType.getName()); builder.setAbstract(featureType.isAbstract()); builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
builder.setName(featureType.getName()); builder.setAbstract(featureType.isAbstract()); builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
tb.setDescription(firstFeatureCollectionSchema.getDescription()); tb.setCRS(firstFeatureCollectionSchema.getCoordinateReferenceSystem()); tb.setAbstract(firstFeatureCollectionSchema.isAbstract());
typeOutBuilder.setDescription(typeIn.getDescription()); typeOutBuilder.setName(typeIn.getName()); for (AttributeDescriptor att : typeIn.getAttributeDescriptors()) {
public SimpleFeatureType convertFeatureType(SimpleFeatureType oldFeatureType) { SimpleFeatureTypeBuilder ftb = new SimpleFeatureTypeBuilder(); ftb.add("Geometry", Geometry.class); ftb.setDefaultGeometry("Geometry"); List<AttributeDescriptor> attributeDescriptors = oldFeatureType.getAttributeDescriptors(); for (AttributeDescriptor attributeDescriptor : attributeDescriptors) { String localName = attributeDescriptor.getLocalName(); if (!"Geometry".equals(localName)) { ftb.add(attributeDescriptor); } } ftb.setName(oldFeatureType.getName()); ftb.setDescription(oldFeatureType.getDescription()); ftb.setCRS(KMLFileFormat.KML_CRS); ftb.setSRS(KMLFileFormat.KML_SRS); // remove style attribute for now if (oldFeatureType.getDescriptor("Style") != null) { ftb.remove("Style"); } ftb.add("Folder", String.class); SimpleFeatureType ft = ftb.buildFeatureType(); return ft; }
public SimpleFeatureType convertFeatureType(SimpleFeatureType oldFeatureType) { SimpleFeatureTypeBuilder ftb = new SimpleFeatureTypeBuilder(); ftb.add("Geometry", Geometry.class); ftb.setDefaultGeometry("Geometry"); List<AttributeDescriptor> attributeDescriptors = oldFeatureType.getAttributeDescriptors(); for (AttributeDescriptor attributeDescriptor : attributeDescriptors) { String localName = attributeDescriptor.getLocalName(); if (!"Geometry".equals(localName)) { ftb.add(attributeDescriptor); } } ftb.setName(oldFeatureType.getName()); ftb.setDescription(oldFeatureType.getDescription()); ftb.setCRS(KMLFileFormat.KML_CRS); ftb.setSRS(KMLFileFormat.KML_SRS); // remove style attribute for now if (oldFeatureType.getDescriptor("Style") != null) { ftb.remove("Style"); } ftb.add("Folder", String.class); SimpleFeatureType ft = ftb.buildFeatureType(); return ft; }
@Override protected SimpleFeatureType buildTargetFeatureType() { // create schema SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder(); for (AttributeDescriptor descriptor : delegate.getSchema().getAttributeDescriptors()) { if (!(descriptor.getType() instanceof GeometryTypeImpl) || (!delegate.getSchema().getGeometryDescriptor().equals(descriptor))) { tb.add(descriptor); } else { AttributeTypeBuilder builder = new AttributeTypeBuilder(); builder.setBinding(MultiPolygon.class); AttributeDescriptor attributeDescriptor = builder.buildDescriptor(descriptor .getLocalName(), builder.buildType()); tb.add(attributeDescriptor); if(tb.getDefaultGeometry() == null) { tb.setDefaultGeometry(descriptor.getLocalName()); } } } tb.setDescription(delegate.getSchema().getDescription()); tb.setCRS(delegate.getSchema().getCoordinateReferenceSystem()); tb.setName(delegate.getSchema().getName()); return tb.buildFeatureType(); }
builder.setName(featureType.getName()); builder.setAbstract(featureType.isAbstract()); builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
builder.setName(featureType.getName()); builder.setAbstract(featureType.isAbstract()); builder.setDescription(featureType.getDescription()); if (featureType.getSuper() instanceof SimpleFeatureType) { builder.setSuperType((SimpleFeatureType) featureType.getSuper());
tb.setDescription(firstFeatureCollectionSchema.getDescription()); tb.setCRS(firstFeatureCollectionSchema.getCoordinateReferenceSystem()); tb.setAbstract(firstFeatureCollectionSchema.isAbstract());