Class EmfAppSchemaParser
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.
- Since:
- 2.5.x
- Author:
- Gabriel Roldan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleFeatureType
parse
(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName, Class<?>> mappedBindings) Parses the FeatureType pointed out by theschemaLocation
URL and returns it.static SimpleFeatureType
parse
(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName, Class<?>> mappedBindings, EntityResolver entityResolver) Parses the FeatureType pointed out by theschemaLocation
URL and returns it.static SimpleFeatureType
parseSimpleFeatureType
(QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Configuration wfsConfiguration, Map<QName, Class<?>> mappedBindings) 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 theschemaLocation
URL and returns a subset consisting only of the simple attributes found on the original schema.static SimpleFeatureType
toSimpleFeatureType
(FeatureType realType) Go through FeatureType description and convert to a SimpleFeatureType.
-
Constructor Details
-
EmfAppSchemaParser
public EmfAppSchemaParser()
-
-
Method Details
-
parseSimpleFeatureType
public static SimpleFeatureType parseSimpleFeatureType(QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Configuration wfsConfiguration, Map<QName, Class<?>> mappedBindings) throws IOException- Throws:
IOException
-
parseSimpleFeatureType
public static SimpleFeatureType parseSimpleFeatureType(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName, Class<?>> mappedBindings) throws IOExceptionParses the FeatureType pointed out by theschemaLocation
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 fromgml:location
. Note: this code is borrowed and adapted fromParserHandler.startDocument()
- Parameters:
wfsConfiguration
- the WFS configuration for the parser to grabBinding
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.- Throws:
IOException
-
toSimpleFeatureType
public static SimpleFeatureType toSimpleFeatureType(FeatureType realType) throws DataSourceException Go through FeatureType description and convert to a SimpleFeatureType. Also ignores AbstractFeatureType contributions such as name etc...- Throws:
DataSourceException
-
parse
public static SimpleFeatureType parse(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName, Class<?>> mappedBindings) throws IOExceptionParses the FeatureType pointed out by theschemaLocation
URL and returns it.The returned
FeatureType
default geometry, will be the first geometric attribute distinct fromgml:location
, orgml:location
if no additional geometric property is found. Note: this code is borrowed and adapted fromParserHandler.startDocument()
- Parameters:
wfsConfiguration
- the WFS configuration for the parser to grabBinding
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.- Throws:
IOException
-
parse
public static SimpleFeatureType parse(Configuration wfsConfiguration, QName featureName, URL schemaLocation, CoordinateReferenceSystem crs, Map<QName, Class<?>> mappedBindings, EntityResolver entityResolver) throws IOExceptionParses the FeatureType pointed out by theschemaLocation
URL and returns it.The returned
FeatureType
default geometry, will be the first geometric attribute distinct fromgml:location
, orgml:location
if no additional geometric property is found. Note: this code is borrowed and adapted fromParserHandler.startDocument()
- Parameters:
wfsConfiguration
- the WFS configuration for the parser to grabBinding
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.entityResolver
- Locate, or deny access to, resources- Throws:
IOException
-
parseSimpleFeatureType
public static SimpleFeatureType parseSimpleFeatureType(Configuration configuration, QName featureTypeName, URL schemaLocation, CoordinateReferenceSystem crs) throws IOException - Throws:
IOException
-