Package org.geotools.data.neo4j

Examples of org.geotools.data.neo4j.Neo4jFeatureBuilder


  private Neo4jFeatureBuilder featureBuilder;
  private org.opengis.filter.Filter filter;
 
  public FilterCQL(Layer layer, String cqlPredicate) throws CQLException {
    this.featureBuilder = new Neo4jFeatureBuilder(layer);
    this.filter = ECQL.toFilter(cqlPredicate);
  }
View Full Code Here


    public FeatureCollection<SimpleFeatureType,SimpleFeature> toStreamingFeatureCollection(final Envelope bounds) throws IOException {
      return toStreamingFeatureCollection(Neo4jFeatureBuilder.getTypeFromLayer(layer), bounds);     
    }
   
    public FeatureCollection<SimpleFeatureType,SimpleFeature> toStreamingFeatureCollection(SimpleFeatureType featureType, final Envelope bounds) throws IOException {
      final Neo4jFeatureBuilder featureBuilder = new Neo4jFeatureBuilder(layer);
      return new AbstractFeatureCollection(featureType) {
      @Override
      public int size() {
        return Integer.MAX_VALUE;
      }
     
      @Override
      protected Iterator<SimpleFeature> openIterator() {
        return new Iterator<SimpleFeature>() {
          @Override
          public boolean hasNext() {
            return GeoPipeline.this.hasNext();
          }

          @Override
          public SimpleFeature next() {
            return featureBuilder.buildFeature(GeoPipeline.this.next().getRecord());
          }

          @Override
          public void remove() {
            throw new UnsupportedOperationException();
View Full Code Here

      }
     
      final Iterator<GeoPipeFlow> recordsIterator = records.iterator();
      final ReferencedEnvelope refBounds = new ReferencedEnvelope(bounds, layer.getCoordinateReferenceSystem());
     
      final Neo4jFeatureBuilder featureBuilder = new Neo4jFeatureBuilder(featureType, Arrays.asList(layer.getExtraPropertyNames()));
      return new AbstractFeatureCollection(featureType) {
      @Override
      public int size() {
        return records.size();
      }
     
      @Override
      protected Iterator<SimpleFeature> openIterator() {
        return new Iterator<SimpleFeature>() {
         
          @Override
          public boolean hasNext() {
            return recordsIterator.hasNext();
          }

          @Override
          public SimpleFeature next() {
            return featureBuilder.buildFeature(recordsIterator.next());
          }

          @Override
          public void remove() {
            throw new UnsupportedOperationException();
View Full Code Here

    private final Layer layer;

    public CQLIndexReader(LayerTreeIndexReader index, Layer layer, String query) throws CQLException {
        super(index);
        this.filter = ECQL.toFilter(query);
        this.builder = new Neo4jFeatureBuilder(layer);
        this.layer = layer;
       
        this.filterEnvelope = Utilities.extractEnvelopeFromFilter(filter);
    }
View Full Code Here

  private org.opengis.filter.Filter filter;
  private Envelope filterEnvelope;
 
  public SearchCQL(Layer layer, org.opengis.filter.Filter filter) {
    this.layer = layer;
    this.featureBuilder = new Neo4jFeatureBuilder(layer);
    this.filter = filter; 
      this.filterEnvelope = Utilities.extractEnvelopeFromFilter(filter);   
  }
View Full Code Here

      this.filterEnvelope = Utilities.extractEnvelopeFromFilter(filter);   
  }
 
  public SearchCQL(Layer layer, String cql) {
    this.layer = layer;
    this.featureBuilder = new Neo4jFeatureBuilder(layer);
    try {
      this.filter = ECQL.toFilter(cql);
        this.filterEnvelope = Utilities.extractEnvelopeFromFilter(filter);         
    } catch (CQLException e) {
      throw new SpatialDatabaseException("CQLException: " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.geotools.data.neo4j.Neo4jFeatureBuilder

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.