Package org.geotools.geojson.feature
Class FeatureTypeHandler
- Object
-
- DelegatingHandler<SimpleFeatureType>
-
- FeatureTypeHandler
-
- All Implemented Interfaces:
IContentHandler<SimpleFeatureType>,ContentHandler
public class FeatureTypeHandler extends DelegatingHandler<SimpleFeatureType> implements IContentHandler<SimpleFeatureType>
Obtains a complete feature type from GeoJSON by parsing beyond first feature and finding attributes that did not appear in the first feature or had null values.If null values are encoded, parsing will stop when all data types are found. In the worst case, all features will be parsed. If null values are not encoded, all features will be parsed anyway.
-
-
Field Summary
-
Fields inherited from class DelegatingHandler
delegate, handlers, NULL, NULL_LIST, UNINITIALIZED
-
-
Constructor Summary
Constructors Constructor Description FeatureTypeHandler(boolean nullValuesEncoded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanendArray()voidendJSON()booleanendObject()booleanendObjectEntry()SimpleFeatureTypegetValue()booleanprimitive(Object value)booleanstartArray()booleanstartObject()booleanstartObjectEntry(String key)-
Methods inherited from class DelegatingHandler
createDelegate, getDelegate, lookupDelegate, startJSON
-
-
-
-
Method Detail
-
startObjectEntry
public boolean startObjectEntry(String key) throws ParseException, IOException
- Specified by:
startObjectEntryin interfaceContentHandler- Overrides:
startObjectEntryin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
startArray
public boolean startArray() throws ParseException, IOException- Specified by:
startArrayin interfaceContentHandler- Overrides:
startArrayin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
endArray
public boolean endArray() throws ParseException, IOException- Specified by:
endArrayin interfaceContentHandler- Overrides:
endArrayin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
startObject
public boolean startObject() throws ParseException, IOException- Specified by:
startObjectin interfaceContentHandler- Overrides:
startObjectin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
endObject
public boolean endObject() throws ParseException, IOException- Specified by:
endObjectin interfaceContentHandler- Overrides:
endObjectin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
primitive
public boolean primitive(Object value) throws ParseException, IOException
- Specified by:
primitivein interfaceContentHandler- Overrides:
primitivein classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
endObjectEntry
public boolean endObjectEntry() throws ParseException, IOException- Specified by:
endObjectEntryin interfaceContentHandler- Overrides:
endObjectEntryin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
endJSON
public void endJSON() throws ParseException, IOException- Specified by:
endJSONin interfaceContentHandler- Overrides:
endJSONin classDelegatingHandler<SimpleFeatureType>- Throws:
ParseExceptionIOException
-
getValue
public SimpleFeatureType getValue()
- Specified by:
getValuein interfaceIContentHandler<SimpleFeatureType>- Overrides:
getValuein classDelegatingHandler<SimpleFeatureType>
-
-