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 void
endJSON()
boolean
endObject()
boolean
endObjectEntry()
SimpleFeatureType
getValue()
boolean
primitive(Object value)
boolean
startArray()
boolean
startObjectEntry(String key)
-
Methods inherited from class DelegatingHandler
createDelegate, endArray, getDelegate, lookupDelegate, startJSON, startObject
-
-
-
-
Method Detail
-
startObjectEntry
public boolean startObjectEntry(String key) throws ParseException, IOException
- Specified by:
startObjectEntry
in interfaceContentHandler
- Overrides:
startObjectEntry
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
startArray
public boolean startArray() throws ParseException, IOException
- Specified by:
startArray
in interfaceContentHandler
- Overrides:
startArray
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endObject
public boolean endObject() throws ParseException, IOException
- Specified by:
endObject
in interfaceContentHandler
- Overrides:
endObject
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
primitive
public boolean primitive(Object value) throws ParseException, IOException
- Specified by:
primitive
in interfaceContentHandler
- Overrides:
primitive
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endObjectEntry
public boolean endObjectEntry() throws ParseException, IOException
- Specified by:
endObjectEntry
in interfaceContentHandler
- Overrides:
endObjectEntry
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endJSON
public void endJSON() throws ParseException, IOException
- Specified by:
endJSON
in interfaceContentHandler
- Overrides:
endJSON
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
getValue
public SimpleFeatureType getValue()
- Specified by:
getValue
in interfaceIContentHandler<SimpleFeatureType>
- Overrides:
getValue
in classDelegatingHandler<SimpleFeatureType>
-
-