Package org.geotools.data.complex.config
Class AppSchemaDataAccessConfigurator
- Object
-
- AppSchemaDataAccessConfigurator
-
public class AppSchemaDataAccessConfigurator extends Object
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 Classes Modifier and Type Class Description static classAppSchemaDataAccessConfigurator.ComplexNameImplName implementation capable of store more information about the attribute/element represented.
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_ENCODE_NESTED_FILTERSstatic StringPROPERTY_JOININGstatic StringPROPERTY_REPLACE_OR_UNION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 booleanisJoining()Convenience method for "joining" property.static booleanisJoiningSet()static booleanisOrUnionReplacementEnabled()static ExpressionparseOgcCqlExpression(String sourceExpr, FilterFactory ff)Utility method that parses an CQL expression from its text representation.static booleanshouldEncodeNestedFilters()Convenience method to check whether native encoding of nested filters is enabled.
-
-
-
Field Detail
-
PROPERTY_JOINING
public static String PROPERTY_JOINING
-
PROPERTY_ENCODE_NESTED_FILTERS
public static String PROPERTY_ENCODE_NESTED_FILTERS
-
PROPERTY_REPLACE_OR_UNION
public static final String PROPERTY_REPLACE_OR_UNION
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
trueif native encoding of nested filters is enabled,falseotherwise
-
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
FeatureTypeMappingsource 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
FeatureTypeMappingsource 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:
buildMappings(AppSchemaDataAccessDTO)
-
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.NILis 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
-
-