org.openorb.constraint.evaluator
Class IdentifierEvaluator

java.lang.Object
  extended by org.openorb.constraint.evaluator.IdentifierEvaluator

public class IdentifierEvaluator
extends java.lang.Object

This class is the identifier evaluator. It means that it is possible to get an identifier value by parsing input values ( as any or dynamic object ). A dynamic object is evaluated on the fly.

Author:
Jerome Daniel

Constructor Summary
IdentifierEvaluator(org.omg.CORBA.ORB orb)
          Simple constructor, it only requires an ORB reference.
 
Method Summary
 void addValue(java.lang.String name, java.lang.Object value)
          This operation is used by the value extract to complete the identifier table
 java.lang.String filterIdentifier(java.lang.String name)
          This operation removes the '\' occurences from an identifier.
 java.lang.Object getIdentifierValue(java.lang.String identifier_name)
          This operation is used by the evaluation graph evaluator to get an identifier value.
 java.lang.Object getIdentifierValueByComplexSearch(java.lang.String identifier_name)
          This operation is used to search an identifier value from values set in the table.
 boolean isIndex(java.lang.String name)
          This operation returns true if the accessor name is for an index.
 boolean isValuePair(java.lang.String name)
          This operation returns true if the accessor name is for a value pair.
 void setTopLevelValues(NamedValuePair[] values)
          This operation is used to set all top level identifier values for evaluation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifierEvaluator

public IdentifierEvaluator(org.omg.CORBA.ORB orb)
Simple constructor, it only requires an ORB reference. The ORB reference is required since the DynAny classes are used.

Method Detail

setTopLevelValues

public void setTopLevelValues(NamedValuePair[] values)
This operation is used to set all top level identifier values for evaluation.


getIdentifierValue

public java.lang.Object getIdentifierValue(java.lang.String identifier_name)
This operation is used by the evaluation graph evaluator to get an identifier value.


getIdentifierValueByComplexSearch

public java.lang.Object getIdentifierValueByComplexSearch(java.lang.String identifier_name)
This operation is used to search an identifier value from values set in the table. It removes the last component name and tries to find the new identifier. If it is found, it uses the value extract to find the reminding fields in the value. If the identifier is not found, it continues to remove another part of the name, etc...


addValue

public void addValue(java.lang.String name,
                     java.lang.Object value)
This operation is used by the value extract to complete the identifier table


isValuePair

public boolean isValuePair(java.lang.String name)
This operation returns true if the accessor name is for a value pair.


isIndex

public boolean isIndex(java.lang.String name)
This operation returns true if the accessor name is for an index.


filterIdentifier

public java.lang.String filterIdentifier(java.lang.String name)
This operation removes the '\' occurences from an identifier.