private Set<FeatureTypeMapping> createFeatureTypeMappings( Map<String, DataAccess<FeatureType, Feature>> sourceDataStores) throws IOException { Set mappingsConfigs = config.getTypeMappings();
mappings.add(dtoNoMappingName); config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); da = new AppSchemaDataAccess(AppSchemaDataAccessConfigurator.buildMappings(config)); assertNotNull(da);
config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); try { AppSchemaDataAccess da = mappings.add(dtoNoMappingName); config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); try { AppSchemaDataAccess da =
private Set<FeatureTypeMapping> createFeatureTypeMappings( Map<String, DataAccess<FeatureType, Feature>> sourceDataStores) throws IOException { Set mappingsConfigs = config.getTypeMappings();
@Override @SuppressWarnings("unchecked") public DataAccess<? extends FeatureType, ? extends Feature> buildDataStore( SourceDataStore dataStoreConfig, AppSchemaDataAccessDTO appSchemaConfig) { if (!(dataStoreConfig instanceof ComplexDataStoreConfig)) { // not an Apache Solr feature type mapping return null; } ComplexDataStoreConfig complexDataStoreConfig = (ComplexDataStoreConfig) dataStoreConfig; IndexesConfig indexesConfig = complexDataStoreConfig.getIndexesConfig(); // specify the index attributes we are interested in based on the App-Schema mappings file for (TypeMapping mapping : (Set<TypeMapping>) appSchemaConfig.getTypeMappings()) { // get all the attributes names used in the feature type mapping Set<String> attributes = extractAttributesNames(mapping); indexesConfig.addAttributes(mapping.getSourceTypeName(), attributes); if (isDenormalizedIndexMode(mapping, dataStoreConfig)) { // set as denormalizedIndexMode indexesConfig .getIndexConfig(getTypeName(mapping, dataStoreConfig)) .setDenormalizedIndexMode(true); } } // build the Apache Solr store return new SolrDataStore( complexDataStoreConfig.getUrl(), new SingleLayerMapper(), indexesConfig); }
mappings.add(dtoNoMappingName); config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); da = new AppSchemaDataAccess(AppSchemaDataAccessConfigurator.buildMappings(config)); assertNotNull(da);
config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); try { AppSchemaDataAccess da = new AppSchemaDataAccess(AppSchemaDataAccessConfigurator mappings.add(dtoNoMappingName); config.setTypeMappings(mappings); assertTrue(config.getTypeMappings().containsAll(mappings)); try { AppSchemaDataAccess da = new AppSchemaDataAccess(AppSchemaDataAccessConfigurator