Package org.geotools.data.complex.config
Class AppSchemaDataAccessConfigurator
Object
AppSchemaDataAccessConfigurator
Utility class to create a set of objects from a complex
datastore's configuration object (
AppSchemaDataAccessDTO
).- Since:
- 2.4
- Author:
- Gabriel Roldan (Axios Engineering), Rini Angreani (CSIRO Earth Science and Resource Engineering), Russell Petty (GeoScience Victoria)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Name implementation capable of store more information about the attribute/element represented. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<FeatureTypeMapping>
buildMappings
(AppSchemaDataAccessDTO config) Takes a config object and creates a set of mappings, assumes the mappings are not from includesstatic Set<FeatureTypeMapping>
buildMappings
(AppSchemaDataAccessDTO config, boolean isInclude) Takes a config object and creates a set of mappings.static Set<FeatureTypeMapping>
buildMappings
(AppSchemaDataAccessDTO config, DataAccessMap sourceDataStoreMap, boolean isInclude) This method will not create a source data store if an equivalent one (i.e. same configuration parameters) is found in the providedsourceDataStoreMap
.static boolean
Convenience method for "joining" property.static boolean
static boolean
static Expression
parseOgcCqlExpression
(String sourceExpr, FilterFactory ff) Utility method that parses an CQL expression from its text representation.static boolean
Convenience method to check whether native encoding of nested filters is enabled.
-
Field Details
-
PROPERTY_JOINING
-
PROPERTY_ENCODE_NESTED_FILTERS
-
PROPERTY_REPLACE_OR_UNION
- See Also:
-
-
Method Details
-
isJoining
public static boolean isJoining()Convenience method for "joining" property. -
isJoiningSet
public static boolean isJoiningSet() -
isOrUnionReplacementEnabled
public static boolean isOrUnionReplacementEnabled() -
shouldEncodeNestedFilters
public static boolean shouldEncodeNestedFilters()Convenience method to check whether native encoding of nested filters is enabled.- Returns:
true
if native encoding of nested filters is enabled,false
otherwise
-
buildMappings
public static Set<FeatureTypeMapping> buildMappings(AppSchemaDataAccessDTO config, boolean isInclude) throws IOException Takes a config object and creates a set of mappings.In the process will parse xml schemas to geotools' Feature Model types and descriptors, connect to source datastores and build the mapping objects from source FeatureTypes to the target ones.
- Returns:
- a Set of
FeatureTypeMapping
source to target FeatureType mapping definitions - Throws:
IOException
- if any error occurs while creating the mappings
-
buildMappings
public static Set<FeatureTypeMapping> buildMappings(AppSchemaDataAccessDTO config) throws IOException Takes a config object and creates a set of mappings, assumes the mappings are not from includes- Parameters:
config
- the configuration object- Returns:
- a Set of
FeatureTypeMapping
source to target - Throws:
IOException
- if any error occurs while creating the mappings
-
buildMappings
public static Set<FeatureTypeMapping> buildMappings(AppSchemaDataAccessDTO config, DataAccessMap sourceDataStoreMap, boolean isInclude) throws IOException This method will not create a source data store if an equivalent one (i.e. same configuration parameters) is found in the providedsourceDataStoreMap
.- Parameters:
sourceDataStoreMap
- map holding the source data stores created so far, e.g. while parsing App-Schema configuration files included by the one currently being processedisInclude
- whether the mappings are for an include- Throws:
IOException
- See Also:
-
parseOgcCqlExpression
public static Expression parseOgcCqlExpression(String sourceExpr, FilterFactory ff) throws DataSourceException Utility method that parses an CQL expression from its text representation. If the provided expression test representation is NULL,Expression.NIL
is returned.- Parameters:
sourceExpr
- the expression in its text representationff
- filter factory used to build the final expression- Returns:
- the parsed expression
- Throws:
DataSourceException
- if the expression text representation could not be parsed
-