Class TLcdOGCBinaryOperator

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

public class TLcdOGCBinaryOperator extends TLcdDataObject implements ILcdOGCExpression
This class represents the elements of type <ogc:BinaryOperatorType>. Namely:
  • <ogc:Add>
  • <ogc:Mul>
  • <ogc:Sub>
  • <ogc:Div>
According to the OGC Filter specification, these elements defined are used to encode the fundamental arithmetic operations of addition, subtraction, multiplication and division. Arithmetic operators are binary operators meaning that they accept two arguments and evaluate to a single result.

A TLcdOGCBinaryOperator instance is composed of an arithmetic operation type that must be one of the constants defined in this class, and two operands that can be any instances of ILcdOGCExpression.

Note that the OGC Filter 2.0 standard no longer includes the binary operators. You will get an IllegalArgumentException when you use this operator in OGC Filter 2.0 XML (for example WFS 2.0).

See Also:
  • Field Details

    • ADD

      public static final int ADD
      Arithmetic operation type that corresponds to the <ogc:Add> element.
      See Also:
    • SUBSTRACT

      public static final int SUBSTRACT
      Arithmetic operation type that corresponds to the <ogc:Sub> element.
      See Also:
    • MULTIPLY

      public static final int MULTIPLY
      Arithmetic operation type that corresponds to the <ogc:Mul> element.
      See Also:
    • DIVIDE

      public static final int DIVIDE
      Arithmetic operation type that corresponds to the <ogc:Div> element.
      See Also:
  • Constructor Details

    • TLcdOGCBinaryOperator

      public TLcdOGCBinaryOperator()
      Default constructor.
    • TLcdOGCBinaryOperator

      public TLcdOGCBinaryOperator(int aType)
      Creates an instance with a given arithmetic operation type.
      Parameters:
      aType - arithmetic operation type of the instance. The type must be one of the constants defined in this class.
    • TLcdOGCBinaryOperator

      public TLcdOGCBinaryOperator(int aType, ILcdOGCExpression aFirstExpression, ILcdOGCExpression aSecondExpression)
      Creates an instance with a given arithmetic operation type and its 2 operands.
      Parameters:
      aType - arithmetic operation type of the instance. The type must be one of the constants defined in this class.
      aFirstExpression - the first operand.
      aSecondExpression - the second operand.
  • Method Details

    • getFirstExpression

      public ILcdOGCExpression getFirstExpression()
      Gets the first operand of the arithmetic operation.
      Returns:
      the first operand of the arithmetic operation.
    • setFirstExpression

      public void setFirstExpression(ILcdOGCExpression aFirstExpression)
      Sets the first operand of the arithmetic operation.
      Parameters:
      aFirstExpression - the first operand of the arithmetic operation.
    • getSecondExpression

      public ILcdOGCExpression getSecondExpression()
      Gets the second operand of the arithmetic operation.
      Returns:
      the second operand of the arithmetic operation.
    • setSecondExpression

      public void setSecondExpression(ILcdOGCExpression aSecondExpression)
      Sets the second operand of the arithmetic operation.
      Parameters:
      aSecondExpression - the second operand of the arithmetic operation.
    • getType

      public int getType()
      Gets the arithmetic operation type.
      Returns:
      the arithmetic operation type. The type will be one of the constants defined in this class.
    • setType

      public void setType(int aType)
      Sets the arithmetic operation type.
      Parameters:
      aType - the arithmetic operation type. The type must be one of the constants defined in this class.
    • 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