private Config getConfig(String refSys, String layerGroup, String dataset) { return env.getConfiguration().getConfig("spatial.datasets", refSys, layerGroup, dataset); }
private Config getConfig(String refSys, String layerGroup, String dataset) { return env.getConfiguration().getConfig("spatial.datasets", refSys, layerGroup, dataset); }
public WikiBrainShapeFile download(String refSysName, String layerGroup, String datasetName, boolean mappingRequired) throws InterruptedException, IOException { if (config == null) { throw new IllegalArgumentException("To download by name, SpatialDataDownloader must have a configuration"); } Config c = config.getConfig("spatial.datasets", refSysName, layerGroup, datasetName); WikiBrainShapeFile shapeFile = download( new URL(c.getString("url")), c.getString("shp"), refSysName, layerGroup, datasetName, c.getString("encoding") ); if (mappingRequired) { downloadMapping(new URL(c.getString("mappingUrl")), shapeFile); } else { try { downloadMapping(new URL(c.getString("mappingUrl")), shapeFile); } catch (Exception e) { } } return shapeFile; }
public WikiBrainShapeFile download(String refSysName, String layerGroup, String datasetName, boolean mappingRequired) throws InterruptedException, IOException { if (config == null) { throw new IllegalArgumentException("To download by name, SpatialDataDownloader must have a configuration"); } Config c = config.getConfig("spatial.datasets", refSysName, layerGroup, datasetName); WikiBrainShapeFile shapeFile = download( new URL(c.getString("url")), c.getString("shp"), refSysName, layerGroup, datasetName, c.getString("encoding") ); if (mappingRequired) { downloadMapping(new URL(c.getString("mappingUrl")), shapeFile); } else { try { downloadMapping(new URL(c.getString("mappingUrl")), shapeFile); } catch (Exception e) { } } return shapeFile; }
public void match(String refSys, String layerGroup, String datasetName) throws IOException, InterruptedException, DaoException, ConfigurationException { Config config = env.getConfiguration().getConfig("spatial.datasets", refSys, layerGroup, datasetName); WikiBrainShapeFile shapeFile = downloader.download(refSys, layerGroup, datasetName, false); writeMatches(config, shapeFile); }
public void match(String refSys, String layerGroup, String datasetName) throws IOException, InterruptedException, DaoException, ConfigurationException { Config config = env.getConfiguration().getConfig("spatial.datasets", refSys, layerGroup, datasetName); WikiBrainShapeFile shapeFile = downloader.download(refSys, layerGroup, datasetName, false); writeMatches(config, shapeFile); }