public class EmfAppSchemaParser extends Object
Currently only simple FeatureTypes are supported. In the feature, complex schemas may
be supported by porting the EmfAppSchemaParser class in the community schema datastore module,
depending on the availability of complex Feature
support on the mainstream GeoTools
distribution.
Constructor and Description |
---|
EmfAppSchemaParser() |
Modifier and Type | Method and Description |
---|---|
static SimpleFeatureType |
parse(Configuration wfsConfiguration,
QName featureName,
URL schemaLocation,
CoordinateReferenceSystem crs,
Map<QName,Class<?>> mappedBindings)
Parses the FeatureType pointed out by the
schemaLocation URL and returns it. |
static SimpleFeatureType |
parseSimpleFeatureType(Configuration configuration,
QName featureTypeName,
URL schemaLocation,
CoordinateReferenceSystem crs) |
static SimpleFeatureType |
parseSimpleFeatureType(Configuration wfsConfiguration,
QName featureName,
URL schemaLocation,
CoordinateReferenceSystem crs,
Map<QName,Class<?>> mappedBindings)
Parses the FeatureType pointed out by the
schemaLocation URL and returns a subset
consisting only of the simple attributes found on the original schema. |
static SimpleFeatureType |
parseSimpleFeatureType(QName featureName,
URL schemaLocation,
CoordinateReferenceSystem crs,
Configuration wfsConfiguration,
Map<QName,Class<?>> mappedBindings) |
static SimpleFeatureType |
toSimpleFeatureType(FeatureType realType)
Go through FeatureType description and convert to a SimpleFeatureType.
|
public static SimpleFeatureType parseSimpleFeatureType(QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Configuration wfsConfiguration, Map<QName,Class<?>> mappedBindings) throws IOException
IOException
public static SimpleFeatureType parseSimpleFeatureType(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName,Class<?>> mappedBindings) throws IOException
schemaLocation
URL and returns a subset
consisting only of the simple attributes found on the original schema.
Aditionally, the default properties inherited from gml:AbstractFeatureType
(ie,
gml:name, gml:location, etc), will be ignored.
The returned SimpleFeatureType
default geometry, thus, will be the first geometric
attribute distinct from gml:location
. Note: this code is borrowed and adapted from
ParserHandler.startDocument()
wfsConfiguration
- the WFS configuration for the parser to grab Binding
s from.featureName
- the qualified name of the Feature element in the schema, for which the
feature type is to be parsed.schemaLocation
- the location of the root schema file from where to parse the feature
type.crs
- the CRS to be assigned to the geometric attributes in the parsed feature type.
This information shall be provided here as the schema itself has no knowledge of the CRS
used.IOException
public static SimpleFeatureType toSimpleFeatureType(FeatureType realType) throws DataSourceException
realType
- DataSourceException
public static SimpleFeatureType parse(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName,Class<?>> mappedBindings) throws IOException
schemaLocation
URL and returns it.
The returned FeatureType
default geometry, will be the first geometric attribute
distinct from gml:location
, or gml:location
if no additional geometric
property is found. Note: this code is borrowed and adapted from ParserHandler.startDocument()
wfsConfiguration
- the WFS configuration for the parser to grab Binding
s from.featureName
- the qualified name of the Feature element in the schema, for which the
feature type is to be parsed.schemaLocation
- the location of the root schema file from where to parse the feature
type.crs
- the CRS to be assigned to the geometric attributes in the parsed feature type.
This information shall be provided here as the schema itself has no knowledge of the CRS
used.IOException
public static SimpleFeatureType parseSimpleFeatureType(Configuration configuration, QName featureTypeName, URL schemaLocation, CoordinateReferenceSystem crs) throws IOException
IOException
Copyright © 1996–2019 Geotools. All rights reserved.