@Override public Envelope getEnvelope( QName ftName ) throws FeatureStoreException { return calcEnvelope( ftName ); }
@Override public FeatureInputStream next() { if ( !hasNext() ) { throw new NoSuchElementException(); } FeatureInputStream rs; try { rs = query( queries[i++] ); } catch ( Exception e ) { e.printStackTrace(); throw new RuntimeException( e.getMessage(), e ); } return rs; }
@Override public int[] queryHits( Query[] queries ) throws FeatureStoreException, FilterEvaluationException { int[] hits = new int[queries.length]; for ( int i = 0; i < queries.length; i++ ) { hits[i] = queryHits( queries[i] ); } return hits; }
fs = new MemoryFeatureStore( schema, storageCRS, metadata, lockProvider ); } catch ( FeatureStoreException ex ) { throw new ResourceInitException( ex.getLocalizedMessage(), ex ); gmlStream.getIdContext().resolveLocalRefs(); FeatureStoreTransaction ta = fs.acquireTransaction(); int fids = ta.performInsert( fc, USE_EXISTING ).size(); LOG.info( "Inserted " + fids + " features." );
@Override public void rollback() throws FeatureStoreException { fs.releaseTransaction( this, null ); } }
if ( fs.getStorageCRS() != null ) { LOG.debug( "Transforming incoming feature collection to '" + fs.getStorageCRS() + "'" ); try { fc = transformGeometries( fc );
FeatureType ft = fs.getSchema().getFeatureType( ftName ); if ( ft == null ) { throw new FeatureStoreException( getMessage( "TA_OPERATION_FT_NOT_SERVED", ftName ) );
@Override public void commit() throws FeatureStoreException { try { sf.rebuildIndexes(); } catch ( UnknownCRSException e ) { throw new FeatureStoreException( e.getMessage() ); } fs.releaseTransaction( this, sf ); }
private FeatureCollection transformGeometries( FeatureCollection fc ) throws IllegalArgumentException, UnknownCRSException, TransformationException { FeatureCollection transformedFc = new GenericFeatureCollection(); GeometryTransformer transformer = new GeometryTransformer( fs.getStorageCRS() ); for ( Feature feature : fc ) { transformedFc.add( transformGeometries( feature, transformer ) ); } return transformedFc; }
FeatureType ft = fs.getSchema().getFeatureType( ftName ); if ( ft == null ) { throw new FeatureStoreException( getMessage( "TA_OPERATION_FT_NOT_SERVED", ftName ) );
@Override public int queryHits( org.deegree.feature.persistence.query.Query query ) throws FilterEvaluationException, FeatureStoreException { return query( query ).toCollection().size(); }