Class TLcdOGCBinaryLogicOperator

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.filter.model.TLcdOGCBinaryLogicOperator
All Implemented Interfaces:
ILcdDataObject, ILcdGenericExpression, ILcdOGCCondition, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdOGCBinaryLogicOperator extends TLcdDataObject implements ILcdOGCCondition
This class represents the elements of type <ogc:BinaryLogicOpType>. Namely:
  • <ogc:And>
  • <ogc:Or>
According to the OGC Filter specification, a logical operator can be used to combine one or more conditional expressions. The logical operator AND evaluates to TRUE if all the combined expressions evaluate to TRUE. The operator OR operator evaluates to TRUE if any of the combined expressions evaluate to TRUE.

A TLcdOGCBinaryLogicOperator instance is composed of a logic operation type that must be one of the constants defined in this class and two or more ILcdOGCCondition instances that represents the condition operands.

  • Field Details

    • AND

      public static final int AND
      Logic operation type that corresponds to the <ogc:And> element.
      See Also:
    • OR

      public static final int OR
      Logic operation type that corresponds to the <ogc:Or> element.
      See Also:
  • Constructor Details

    • TLcdOGCBinaryLogicOperator

      public TLcdOGCBinaryLogicOperator()
      Default constructor.
    • TLcdOGCBinaryLogicOperator

      public TLcdOGCBinaryLogicOperator(int aType)
      Constructs an instance for a given logic operation type.
      Parameters:
      aType - the logic operation type. It must be one of the constants of this class.
    • TLcdOGCBinaryLogicOperator

      public TLcdOGCBinaryLogicOperator(int aType, ILcdOGCCondition... aConditions)
      Constructs an instance for a given logic operation type and the given operands.
      Parameters:
      aType - the logic operation type. It must be one of the constants of this class.
      aConditions - the condition operands
  • Method Details

    • getType

      public int getType()
      Gets the given logic operation type.
      Returns:
      the given logic operation type. It will be one of the constants of this class.
    • setType

      public void setType(int aType)
      Sets the given logic operation type. It must be one of the constants of this class.
      Parameters:
      aType - the given logic operation type.
    • removeCondition

      public boolean removeCondition(ILcdOGCCondition aCondition)
      Removes a condition.
      Parameters:
      aCondition - the condition to be removed.
      Returns:
      true if aCondition was an operand of the logic operator; false otherwise.
    • getConditions

      public List<ILcdOGCCondition> getConditions()
      Returns the conditions for this operator
      Returns:
      the list of conditions for this operator
    • insertConditionAt

      public void insertConditionAt(ILcdOGCCondition aCondition, int aIndex)
      Inserts a condition at a given position.
      Parameters:
      aCondition - the condition of the operand to be inserted.
      aIndex - the index of the given position.
    • addCondition

      public void addCondition(ILcdOGCCondition aCondition)
      Adds a condition.
      Parameters:
      aCondition - the condition to be added.
    • getConditionCount

      public int getConditionCount()
      Gets the number of condition operands.
      Returns:
      the number of condition operands.
    • getCondition

      public ILcdOGCCondition getCondition(int aIndex)
      Gets the condition at a given position.
      Parameters:
      aIndex - the index of the given position.
      Returns:
      the condition.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class TLcdDataObject