Package org.geotools.geojson.feature
Class 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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
endArray()
void
endJSON()
boolean
boolean
getValue()
boolean
boolean
boolean
boolean
startObjectEntry
(String key) Methods inherited from class DelegatingHandler
createDelegate, getDelegate, lookupDelegate, startJSON
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ContentHandler
startJSON
-
Constructor Details
-
FeatureTypeHandler
public FeatureTypeHandler(boolean nullValuesEncoded)
-
-
Method Details
-
startObjectEntry
- Specified by:
startObjectEntry
in interfaceContentHandler
- Overrides:
startObjectEntry
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
startArray
- Specified by:
startArray
in interfaceContentHandler
- Overrides:
startArray
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endArray
- Specified by:
endArray
in interfaceContentHandler
- Overrides:
endArray
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
startObject
- Specified by:
startObject
in interfaceContentHandler
- Overrides:
startObject
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endObject
- Specified by:
endObject
in interfaceContentHandler
- Overrides:
endObject
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
primitive
- Specified by:
primitive
in interfaceContentHandler
- Overrides:
primitive
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endObjectEntry
- Specified by:
endObjectEntry
in interfaceContentHandler
- Overrides:
endObjectEntry
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
endJSON
- Specified by:
endJSON
in interfaceContentHandler
- Overrides:
endJSON
in classDelegatingHandler<SimpleFeatureType>
- Throws:
ParseException
IOException
-
getValue
- Specified by:
getValue
in interfaceIContentHandler<SimpleFeatureType>
- Overrides:
getValue
in classDelegatingHandler<SimpleFeatureType>
-