Package com.esri.gpt.framework.resource.api

Examples of com.esri.gpt.framework.resource.api.Resource


@Override
public Resource next() {
  if (!hasNext()) {
    throw new NoSuchElementException("No more resources.");
  }
  Resource resource = stack.getLast().next();
  while (stack.size()>0 && !stack.getLast().hasNext()) {
    stack.removeLast();
  }
  Iterator<Resource> iter = resource.getNodes().iterator();
  if (iter.hasNext()) {
    stack.addLast(iter);
  }
  return resource;
}
View Full Code Here


private Publishable next;

public boolean hasNext() {
  if (next!=null) return true;
  while (iterator.hasNext()) {
    Resource resource = iterator.next();
    if (resource instanceof Publishable) {
      next = (Publishable)resource;
      return true;
    }
  }
View Full Code Here

      if (resource==null) {
        throw new NoSuchElementException();
      }
      totalCount++;
      passCount++;
      Resource result = resource;
      // clear cached record (resource)
      resource = null;
      return result;
    }
View Full Code Here

    public boolean hasNext() {
      if (next != null) {
        return true;
      }
      while (iterator.hasNext()) {
        Resource resource = iterator.next();
        if (resource instanceof IServiceInfoProvider && ((IServiceInfoProvider) resource).getServiceInfo()!=null) {
          next = (IServiceInfoProvider) resource;
          return true;
        }
      }
View Full Code Here

  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  final Iterable<Resource> records = nextOaiRecords;
  nextOaiRecords = null;
  return new Resource() {
    @Override
    public Iterable<Resource> getNodes() {
      return records;
    }
  };
View Full Code Here

  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  final Iterable<Resource> records = nextCswrecords;
  nextCswrecords = null;
  return new Resource() {
    @Override
    public Iterable<Resource> getNodes() {
      return records;
    }
  };
View Full Code Here

      if (!hasNext()) {
        throw new NoSuchElementException();
      }
      final Iterable<Resource> records = nextAgpRecords;
      nextAgpRecords = null;
      return new Resource() {

        @Override
        public Iterable<Resource> getNodes() {
          return records;
        }
View Full Code Here

  @Override
  public Resource next() {
    if (nextResource==null) {
      throw new NoSuchElementException("No more elements.");
    }
    Resource r = nextResource;
    nextResource = null;
    if (r instanceof FtpFile) {
      try {
        FtpFile f = (FtpFile)r;
        f.getContent();
View Full Code Here

  if (!hasNext()) {
    throw new NoSuchElementException();
  }
  final Iterable<Resource> records = nextAtomRecords;
  nextAtomRecords = null;
  return new Resource() {
    public Iterable<Resource> getNodes() {
      return records;
    }
  };
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.resource.api.Resource

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.