@Override public FeatureStoreTransaction acquireTransaction() throws FeatureStoreException { throw new FeatureStoreException( "The shape datastore is currently not transactional." ); }
@SuppressWarnings("synthetic-access") @Override public Feature next() { Feature f = null; try { f = retrieveFeature( recIter.next() ); } catch ( FeatureStoreException e ) { throw new RuntimeException( e.getMessage(), e ); } return f; }
frs = this.featureStore.query( q ); } catch ( FeatureStoreException e ) { LOG.error( "Could not create a geometry layer texture because: " + e.getLocalizedMessage(), e ); } catch ( FilterEvaluationException e ) { LOG.error( "Could not create a geometry layer texture because: " + e.getLocalizedMessage(), e );
fs = new MemoryFeatureStore( schema, storageCRS, metadata, lockProvider ); } catch ( FeatureStoreException ex ) { throw new ResourceInitException( ex.getLocalizedMessage(), ex );
@Override public LockManager getLockManager() throws FeatureStoreException { throw new FeatureStoreException( "The shape datastore is currently not transactional." ); }
private LockManager getLockManager() throws OWSException { LockManager manager = null; try { // TODO strategy for multiple LockManagers / feature stores manager = master.getStoreManager().getStores()[0].getLockManager(); } catch ( FeatureStoreException e ) { LOG.debug( e.getMessage(), e ); throw new OWSException( "Cannot acquire lock manager: " + e.getMessage(), NO_APPLICABLE_CODE ); } return manager; } }
@Override public GMLObject getObjectById( String id ) throws FeatureStoreException { // TODO throw new FeatureStoreException( "This feature is currently not implemented for the shape datastore." ); }
private Lock renewLock( LockManager manager, long expiryInMilliseconds, String existingLockId ) throws OWSException { Lock lock = null; try { lock = manager.getLock( existingLockId ); long acquistionDate = lock.getAcquistionDate(); long expiryDate = acquistionDate + expiryInMilliseconds; lock.setExpiryDate( expiryDate ); } catch ( FeatureStoreException e ) { LOG.debug( e.getMessage(), e ); throw new OWSException( "Cannot renew lock: " + e.getMessage(), NO_APPLICABLE_CODE ); } return lock; }
public FeatureStoreTransaction acquireTransaction() throws FeatureStoreException { throw new FeatureStoreException( "Transactions are not implemented for the simple SQL datastore." ); }
@Override public GMLObject getObject( String uri, String baseURL ) { if ( uri.startsWith( "#" ) ) { try { return fs.getObjectById( uri.substring( 1 ) ); } catch ( FeatureStoreException e ) { throw new ReferenceResolvingException( e.getMessage(), e ); } } throw new ReferenceResolvingException( "Resolving of remote references is not implemented yet." ); } }
public LockManager getLockManager() throws FeatureStoreException { throw new FeatureStoreException( "Transactions are not implemented for the simple SQL datastore." ); }
private FeatureStoreTransaction acquireTransaction( FeatureStore fs ) throws OWSException { FeatureStoreTransaction ta = acquiredTransactions.get( fs ); if ( ta == null ) { try { LOG.debug( "Acquiring transaction for feature store " + fs ); ta = fs.acquireTransaction(); acquiredTransactions.put( fs, ta ); } catch ( FeatureStoreException e ) { throw new OWSException( Messages.get( "WFS_CANNOT_ACQUIRE_TA", e.getMessage() ), NO_APPLICABLE_CODE ); } } return ta; }
public GMLObject getObjectById( String id ) throws FeatureStoreException { throw new FeatureStoreException( "Getting objects by id is not implemented for the simple SQL datastore." ); }
/** * Performs the given {@link LockFeature} request. * * @param request * request to be handled, must not be <code>null</code> * @param response * response that is used to write the result, must not be <code>null</code> * @throws OWSException * if a WFS specific exception occurs, e.g. a requested feature type is not served * @throws IOException * @throws XMLStreamException */ void doLockFeature( LockFeature request, HttpResponseBuffer response ) throws OWSException, XMLStreamException, IOException { LOG.debug( "doLockFeature: " + request ); LockManager manager = getLockManager(); Lock lock = acquireOrRenewLock( request, manager ); try { writeLockFeatureResponse( request, response, lock ); } catch ( FeatureStoreException e ) { throw new OWSException( "Cannot acquire lock: " + e.getMessage(), NO_APPLICABLE_CODE ); } }
private ColumnMetadataOld getColumn( TableName qTable, SQLIdentifier columnName ) throws SQLException, FeatureStoreException { ColumnMetadataOld md = getColumns( qTable ).get( columnName ); if ( md == null ) { throw new FeatureStoreException( "Table '" + qTable + "' does not have a column with name '" + columnName + "'" ); } return md; }
unitsPerPixel, cacheDir, Math.round( cacheSize * 1024 * 1024 * 1024 ) ); } catch ( FeatureStoreException e ) { LOG.error( "Error retrieving envelope from FeatureStore: " + e.getMessage(), e ); throw new IOException( "Error retrieving envelope from FeatureStore: " + e.getMessage(), e );
private Object checkFIDParticle( SQLIdentifier column ) throws FeatureStoreException { Object value = get( column ); if ( value == null ) { throw new FeatureStoreException( "FIDMapping error: No value for feature id column '" + column + "'." ); } return value; }
env = fs.getEnvelope( ftName ); } catch ( FeatureStoreException e ) { LOG.error( "Error retrieving envelope from FeatureStore: " + e.getMessage(), e );
@Override public void rollback() throws FeatureStoreException { LOG.debug( "Performing rollback of transaction." ); try { conn.rollback(); } catch ( SQLException e ) { LOG.debug( e.getMessage(), e ); throw new FeatureStoreException( "Unable to rollback SQL transaction: " + e.getMessage() ); } finally { fs.closeAndDetachTransactionConnection(); } }
env = fs.getEnvelope( ftName ); } catch ( FeatureStoreException e ) { LOG.error( "Error retrieving envelope from FeatureStore: " + e.getMessage(), e );