String resolvedPath = extendFilename(testDir.getPath(), relativePath); absolutePath = (new File(resolvedPath)).getAbsolutePath(); line = line.replace(relativePath, absolutePath);
private AppSchemaDataAccess buildDataAccess(String mappingsFileName) throws Exception { // generate the path to a mappings-file in the resources directory String configFilePath = extendFilename(testDir.getPath(), mappingsFileName); URL configFileUrl = URLs.fileToUrl(new File(configFilePath)); // parse the mappings-file XMLConfigDigester configReader = new XMLConfigDigester(); AppSchemaDataAccessDTO config = configReader.parse(configFileUrl); // generate the set of mappings needed to build the application-schema datastore Set<FeatureTypeMapping> mappings; mappings = AppSchemaDataAccessConfigurator.buildMappings(config); AppSchemaDataAccess datastore = new AppSchemaDataAccess(mappings); return datastore; }
String resolvedPath = extendFilename(testDir.getPath(), relativePath); absolutePath = (new File(resolvedPath)).getAbsolutePath(); line = line.replace(relativePath, absolutePath);
private AppSchemaDataAccess buildDataAccess(String mappingsFileName) throws Exception { // generate the path to a mappings-file in the resources directory String configFilePath = extendFilename(testDir.getPath(), mappingsFileName); URL configFileUrl = DataUtilities.fileToURL(new File(configFilePath)); // parse the mappings-file XMLConfigDigester configReader = new XMLConfigDigester(); AppSchemaDataAccessDTO config = configReader.parse(configFileUrl); // generate the set of mappings needed to build the application-schema datastore Set<FeatureTypeMapping> mappings; mappings = AppSchemaDataAccessConfigurator.buildMappings(config); AppSchemaDataAccess datastore = new AppSchemaDataAccess(mappings); return datastore; }