Package com.esri.gpt.control.download

Examples of com.esri.gpt.control.download.DownloadConfiguration


  // download configuration
  XPath xpath = XPathFactory.newInstance().newXPath();
  Node ndDownload = (Node) xpath.evaluate("downloadData", root,
      XPathConstants.NODE);
  if (ndDownload != null) {
    DownloadConfiguration cfg = appConfig.getDownloadDataConfiguration();
    cfg.setTaskUrl(xpath.evaluate("@taskUrl", ndDownload));
    cfg.setMapServiceUrl(xpath.evaluate("@mapServiceUrl", ndDownload));
    cfg.setMapServiceType(xpath.evaluate("@mapServiceType", ndDownload));
    cfg.setMapInitialExtent(xpath.evaluate("@mapInitialExtent", ndDownload));

    // load projections
    NodeList ndProjections = (NodeList) xpath.evaluate(
        "projections/projection", ndDownload, XPathConstants.NODESET);
    for (int i = 0; i < ndProjections.getLength(); i++) {
      Node node = ndProjections.item(i);
      String key = xpath.evaluate("@key", node);
      String alias = xpath.evaluate("@alias", node);
      String resKey = xpath.evaluate("@resKey", node);
      ItemInfo ii = new ItemInfo(key, alias, resKey);
      cfg.getProjectionInfo().add(ii);
    }

    // load output format
    NodeList ndFormats = (NodeList) xpath.evaluate("formats/format",
        ndDownload, XPathConstants.NODESET);
    for (int i = 0; i < ndFormats.getLength(); i++) {
      Node node = ndFormats.item(i);
      String key = xpath.evaluate("@key", node);
      String alias = xpath.evaluate("@alias", node);
      String resKey = xpath.evaluate("@resKey", node);
      ItemInfo ii = new ItemInfo(key, alias, resKey);
      cfg.getOutputFormatInfo().add(ii);
    }

    // load feature formats
    NodeList ndFeatureFormats = (NodeList) xpath.evaluate("features/feature",
        ndDownload, XPathConstants.NODESET);
    for (int i = 0; i < ndFeatureFormats.getLength(); i++) {
      Node node = ndFeatureFormats.item(i);
      String key = xpath.evaluate("@key", node);
      String alias = xpath.evaluate("@alias", node);
      String resKey = xpath.evaluate("@resKey", node);
      ItemInfo ii = new ItemInfo(key, alias, resKey);
      cfg.getFeatureFormatInfo().add(ii);
    }

    // load raster formats
    NodeList ndRasterFormats = (NodeList) xpath.evaluate("rasters/raster",
        ndDownload, XPathConstants.NODESET);
    for (int i = 0; i < ndRasterFormats.getLength(); i++) {
      Node node = ndRasterFormats.item(i);
      String key = xpath.evaluate("@key", node);
      String alias = xpath.evaluate("@alias", node);
      String resKey = xpath.evaluate("@resKey", node);
      ItemInfo ii = new ItemInfo(key, alias, resKey);
      cfg.getRasterFormatInfo().add(ii);
    }
  }
}
View Full Code Here


  setDatabaseReferences(new DatabaseReferences());
  setIdentityConfiguration(new IdentityConfiguration());
  setCatalogConfiguration(new CatalogConfiguration());
  setMailConfiguration(new MailConfiguration());
  setThreadSchedulerConfiguration(new ThreadSchedulerConfiguration());
  setDownloadDataConfiguration(new DownloadConfiguration());
  setMetadataAccessPolicy(new MetadataAccessPolicy());
}
View Full Code Here

* @param downloadConfiguration data download configuration
*/
public void setDownloadDataConfiguration(
    DownloadConfiguration downloadConfiguration) {
  _downloadDataConfiguration = downloadConfiguration != null ? downloadConfiguration
      : new DownloadConfiguration();
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.control.download.DownloadConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.