/** * @see org.geotools.data.DataStore#getTypeNames() */ public String[] getTypeNames() { return new String[] { featureType.getTypeName() }; }
/** * @see org.geotools.data.DataStore#getSchema(java.lang.String) */ public FeatureType getSchema(String typeName) throws IOException { if ((typeName != null) && typeName.equals(featureType.getTypeName())) { return featureType; } throw new IOException(typeName + " not available"); }
public Object getAttribute(String xPath) { if(xPath.indexOf(featureType.getTypeName())>-1) if(xPath.endsWith("]")){ return contents.values(); // TODO get index and grab it } else{ return contents.values(); } return null; }
private SortedSet typeNames() throws IOException { SortedSet typeNames = new TreeSet(); for( Iterator i=featuresources.values().iterator(); i.hasNext();){ FeatureSource fs = (FeatureSource) i.next(); FeatureType schema = fs.getSchema(); typeNames.add( schema.getTypeName() ); } return typeNames; } /** Map of dataStores by dataStoreId */
public void setAttribute(String xPath, Object attribute) throws IllegalAttributeException { if(xPath.indexOf(featureType.getTypeName())>-1){ if(xPath.endsWith("]")){ // TODO get index and grab it }else{ setAttribute(0,attribute); } } }
public VersionedPostgisFeatureStore(FeatureType schema, VersionedPostgisDataStore store) throws IOException { this.store = store; this.schema = schema; this.locking = (FeatureLocking) store.wrapped.getFeatureSource(schema.getTypeName()); }
public void setAttribute( String xPath, Object attribute ) throws IllegalAttributeException { if(xPath.indexOf(getFeatureType().getTypeName())>-1){ if(xPath.endsWith("]")){ // TODO get index and grab it } else { setAttribute(0,attribute); } } }
/** * Singular version, calls parent with getSchema().getTypeName() * * @see org.geotools.data.DataStore#getFeatureSource(java.lang.String) */ public FeatureSource getFeatureSource() throws IOException { return getFeatureSource(getSchema().getTypeName()); }
/** * Not really interested yet .. */ public Object getAttribute( String xPath ) { if(xPath.indexOf(getFeatureType().getTypeName())>-1) if(xPath.endsWith("]")){ return getAttribute(0); } else { return getAttribute(0); } return null; }
/** * A convenience method for calling<br> * <code> FeatureType f1; FeatureType f2; * f1.isDescendedFrom(f2.getNamespace(),f2.getName()); </code> * * @param type The type to compare to. * * @return true if descendant, false otherwise. */ public boolean isDescendedFrom(FeatureType type) { return isDescendedFrom(type.getNamespace(), type.getTypeName()); }
/** * Singular version, calls parent with getSchema().getTypeName() * * @see org.geotools.data.DataStore#updateSchema(java.lang.String, * org.geotools.feature.FeatureType) */ public void updateSchema(FeatureType featureType) throws IOException { updateSchema(getSchema().getTypeName(), featureType); }
public QueryCapabilities getQueryCapabilities() { try { VersionedPostgisDataStore ds = (VersionedPostgisDataStore) getDataStore(); return ds.wrapped.getFeatureSource(schema.getTypeName()).getQueryCapabilities(); } catch(Exception e) { throw new RuntimeException("This error should never happen", e); } }
protected FeatureCollection getFeatures(GetFeatureType request, FeatureSource source, Query gtQuery) throws IOException { if(!(source instanceof VersioningFeatureSource)) throw new WFSException(source.getSchema().getTypeName() + " is not versioned, cannot " + "execute a GetVersionedFeature on it"); return ((VersioningFeatureSource) source).getVersionedFeatures(gtQuery); }
/** * Lock features matching <code>filter</code>. * * @param filter * * @return Number of locked Features * * @throws IOException */ public int lockFeatures(Filter filter) throws IOException { return lockFeatures(new DefaultQuery(getSchema().getTypeName(),filter)); }
/** * Unlock Features specified by <code>filter</code>. * * @param filter * * @throws IOException */ public void unLockFeatures(Filter filter) throws IOException { unLockFeatures(new DefaultQuery(getSchema().getTypeName(),filter)); }
/** * Retrieve all Feature matching the Filter. * * @param filter Indicates features to retrieve * * @return FeatureResults indicating features matching filter * * @throws IOException If results could not be obtained */ public FeatureCollection getFeatures(Filter filter) throws IOException { return getFeatures(new DefaultQuery(getSchema().getTypeName(), filter)); }
public void remove() throws IOException { // if the feature is new, we have nothing to remove if (oldFeature == null) { throw new IOException("No feature available to remove"); } listenerManager.fireFeaturesRemoved(getFeatureType().getTypeName(), state.getTransaction(), oldFeature.getBounds(), false); writeOldFeature(true); }
protected FeatureReader getFeatureReader() throws IOException { try { return createFeatureReader(getSchema().getTypeName(), getAttributesReader(true), schema); } catch (SchemaException se) { throw new DataSourceException("Error creating schema", se); } }
protected FeatureReader getFeatureReader() throws IOException { try { return createFeatureReader(getSchema().getTypeName(), getAttributesReader(true), schema_); } catch (final SchemaException se) { throw new DataSourceException("Error creating schema", se); } }
public void fireChanged( Feature before, Feature after, Transaction transaction ){ String typeName = after.getFeatureType().getTypeName(); Envelope bounds = new Envelope(); bounds.expandToInclude( before.getBounds() ); bounds.expandToInclude( after.getBounds() ); listenerManager.fireFeaturesChanged( typeName, transaction, bounds, false ); } //