public class OXFFeature extends Object
Constructor and Description |
---|
OXFFeature(String id,
OXFFeatureType featureType) |
OXFFeature(String id,
OXFFeatureType featureType,
OXFFeatureCollection parent) |
Modifier and Type | Method and Description |
---|---|
static OXFFeature |
createFrom(net.opengis.gml.FeaturePropertyType xb_featureMember)
Parses a single feature entity to an OXFFeature object.
|
static OXFFeature |
createFrom(net.opengis.samplingSpatial.x20.SFSpatialSamplingFeatureType samplingFeatureType) |
boolean |
equals(Object obj) |
Object |
getAttribute(String name)
Returns the value of the named attribute of this
Feature . |
com.vividsolutions.jts.geom.Geometry |
getBoundingBox() |
OXFFeatureType |
getFeatureType()
Returns the description of this feature's type.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry() |
String |
getID()
Returns a String that uniquely identifies this
Feature instance with this Java virtual machine
(and perhaps uniquely in a broader scope as well). |
OXFFeatureCollection |
getParent()
Returns the collection in which this Feature is contained.
|
String[] |
getSpecifiedAttributes() |
int |
hashCode() |
String |
produceDescription() |
void |
setAttribute(String name,
Object value)
Sets the value of the named attribute.
|
void |
setGeometry(com.vividsolutions.jts.geom.Geometry g) |
String |
toString() |
public OXFFeature(String id, OXFFeatureType featureType)
public OXFFeature(String id, OXFFeatureType featureType, OXFFeatureCollection parent)
public String[] getSpecifiedAttributes()
OXFFeature
.public OXFFeatureType getFeatureType()
public Object getAttribute(String name) throws IllegalArgumentException
Feature
. If the maximum cardinality of this
attribute is one, then this method returns the value of the attribute. Otherwise, if the maximum
cardinality of this attribute is greater than one, then this method will return an instance of
Collection
.name
- The name of the feature attribute to retrieve.IllegalArgumentException
- If an attribute of the given name does not exist in this feature's type.public void setAttribute(String name, Object value) throws IllegalArgumentException, ClassCastException
Collection
if the
attribute's maximum cardinality is greater than one. name
- The name of the attribute whose value to set.value
- The new value of the given attribute.IllegalArgumentException
- If value
is a collection (other than a singleton)
and it's a single-valued attribute, or if the given name does not match any of the attributes
of this feature.ClassCastException
- If the attribute type is a type other than Object
in the FeatureType
and an
incorrect type is passed in.public String getID()
Feature
instance with this Java virtual machine
(and perhaps uniquely in a broader scope as well). This value is not necessarily one of the attributes
of this feature. Some features may implement this method by concatenating this feature's type name with
the String values of all of the primary key attributes. (This is only a suggestion, however, and a
given Feature
implementation may choose to compute the ID in whatever way makes sense.)public OXFFeatureCollection getParent()
public com.vividsolutions.jts.geom.Geometry getBoundingBox()
envelope
of the geometry of this feature. or null if this object does not
contain a geometry.public com.vividsolutions.jts.geom.Geometry getGeometry()
public void setGeometry(com.vividsolutions.jts.geom.Geometry g)
public String produceDescription()
public static OXFFeature createFrom(net.opengis.samplingSpatial.x20.SFSpatialSamplingFeatureType samplingFeatureType)
public static OXFFeature createFrom(net.opengis.gml.FeaturePropertyType xb_featureMember) throws OXFException
xb_featureMember
- OXFException
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.