Package org.geotools.data.store

Examples of org.geotools.data.store.ContentEntry


        Preconditions.checkNotNull(typeName, "typeName");
        Preconditions.checkNotNull(oldRoot, "oldRoot");
        Preconditions.checkNotNull(changeType, "changeType");

        final Name name = name(typeName);
        final ContentEntry entry = ensureEntry(name);

        GeogigFeatureSource featureSource = new GeogigFeatureSource(entry);
        featureSource.setTransaction(Transaction.AUTO_COMMIT);
        featureSource.setChangeType(changeType);
        if (ObjectId.NULL.toString().equals(oldRoot)
View Full Code Here


    protected ContentFeatureSource createFeatureSource(ContentEntry entry) throws IOException {
        return getFeatureSource();
    }

    public ContentFeatureSource getFeatureSource() throws IOException {
        ContentEntry entry = ensureEntry(getTypeName());
        if (shpFiles.isWritable()) {
            return new ShapefileFeatureStore(entry, shpFiles);
        } else {
            return new ShapefileFeatureSource(entry, shpFiles);
        }
View Full Code Here

     * @param featureType
     * @return
     * @throws IOException
     */
    protected boolean isExposePrimaryKeyColumns(SimpleFeatureType featureType) throws IOException {
        ContentEntry entry = ensureEntry(featureType.getName());
        JDBCState state = (JDBCState) entry.getState(Transaction.AUTO_COMMIT);
        return state.isExposePrimaryKeyColumns();
    }
View Full Code Here

        return typeNames;
    }

    @Override
    protected ContentFeatureSource createFeatureSource(ContentEntry entry) throws IOException {
        ContentEntry type = ensureEntry(entry.getName());
        return new SolrFeatureSource(type);
    }
View Full Code Here

       
        reader = applyReprojectionDecorator(reader, localQuery, request);

        Transaction transaction = getTransaction();
        if (!Transaction.AUTO_COMMIT.equals(transaction)) {
            ContentEntry entry = getEntry();
            State state = transaction.getState(entry);
            WFSLocalTransactionState wfsState = (WFSLocalTransactionState) state;
            if (wfsState != null) {
                WFSDiff diff = wfsState.getDiff();
                reader = new DiffFeatureReader<SimpleFeatureType, SimpleFeature>(reader, diff, localQuery.getFilter());
View Full Code Here

    public void remove() throws IOException {
        try {
            dataStore.delete(featureType, last.getID(), st.getConnection());
           
            // issue notification
            ContentEntry entry = featureSource.getEntry();
            ContentState state = entry.getState( this.tx );
            if( state.hasListener() ){
                state.fireFeatureRemoved( featureSource, last );
            }
        } catch (SQLException e) {
            throw (IOException) new IOException().initCause(e);
View Full Code Here

            // do the write
            dataStore.update(featureType, changed, values, filter, st.getConnection());
           
            // issue notification
            ContentEntry entry = featureSource.getEntry();
            ContentState state = entry.getState( this.tx );
            if( state.hasListener() ){
                state.fireFeatureUpdated( featureSource, last, lastBounds );
            }
        } catch (Exception e) {
            throw (IOException) new IOException().initCause(e);
View Full Code Here

           
            //the datastore sets as userData, grab it and update the fid
            String fid = (String) last.getUserData().get( "fid" );
            last.setID( fid );
           
            ContentEntry entry = featureSource.getEntry();
            ContentState state = entry.getState( this.tx );           
            state.fireFeatureAdded( featureSource, last );
        } catch (SQLException e) {
            throw (IOException) new IOException().initCause(e);
        }
    }
View Full Code Here

    public CSVFeatureSource(CSVDataStore datastore) {
        this(datastore, Query.ALL);
    }

    public CSVFeatureSource(CSVDataStore datastore, Query query) {
        this(new ContentEntry(datastore, datastore.getTypeName()), query);
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.store.ContentEntry

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.