@Override public BoundingBox getBounds() { // Calculate bounds? // if (bounds == null) { // // Initialize bounds // bounds = new ReferencedEnvelope(getFeatureType().getCoordinateReferenceSystem()); // // Loop over all geometries // for (EFeatureGeometry<Geometry> it : eInternal.getGeometryList(Geometry.class)) { if (!it.isEmpty()) { Geometry g = it.getValue(); if (bounds.isNull()) { bounds.init(g.getEnvelopeInternal()); } else { bounds.expandToInclude(g.getEnvelopeInternal()); } } } } return bounds; }
@Override public List<Object> write(Transaction transaction) throws IllegalStateException { // // Decide if feature values is allowed to be updated from backing store // if (!isDetached()) { throw new IllegalStateException( "ESimpleFeature " + getType().getTypeName() + " is not detached"); } // // Get properties // List<EFeaturePropertyDelegate<?, ? extends Property, ? extends EStructuralFeature>> eList = eInternal.getProperties(); // // Prepare to read values from properties // List<Object> eValues = new ArrayList<Object>(eList.size()); // // Loop over all properties // for (EFeatureProperty<?, ? extends Property> it : eList) { eValues.add(it.write(eInternal().eTx)); } // // Finished // return eValues; }
@Override public Property getProperty(String eName) { // Get instance, returns null if not found // EFeatureProperty<?, ? extends Property> eProperty = eInternal.getPropertyMap().get(eName); // // Get property instance, return null if not found // return (eProperty != null ? eProperty.getData() : null); }
@Override public List<Property> getProperties() { // Initialize // List<Property> eList = new ArrayList<Property>(); // // Loop over all EFeatureProperty instances, // collecting current Property instances. // for (EFeatureProperty<?, ? extends Property> it : eInternal.getProperties()) { eList.add(it.getData()); } // Finished // return Collections.unmodifiableList(eList); }
@Override public List<Object> read(Transaction transaction) throws IllegalStateException { // // Get properties // List<EFeaturePropertyDelegate<?, ? extends Property, ? extends EStructuralFeature>> eList = eInternal.getProperties(); // // Prepare to read values from properties // List<Object> eValues = new ArrayList<Object>(eList.size()); // // Loop over all properties // for (EFeatureProperty<?, ? extends Property> it : eList) { eValues.add(it.read(eInternal().eTx)); } // // Finished // return eValues; }
@Override public GeometryAttribute getDefaultGeometryProperty() { // // Get default Geometry name // String eName = eStructure().eGetDefaultGeometryName(); // // Get EFeatureGeometry structure // EFeatureGeometry<?> eGeometry = (EFeatureGeometry<?>) eInternal.getPropertyMap().get(eName); // // Found geometry? // if (eGeometry != null) { // Get attribute // return eGeometry.getData(); } // // Not found, return null; // return null; }
@Override public int getAttributeCount() { return eInternal.getProperties().size(); }
@Override public EFeature eFeature() { return (EFeature) eInternal.eFeature(); }
@Override public EObject eObject() { return eInternal.eImpl(); }