/** * FeatureSchema for provided query. * * <p>If query.retrieveAllProperties() is <code>true</code> the FeatureSource getSchema() will * be returned. * * <p>If query.getPropertyNames() is used to limit the result of the Query a sub type will be * returned based on FeatureSource.getSchema(). * * @return DOCUMENT ME! * @throws IOException DOCUMENT ME! * @throws DataSourceException DOCUMENT ME! */ public SimpleFeatureType getSchema() { return super.getSchema(); }
public FeatureReader<SimpleFeatureType, SimpleFeature> reader() throws IOException { return new DelegateFeatureReader<SimpleFeatureType, SimpleFeature>(getSchema(), features()); }
/** * FeatureSchema for provided query. * * <p> * If query.retrieveAllProperties() is <code>true</code> the FeatureSource * getSchema() will be returned. * </p> * * <p> * If query.getPropertyNames() is used to limit the result of the Query a * sub type will be returned based on FeatureSource.getSchema(). * </p> * * @return DOCUMENT ME! * * @throws IOException DOCUMENT ME! * @throws DataSourceException DOCUMENT ME! */ public SimpleFeatureType getSchema() { return super.getSchema(); }
/** * FeatureType of this FeatureCollection. * <p> * Unless a FeatureType was provided during consturction (or this method is * overriden) a FeatureType will be generated based on getSchmea according * to the following assumptions: * <ul> * <li>FeatureType is gml:AbstractFeatureCollectionType * <li>first attribute is getSchema.typeName * <li>the attribute FeatureType the same as returned by getSchema() * </ul> * </p> */ public synchronized FeatureType getFeatureType() { if( featureType == null ){ List ats = new LinkedList(); ats.add(new FeatureAttributeType( getSchema().getTypeName(), getSchema(),false)); featureType = new DefaultFeatureType("AbstractFeatureCollectionType",FeatureTypes.DEFAULT_NAMESPACE,ats,new LinkedList(),null); } return featureType; } public FeatureCollection getParent() {
public FeatureReader<SimpleFeatureType, SimpleFeature> reader() throws IOException { return new DelegateFeatureReader<SimpleFeatureType, SimpleFeature>( getSchema(), features() ); }
public FeatureReader reader() throws IOException { return new DelegateFeatureReader( getSchema(), features() ); }
try { reader = reader(); FeatureType schema = getSchema();