Package com.esri.gpt.control.webharvest

Examples of com.esri.gpt.control.webharvest.IterationContext


  private Native createNativeResource(HrRecord repository) throws Exception {
    // declare placeholder for any exception thrown by query builder
    final ArrayList<Exception> exceptions = new ArrayList<Exception>();
    // create such an instance of the iteration context so it will store each
    // exception in the placeholder
    IterationContext iterationContext = new IterationContext() {

      public void onIterationException(Exception ex) {
        exceptions.add(ex);
      }
    };
View Full Code Here


@BeforeClass
public static void setUpClass() throws Exception {
  HarvestProtocolOai protocol = new HarvestProtocolOai();
  protocol.setPrefix("oai_dc");
  IterationContext context = new IterationContext() {
    public void onIterationException(Exception ex) {
    }
  };
  instance  = new OaiQueryBuilder(context, protocol, "http://alcme.oclc.org/oaicat/OAIHandler");
}
View Full Code Here

@BeforeClass
public static void setUpClass() throws Exception {
  HarvestProtocolArcIms protocol = new HarvestProtocolArcIms();
  protocol.setServiceName("Metadata");
  IterationContext context = new IterationContext() {

  public void onIterationException(Exception ex) {
  }
  };
  instance = new ArcImsQueryBuilder(context, protocol, "http://datawarehouse.hrsa.gov");
View Full Code Here

@BeforeClass
public static void setUpClass() throws Exception {
  HarvestProtocolCsw protocol = new HarvestProtocolCsw();
  protocol.setProfile("urn:ogc:CSW:2.0.2:HTTP:OGCCORE:ESRI:GPT");
  IterationContext context = new IterationContext() {
    public void onIterationException(Exception ex) {
    }
  };
  instance  = new CswQueryBuilder(context, protocol, "http://geoss.esri.com/geoportal/csw/discovery?service=CSW&request=getCapabilities");
}
View Full Code Here

}

@BeforeClass
public static void setUpClass() throws Exception {
  HarvestProtocolWaf protocol = new HarvestProtocolWaf();
  IterationContext context = new IterationContext() {
    public void onIterationException(Exception ex) {
    }
  };
  instance  = new WafQueryBuilder(context, protocol, "http://www.ngdc.noaa.gov/metadata/published/NGDC/");
}
View Full Code Here

   * @param iterationContext iteration context (can be <code>null</code>)
   * @return query builder or <code>null</code> if no protocol
   */
  public QueryBuilder newQueryBuilder(IterationContext iterationContext) {
    if (iterationContext==null) {
      iterationContext = new IterationContext() {
          public void onIterationException(Exception ex) {
          }
      };
    }
    return getProtocol()!=null? getProtocol().newQueryBuilder(iterationContext, getHostUrl()): null;
View Full Code Here

  public void copy() throws Exception {
    LOGGER.log(Level.INFO, "Starting synchronization from ArcGIS Server "+source.getRestUrl()+" into Portal for ArcGIS "+destination.getConnection().getHost());
    RequestContext requestContext = RequestContext.extract(null);
    try {

      ArcGISQueryBuilder qb = new ArcGISQueryBuilder(new IterationContext() {
        @Override
        public void onIterationException(Exception ex) {
          LOGGER.log(Level.SEVERE, "Error iterating through AGS resources.", ex);
        }
      }, source);
View Full Code Here

public ExecutionUnit(Task task) {
  if (task == null)
    throw new IllegalArgumentException("No task provided.");
  this.task = task;
  this.cleanup = ProtocolInvoker.getUpdateContent(task.getResource().getProtocol()) && task.getCriteria().getFromDate()==null;
  this.queryBuilder = task.getResource().newQueryBuilder(new IterationContext() {
      @Override
      public void onIterationException(Exception ex) {
        ExecutionUnit.this.onIteratonException(ex);
      }
  });
View Full Code Here

* @param iterationContext iteration context (can be <code>null</code>)
* @return query builder or <code>null</code> if no protocol
*/
public QueryBuilder newQueryBuilder(IterationContext iterationContext) {
  if (iterationContext==null) {
    iterationContext = new IterationContext() {
        @Override
        public void onIterationException(Exception ex) {
        }
    };
  }
View Full Code Here

}

@BeforeClass
public static void setUpClass() throws Exception {
  HarvestProtocolResource protocol = new HarvestProtocolResource();
  IterationContext context = new IterationContext() {
    public void onIterationException(Exception ex) {
    }
  };
  instance  = new ResourceQueryBuilder(context, protocol, "http://server.arcgisonline.com/ArcGIS/rest/services");
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.control.webharvest.IterationContext

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.