Class 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)
    • Field Detail

      • PROPERTY_JOINING

        public static String PROPERTY_JOINING
      • PROPERTY_ENCODE_NESTED_FILTERS

        public static String PROPERTY_ENCODE_NESTED_FILTERS
    • 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:
        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,
                                                            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 provided sourceDataStoreMap.
        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 processed
        isInclude - 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.NIL is returned.
        Parameters:
        sourceExpr - the expression in its text representation
        ff - filter factory used to build the final expression
        Returns:
        the parsed expression
        Throws:
        DataSourceException - if the expression text representation could not be parsed