|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGML2ParsingUtils
public class GML2ParsingUtils
Utility methods used by gml2 bindings when parsing.
modules/extension/xsd-gml2 (gt-xsd-gml2.jar)
Constructor Summary | |
---|---|
GML2ParsingUtils()
|
Method Summary | |
---|---|
static Collection |
asCollection(GeometryCollection gc)
Wraps the elements of a geometry collection in a normal collection. |
static CoordinateReferenceSystem |
crs(Node node)
|
static SimpleFeature |
feature(SimpleFeatureType fType,
String fid,
Node node)
|
static SimpleFeatureType |
featureType(Node node)
Turns a parse node instance into a geotools feature type. |
static SimpleFeatureType |
featureType(XSDElementDeclaration element,
BindingWalkerFactory bwFactory)
Turns a xml type definition into a geotools feature type. |
static SimpleFeature |
parseFeature(ElementInstance instance,
Node node,
Object value,
FeatureTypeCache ftCache,
BindingWalkerFactory bwFactory)
Utility method to implement Binding.parse for a binding which parses into A feature. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GML2ParsingUtils()
Method Detail |
---|
public static SimpleFeature parseFeature(ElementInstance instance, Node node, Object value, FeatureTypeCache ftCache, BindingWalkerFactory bwFactory) throws Exception
instance
- The instance being parsed.node
- The parse tree.value
- The value from the last binding in the chain.ftCache
- The feature type cache.bwFactory
- Binding walker factory.
Exception
public static SimpleFeatureType featureType(Node node) throws Exception
For each child element and attribute of the node a geotools attribute type is created. AttributeType#getName() is derived from the name of the child element / attribute. Attribute#getType() is derived from the class of the value of the child element / attribute.
Attribute types for the mandatory properties of any gml feature type (description,name,boundedBy) are also created.
node
- The parse node / tree for the feature.
Exception
public static SimpleFeatureType featureType(XSDElementDeclaration element, BindingWalkerFactory bwFactory) throws Exception
type
- The xml schema tupe.
Exception
public static SimpleFeature feature(SimpleFeatureType fType, String fid, Node node) throws Exception
Exception
public static CoordinateReferenceSystem crs(Node node)
public static Collection asCollection(GeometryCollection gc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |