/** * This method will not create a source data store if an equivalent one (i.e. same configuration * parameters) is found in the provided <code>sourceDataStoreMap</code>. * * @see AppSchemaDataAccessConfigurator#buildMappings(AppSchemaDataAccessDTO) * @param 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 */ public static Set<FeatureTypeMapping> buildMappings( AppSchemaDataAccessDTO config, DataAccessMap sourceDataStoreMap) throws IOException { AppSchemaDataAccessConfigurator mappingsBuilder; mappingsBuilder = new AppSchemaDataAccessConfigurator(config, sourceDataStoreMap); Set<FeatureTypeMapping> mappingObjects = mappingsBuilder.buildMappings(); return mappingObjects; }
/** * Takes a config object and creates a set of mappings. * * <p> * 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. * </p> * * @param config * DOCUMENT ME! * * @return a Set of {@link org.geotools.data.complex.FeatureTypeMapping} source to target * FeatureType mapping definitions * * @throws IOException * if any error occurs while creating the mappings */ public static Set<FeatureTypeMapping> buildMappings(AppSchemaDataAccessDTO config) throws IOException { AppSchemaDataAccessConfigurator mappingsBuilder; mappingsBuilder = new AppSchemaDataAccessConfigurator(config); Set<FeatureTypeMapping> mappingObjects = mappingsBuilder.buildMappings(); return mappingObjects; }