org.openjump.core.apitools.objecttyperoles
Class FeatureCollectionRole

java.lang.Object
  extended by org.openjump.core.apitools.objecttyperoles.FeatureCollectionRole
Direct Known Subclasses:
RoleApplicationGrid, RoleOutline, RolePointFeatures, RoleStandardFeatureCollection, RoleTriangularIrregularNet

public abstract class FeatureCollectionRole
extends java.lang.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
static int numOfExistentRoles
          Number of existent roles roles
protected  FeatureCollectionRoleTypes type
           
 
Constructor Summary
FeatureCollectionRole(FeatureCollectionRoleTypes type)
           
 
Method Summary
 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.
 boolean containsGrid()
           
 boolean containsImage()
           
 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.
 boolean equalsRole(int roleID)
          Check if this role is the same type of role as the given role id.
 int getRoleId()
           
 FeatureCollectionRoleTypes getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
PirolFeatureCollectionRoleTypes

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:
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(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:
PirolFeatureCollectionRoleTypes

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.