org.palo.api.subsets.filter.settings
Class AttributeConstraintsMatrix

java.lang.Object
  extended by org.palo.api.subsets.filter.settings.AttributeConstraintsMatrix

public class AttributeConstraintsMatrix
extends java.lang.Object

AttributeConstraintsMatrix

Manages the AttributeConstraints for the AttributeFilter by storing them in a matrix like way. That means each Attribute defines a column which contains all constraints for this certain attribute. The rows of this matrix define the conditions which have to be fulfilled by the attributes of a certain Element.

Version:
$Id: AttributeConstraintsMatrix.html,v 1.4 2009/07/09 11:01:46 ArndHouben Exp $

Constructor Summary
AttributeConstraintsMatrix()
           
 
Method Summary
 void addFilterConstraint(AttributeConstraint constraint)
          Adds the given attribute constraint to the matrix of all attribute constraints.
 void bind(Subset2 subset)
          Binds this instance to the given Subset2 NOTE: PLEASE DON'T USE!
 void clear()
          Clears the complete filter matrix.
 java.lang.String[] getAttributeIDs()
           
 AttributeConstraint[] getColumn(java.lang.String attrId)
          Returns the column for the attribute which is specified by the given attribute identifier.
 AttributeConstraint[] getRow(int index)
          Returns the n.th row of the constraints matrix.
 AttributeConstraint[][] getRows()
          Returns all rows of the attribute constraints matrix
 int getRowsCount()
          Returns the current row count
 void removeAllFilterConstraints(java.lang.String attrId)
          Removes all attribute constraints for the attribute which corresponds to the given attribute identifier.
 void removeFilterConstraint(AttributeConstraint constraint)
          Removes the given attribute constraint from the matrix of all attribute constraints.
 void unbind()
          Releases this instance from a previously binded Subset2 NOTE: PLEASE DON'T USE!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeConstraintsMatrix

public AttributeConstraintsMatrix()
Method Detail

getAttributeIDs

public final java.lang.String[] getAttributeIDs()

addFilterConstraint

public final void addFilterConstraint(AttributeConstraint constraint)
Adds the given attribute constraint to the matrix of all attribute constraints.

Parameters:
constraint - the attribute constraint to add

removeFilterConstraint

public final void removeFilterConstraint(AttributeConstraint constraint)
Removes the given attribute constraint from the matrix of all attribute constraints.

Parameters:
constraint - the attribute constraint to remove

removeAllFilterConstraints

public final void removeAllFilterConstraints(java.lang.String attrId)
Removes all attribute constraints for the attribute which corresponds to the given attribute identifier. Thus this method clears or removes the matrix column which corresponds to the specified attribute.

Parameters:
attrId - the identifier of the attribute to remove from the matrix

getColumn

public final AttributeConstraint[] getColumn(java.lang.String attrId)
Returns the column for the attribute which is specified by the given attribute identifier. The column contains all defined constraints for this attribute.

Parameters:
attrID - the attribute identifier to get the constraints for
Returns:
all attribute constraints

getRow

public final AttributeConstraint[] getRow(int index)
Returns the n.th row of the constraints matrix.

Parameters:
index - the index of the row to return
Returns:
an array containing the n.th row of the constraint matrix

getRows

public final AttributeConstraint[][] getRows()
Returns all rows of the attribute constraints matrix

Returns:
all matrix rows

getRowsCount

public final int getRowsCount()
Returns the current row count

Returns:
current row count

clear

public final void clear()
Clears the complete filter matrix.


bind

public final void bind(Subset2 subset)

Binds this instance to the given Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Parameters:
subset -

unbind

public final void unbind()

Releases this instance from a previously binded Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD