com.nesstar.api.subset
Interface Unparser


public interface Unparser

An implementation of this interface is required to call the unparse method in CaseSubset. The unparsing is performed recursively on subexpressions, and it is the responsibility of the unparser to generate the actual text.

Since:
0.1
See Also:
CaseSubset.unparse(Unparser)

Method Summary
 String unparseConjunction(String... subExpressions)
          Binds together subexpressions in a conjunction, e.g. "( ID('V5') = 0 ) AND ( (...)
 String unparseDisjunction(String... subExpressions)
          Binds together subexpressions in a conjunction, e.g. "( ID('V5') = 0 ) OR ( (...)
 String unparseNegation(String expession)
          Negates an expression, e.g.
 String unparseSimpleTerm(Variable var, Object value, Expression.Operator op)
          Generate a string representation of a simple term, for example ID('V22') = 5.23452.
 

Method Detail

unparseSimpleTerm

String unparseSimpleTerm(Variable var,
                         Object value,
                         Expression.Operator op)
Generate a string representation of a simple term, for example ID('V22') = 5.23452.

Parameters:
var - The "V22" part
value - The "5.23452" part
op - The "=" part
Returns:
A String representing the term

unparseConjunction

String unparseConjunction(String... subExpressions)
Binds together subexpressions in a conjunction, e.g. "( ID('V5') = 0 ) AND ( (...) OR (...) ) AND ..."

Parameters:
subExpressions -
Returns:
A String representing the conjunction

unparseDisjunction

String unparseDisjunction(String... subExpressions)
Binds together subexpressions in a conjunction, e.g. "( ID('V5') = 0 ) OR ( (...) AND (...) ) OR ..."

Parameters:
subExpressions -
Returns:
A String representing the disjunction

unparseNegation

String unparseNegation(String expession)
Negates an expression, e.g. "NOT (...)"

Parameters:
expession -
Returns:
A String representing the negation
Since:
0.2


Copyright © 2011, NSD All rights reserved