public class TLcdS57Area extends TLcdComplexPolygon implements ILcdS57Object, ILcdDataObject,ILcdFeatured, Serializable
AREA, LINE, NONE, POINT
Constructor and Description |
---|
TLcdS57Area(ILcdPolygon[] polygons)
Deprecated.
Only TLcdS57Face instances are accepted as polygons. Use the constructor with
TLcdS57Face parameter instead.
|
TLcdS57Area(TLcdS57FeatureObject aFeatureObject,
TLcdS57Face[] aFaces)
Creates a new S-57 Area feature with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSetFeature(int aIndex)
Checks whether the specified feature is editable.
|
void |
clearCache()
Clears the cache.
|
Object |
clone()
Creates and returns a copy of this object.
|
boolean |
equals(Object o)
An object is considered equal to this shape if it has the same class.
|
TLcdDataType |
getDataType()
Returns the type of this data object.
|
TLcdS57Edge |
getEdge(int aIndex)
Deprecated.
Iterating over the faces and their edges is more performant.
|
int |
getEdgeCount()
Deprecated.
Iterating over the faces and their edges is more performant.
|
int |
getEdgeMask(int aIndex)
Returns the mask of the edge that is part of this Area, at the given index.
|
int |
getEdgeOrientation(int aIndex)
Returns the orientation of the edge that is part of this Area, at the given index.
|
int |
getEdgeUsage(int aIndex)
Returns the usage of the edge that is part of this Area, at the given index.
|
TLcdS57Face |
getFace(int aIndex)
Returns the face at
aIndex . |
int |
getFaceCount()
Returns the number of faces in this area.
|
Object |
getFeature(int aIndex)
Returns the feature
Object at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getGroup()
Returns the group to which the S-57 object belongs, this can be 1 (= skin of the earth)
or 2 (= all other objects).
|
ILcdS57Identifier |
getIdentifier()
Gets the identifier of this shape.
|
float |
getMaximumDepth()
Returns the maximum depth of this area and of containing and intersecting DEPARE and DRGARE
objects (only applicable for OBSTRN, UWTROC, and WRECK areas).
|
float |
getMinimumDepth()
Returns the minimum depth of this area and of underlying DEPARE objects (only applicable for
DEPARE and DEPCNT areas).
|
ILcdPoint |
getPoint(int aIndex)
Returns the
ILcdPoint at a given index. |
int |
getPointCount()
Returns the number of
ILcdPoint objects in the list. |
ILcdS57Relationship |
getRelationship(int aIndex)
Returns the relationship at index
aIndex . |
int |
getRelationshipCount()
Returns the number of relationships in which this S-57 object is involved.
|
int |
getShape()
Gets the type of the shape:
POINT , LINE , AREA or
NONE . |
Object |
getValue(String aPropertyName)
Convenience method that returns the value of the property with the given name.
|
Object |
getValue(TLcdDataProperty aProperty)
Returns the value of the given property.
|
int |
hashCode()
The hash code of this shape is the hash code of its class, in order to
be consistent with the
ALcdShape.equals(Object) method. |
boolean |
hasValue(String aPropertyName)
Indicates whether this data object has a value for the given property.
|
boolean |
hasValue(TLcdDataProperty aProperty)
Indicates whether this data object has a value for the given property.
|
void |
invalidateObject()
Invalidates all cached values of this object.
|
void |
setFeature(int aIndex,
Object aFeature)
Sets the feature
Object at the given index. |
void |
setGroup(int aGroup)
Sets the group to which the S-57 object belongs, this can be 1 (= skin of the earth) or 2 (=
all other objects).
|
void |
setIdentifier(ILcdS57Identifier aIdentifier)
Set the identifier of this object.
|
void |
setMaximumDepth(float aMaximumDepth)
Sets the maximum depth of this area and of containing and intersecting DEPARE and DRGARE
objects (only applicable for OBSTRN, UWTROC, and WRECK areas).
|
void |
setMinimumDepth(float aMinimumDepth)
Sets the minimum depth of this area and of underlying DEPARE objects (only applicable for
DEPARE and DEPCNT areas).
|
void |
setRelationships(ILcdS57Relationship[] aRelationships)
Sets the relationships in which this S-57 object is involved.
|
void |
setValue(String aPropertyName,
Object aValue)
Convenience method that sets the value of the property with the given name.
|
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
String |
toString() |
addPolygon, addPolygon, addPolygons, calculateFocusPoint, clearPolygons, contains2D, contains3D, getBounds, getCachedObject, getFocusPoint, getPolygon, getPolygonCount, getShape, getShapeCount, insertIntoCache, invalidateBounds, polygonChanged, polygonChanged, polygonsChanged, removeCachedObject, removePolygon, removePolygon, removePolygons, setFocusPoint, setPolygon, setPolygon, setPolygons, setShape
contains2D, contains3D, fromDomainObject
finalize, getClass, notify, notifyAll, wait, wait, wait
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
getPointSFCT, getX, getY, getZ
public TLcdS57Area(ILcdPolygon[] polygons)
polygons
- the geometry defining the geographical extent for this Area feature.public TLcdS57Area(TLcdS57FeatureObject aFeatureObject, TLcdS57Face[] aFaces)
aFeatureObject
- the S-57 feature object describing the object class and
attributes of this Area feature.aFaces
- the faces defining the geographical extent of this Area feature.public int getFaceCount()
public TLcdS57Face getFace(int aIndex)
aIndex
.aIndex
- the index of the face to be returned.aIndex
.public int getEdgeCount()
public TLcdS57Edge getEdge(int aIndex)
aIndex
- the edge that is part of this area, at the given index.public int getEdgeOrientation(int aIndex)
TLcdS57Constants.ORIENTATION_FORWARD
or TLcdS57Constants.ORIENTATION_REVERSE
.aIndex
- the orientation of the edge that is part of this Area, at the given index.public int getEdgeUsage(int aIndex)
TLcdS57Constants.USAGE_EXTERIOR
, TLcdS57Constants.USAGE_INTERIOR
or
TLcdS57Constants.USAGE_EXTERIOR_TRUNCATED
.aIndex
- the usage of the edge that is part of this Area, at the given index.public int getEdgeMask(int aIndex)
TLcdS57Constants.MASK_MASK
, TLcdS57Constants.MASK_SHOW
or
TLcdS57Constants.MASK_NOT_APPLICABLE
.aIndex
- the mask of the edge that is part of this Area, at the given index.public void setMinimumDepth(float aMinimumDepth)
minimumDepth
property is part of the set of preprocessor variables.aMinimumDepth
- the minimum depth of this area and of underlying DEPARE objects.getMinimumDepth()
,
TLcdS57Preprocessor
public float getMinimumDepth()
minimumDepth
property is part of the set of preprocessor variables.setMinimumDepth(float)
,
TLcdS57Preprocessor
public void setMaximumDepth(float aMaximumDepth)
maximumDepth
property is part of the set of preprocessor variables.aMaximumDepth
- the maximum depth of this area and of containing and intersecting DEPARE
and DRGARE
objects.getMaximumDepth()
,
TLcdS57Preprocessor
public float getMaximumDepth()
maximumDepth
property is part of the set of preprocessor variables.setMaximumDepth(float)
,
TLcdS57Preprocessor
public void setIdentifier(ILcdS57Identifier aIdentifier)
aIdentifier
- the S-57 identifier to be set on this object.public void setGroup(int aGroup)
public void setRelationships(ILcdS57Relationship[] aRelationships)
relationship.getFirstObject() == this || relationship.getSecondObject() == thisIf this object is not involved in any relationship, this method should be called with argument
null
.aRelationships
- the array of relationships in which this object is involed.public ILcdS57Identifier getIdentifier()
ILcdS57FeatureObject
getIdentifier
in interface ILcdS57FeatureObject
public int getGroup()
ILcdS57FeatureObject
getGroup
in interface ILcdS57FeatureObject
public int getShape()
ILcdS57FeatureObject
POINT
, LINE
, AREA
or
NONE
.getShape
in interface ILcdS57FeatureObject
public int getRelationshipCount()
ILcdS57FeatureObject
getRelationshipCount
in interface ILcdS57FeatureObject
public ILcdS57Relationship getRelationship(int aIndex)
ILcdS57FeatureObject
aIndex
.getRelationship
in interface ILcdS57FeatureObject
aIndex
- index of the relationship to returnpublic TLcdDataType getDataType()
ILcdDataObject
null
.getDataType
in interface ILcdDataObject
public Object getValue(TLcdDataProperty aProperty)
ILcdDataObject
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the data object's type
or in one of its super types.
Otherwise an IllegalArgumentException
is thrown.
getValue
in interface ILcdDataObject
aProperty
- the property for which the value is to be returnedpublic Object getValue(String aPropertyName)
ILcdDataObject
Convenience method that returns the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.getValue(TLcdDataProperty)
for more information.getValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be returnedTLcdDataType.getProperty(String)
public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public void setValue(String aPropertyName, Object aValue)
ILcdDataObject
Convenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)
for more information.setValue
in interface ILcdDataObject
aPropertyName
- the name of the property of which the value is to be setaValue
- the value to setpublic boolean hasValue(TLcdDataProperty aProperty)
ILcdDataObject
aProperty
is from the right data type
, and this instance has a value for it: returns true
aProperty
is from the right data type
, and this instance has no value for it: returns false
aProperty
is not from the right data type
: not allowed, you will get IllegalArgumentExceptionaProperty
is null
: not allowed, you will get NullPointerExceptionhasValue
in interface ILcdDataObject
aProperty
- the property for which to return whether a value is present or not.true
if this data object has a value for the given property, false
otherwise.public boolean hasValue(String aPropertyName)
ILcdDataObject
ILcdDataObject.hasValue(TLcdDataProperty)
for more information.hasValue
in interface ILcdDataObject
aPropertyName
- the name of the property for which to return whether a value is present
or not.true
if this data object has a value for the property with the given name,
false
otherwise.public boolean canSetFeature(int aIndex)
ILcdFeatured
canSetFeature
in interface ILcdFeatured
aIndex
- a valid feature index.public Object getFeature(int aIndex) throws IndexOutOfBoundsException
ILcdFeatured
Object
at the given index.getFeature
in interface ILcdFeatured
aIndex
- a valid feature index.Object
at the given index.IndexOutOfBoundsException
- when an index is chosen greater than the result of getFeatureCount.ILcdFeatured.setFeature(int, java.lang.Object)
public int getFeatureCount()
ILcdFeatured
getFeatureCount
in interface ILcdFeatured
public void setFeature(int aIndex, Object aFeature) throws IllegalArgumentException
ILcdFeatured
Object
at the given index.setFeature
in interface ILcdFeatured
aIndex
- a valid feature index.aFeature
- the new feature Object
.IllegalArgumentException
- if the feature can't be set.ILcdFeatured.getFeature(int)
,
ILcdFeatured.canSetFeature(int)
public void clearCache()
ILcdCache
clearCache
in interface ILcdCache
clearCache
in class TLcdComplexPolygon
public void invalidateObject()
ILcdInvalidateable
invalidateObject
in interface ILcdInvalidateable
invalidateObject
in class TLcdComplexPolygon
public boolean equals(Object o)
ALcdShape
equals
in class TLcdComplexPolygon
public int hashCode()
ALcdShape
ALcdShape.equals(Object)
method.
Extensions should refine this implementation, based on their properties.hashCode
in class TLcdComplexPolygon
public Object clone()
TLcdComplexPolygon
clone
in interface ILcdCloneable
clone
in class TLcdComplexPolygon
Object.clone()
public int getPointCount()
ILcdPointList
ILcdPoint
objects in the list.getPointCount
in interface ILcdPointList
getPointCount
in class TLcdComplexPolygon
ILcdPoint
objects in the list.public ILcdPoint getPoint(int aIndex) throws IndexOutOfBoundsException
ILcdPointList
ILcdPoint
at a given index.getPoint
in interface ILcdPointList
getPoint
in class TLcdComplexPolygon
aIndex
- a valid index in the list of ILcdPoint
objects.ILcdPoint
at the given index.IndexOutOfBoundsException
- if the given index is out of bounds.