Class FeatureCollectionRole
- java.lang.Object
-
- org.openjump.core.apitools.objecttyperoles.FeatureCollectionRole
-
- Direct Known Subclasses:
RoleApplicationGrid
,RoleOutline
,RolePointFeatures
,RoleStandardFeatureCollection
,RoleTriangularIrregularNet
public abstract class FeatureCollectionRole extends Object
Base class for different roles of a PirolFeatureCollection, like RasterImage, Grid, Outline, etc.- Version:
- $Rev: 2434 $
- Author:
- Ole Rahn
FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement - See Also:
[sstein] - 22.Feb.2009 - modified to work in OpenJUMP
-
-
Field Summary
Fields Modifier and Type Field Description static int
numOfExistentRoles
Number of existent roles rolesprotected FeatureCollectionRoleTypes
type
-
Constructor Summary
Constructors Constructor Description FeatureCollectionRole(FeatureCollectionRoleTypes type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearRam()
Method to be called e.g.boolean
containsGrid()
boolean
containsImage()
boolean
equalsRole(int roleID)
Check if this role is the same type of role as the given role id.boolean
equalsRole(FeatureCollectionRole role)
Check if this role is the same type of role as the given one.boolean
equalsRole(FeatureCollectionRoleTypes roleType)
Check if this role is the same type of role as the given one.int
getRoleId()
FeatureCollectionRoleTypes
getType()
-
-
-
Field Detail
-
type
protected FeatureCollectionRoleTypes type
-
numOfExistentRoles
public static final int numOfExistentRoles
Number of existent roles roles
-
-
Constructor Detail
-
FeatureCollectionRole
public FeatureCollectionRole(FeatureCollectionRoleTypes type)
-
-
Method Detail
-
getRoleId
public int getRoleId()
- Returns:
- an integer that specifies the role type of the derived role object
- See Also:
FeatureCollectionRoleTypes
-
getType
public FeatureCollectionRoleTypes getType()
-
containsGrid
public boolean containsGrid()
- Returns:
- true if it contains gridded data (e.g. grid layer), else false
-
containsImage
public boolean containsImage()
- Returns:
- true if it contains raster data (e.g. raster image layer), else false
-
equalsRole
public boolean equalsRole(FeatureCollectionRole role)
Check if this role is the same type of role as the given one. Caution: If this role contains specific information (like RasterImage role), this information is not checked for equality - Only the type of the role is checked!- Parameters:
role
- role to check for type equality- Returns:
- true if this role is the same type of role as the given one, else false
-
equalsRole
public boolean equalsRole(FeatureCollectionRoleTypes roleType)
Check if this role is the same type of role as the given one. Caution: If this role contains specific information (like RasterImage role), this information is not checked for equality - Only the type of the role is checked!- Parameters:
roleType
- role to check for type equality- Returns:
- true if this role is the same type of role as the given one, else false
-
equalsRole
public boolean equalsRole(int roleID)
Check if this role is the same type of role as the given role id.- Parameters:
roleID
- id of the role type to check for type equality- Returns:
- true if this role is the same type of role as the given ID, else false
- See Also:
FeatureCollectionRoleTypes
-
clearRam
public void clearRam()
Method to be called e.g. by a FeatureCollection, when it's disposed to free RAM that may be bound in references to objects, that are still referenced by other objects, but won't be used without the FeatureCollection.
-
-