issrg.pba.rbac.xmlpolicy.ifstatement
Class LtNode

java.lang.Object
  extended by issrg.pba.rbac.xmlpolicy.PolicyXMLNode
      extended by issrg.pba.rbac.xmlpolicy.ifstatement.TermNode
          extended by issrg.pba.rbac.xmlpolicy.ifstatement.OperationNode
              extended by issrg.pba.rbac.xmlpolicy.ifstatement.LtNode
All Implemented Interfaces:
Term

public class LtNode
extends OperationNode

This is the class for LT node of the IF-statement. Its functionality is very much determined by OperationNode, which is configured to deliver the following semantics:

This operation expects two and only two Terms of any type, and returns a value of type Types.BOOLEAN_TYPE. The evaluation result is "true", if and only if there is an interpreter for the required set of Terms, and it evaluates that the first Term is strictly less than the second Term.

It is possible to register the interpreters for specific combinations of Terms. Use registerInterpreter method to do that. There is no default Interpreter.

Author:
A.Otenko
See Also:
registerInterpreter(issrg.pba.rbac.xmlpolicy.ifstatement.Interpreter)

Field Summary
static java.lang.String LT_NODE
           
 
Fields inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.OperationNode
interpreter, type
 
Fields inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.TermNode
maxOperand, minOperand, terms
 
Fields inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode
attributes, children, name, nodeStr
 
Constructor Summary
protected LtNode()
           
  LtNode(XMLPolicyParser p, org.xml.sax.Attributes attrs)
          This constructor builds a LtNode given the XMLPolicyParser and the set of attributes of this XML element.
 
Method Summary
static void register()
          Call this method to register the node with the XMLPolicyParser.
static void registerInterpreter(Interpreter i)
          This method maintains a register of interpreters for specific combinations of Terms.
 
Methods inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.OperationNode
construct, evaluate, getType
 
Methods inherited from class issrg.pba.rbac.xmlpolicy.ifstatement.TermNode
getInterpretersForNode, registerInterpreterForNode
 
Methods inherited from class issrg.pba.rbac.xmlpolicy.PolicyXMLNode
addChild, addString, getAttributes, getChildren, getName, getString, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LT_NODE

public static final java.lang.String LT_NODE
See Also:
Constant Field Values
Constructor Detail

LtNode

protected LtNode()

LtNode

public LtNode(XMLPolicyParser p,
              org.xml.sax.Attributes attrs)
This constructor builds a LtNode given the XMLPolicyParser and the set of attributes of this XML element. It expects that there are two and only two child nodes.

Parameters:
p - - the XMLPolicyParser that builds this LtNode
attr - - the attributes of this XML element
Method Detail

register

public static void register()
Call this method to register the node with the XMLPolicyParser.


registerInterpreter

public static void registerInterpreter(Interpreter i)
This method maintains a register of interpreters for specific combinations of Terms. If no special interpreters are registered, the evaluation error occurs. The semantics of the interpreters should make sure that the first Term is strictly less than the second Term in the array passed to the evaluate method of that Interpreter.

Parameters:
i - - the Interpreter instance that can evaluate inequality expression for some combination of Terms
See Also:
Interpreter.evaluate(issrg.pba.rbac.xmlpolicy.ifstatement.Environment, issrg.pba.rbac.xmlpolicy.ifstatement.Term[])