context.arch.discoverer.querySystem
Class AbstractBooleanQueryItem

java.lang.Object
  extended bycontext.arch.discoverer.querySystem.AbstractQueryItem
      extended bycontext.arch.discoverer.querySystem.AbstractBooleanQueryItem
Direct Known Subclasses:
ANDQueryItem, NOTQueryItem, ORQueryItem

public abstract class AbstractBooleanQueryItem
extends AbstractQueryItem

Author:
Agathe

Field Summary
static java.lang.String ABSTRACT_BOOLEAN_QUERY_ITEM
          Tags for DataObject building
protected  java.lang.String booleanCondition
          the name of this boolean condition object
protected  AbstractQueryItem left
          the left element : exists in all cases
static java.lang.String LEFT
           
static java.lang.String NAME
           
protected  AbstractQueryItem right
          the right element : doesn't exist in all the cases
static java.lang.String RIGHT
           
 
Fields inherited from class context.arch.discoverer.querySystem.AbstractQueryItem
ABSTRACT_QUERY_ITEM
 
Constructor Summary
AbstractBooleanQueryItem(java.lang.String type, AbstractQueryItem left)
          Creates new BooleanQueryItem.
AbstractBooleanQueryItem(java.lang.String type, AbstractQueryItem left, AbstractQueryItem right)
          Creates new BooleanQueryItem.
 
Method Summary
static AbstractBooleanQueryItem factory(java.lang.String name, AbstractQueryItem left, AbstractQueryItem right)
          Returns the right object corresponding to the specified name
static AbstractQueryItem fromDataObject(DataObject data)
          Takes a dataObject and returns an AbstracQueryItem object
 java.lang.String getBooleanCondition()
          Returns the name of this element : the boolean condition name
abstract  java.lang.Object process(AbstractDataModel dataModel)
          This method allows to process the boolean condition on the whole data model
abstract  boolean process(java.lang.Object component)
          Returns true if the component fits the query item
 DataObject toDataObject()
          Return the DataObject version of this object
 java.lang.String toString()
          Returns a printable version of this object
 
Methods inherited from class context.arch.discoverer.querySystem.AbstractQueryItem
arrayToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ABSTRACT_BOOLEAN_QUERY_ITEM

public static final java.lang.String ABSTRACT_BOOLEAN_QUERY_ITEM
Tags for DataObject building

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

LEFT

public static final java.lang.String LEFT
See Also:
Constant Field Values

RIGHT

public static final java.lang.String RIGHT
See Also:
Constant Field Values

left

protected AbstractQueryItem left
the left element : exists in all cases


right

protected AbstractQueryItem right
the right element : doesn't exist in all the cases


booleanCondition

protected java.lang.String booleanCondition
the name of this boolean condition object

Constructor Detail

AbstractBooleanQueryItem

public AbstractBooleanQueryItem(java.lang.String type,
                                AbstractQueryItem left)
Creates new BooleanQueryItem. It corresponds to a node in a tree

Parameters:
type - The name of this element
left -

AbstractBooleanQueryItem

public AbstractBooleanQueryItem(java.lang.String type,
                                AbstractQueryItem left,
                                AbstractQueryItem right)
Creates new BooleanQueryItem. It corresponds to a node in a tree

Parameters:
type - The name of this element
left -
right -
Method Detail

process

public abstract java.lang.Object process(AbstractDataModel dataModel)
This method allows to process the boolean condition on the whole data model

Specified by:
process in class AbstractQueryItem
Parameters:
dataModel -
Returns:
Object

process

public abstract boolean process(java.lang.Object component)
Returns true if the component fits the query item

Specified by:
process in class AbstractQueryItem
Parameters:
component -
Returns:
boolean

getBooleanCondition

public java.lang.String getBooleanCondition()
Returns the name of this element : the boolean condition name


toString

public java.lang.String toString()
Returns a printable version of this object

Specified by:
toString in class AbstractQueryItem
Returns:
String

toDataObject

public DataObject toDataObject()
Return the DataObject version of this object

Specified by:
toDataObject in class AbstractQueryItem
Returns:
DataObject

fromDataObject

public static AbstractQueryItem fromDataObject(DataObject data)
Takes a dataObject and returns an AbstracQueryItem object

Parameters:
data -
Returns:

factory

public static AbstractBooleanQueryItem factory(java.lang.String name,
                                               AbstractQueryItem left,
                                               AbstractQueryItem right)
Returns the right object corresponding to the specified name

Parameters:
name - The name of the object
left -
right - return AbstractBooleanQueryItem