com.waveset.object
Class ExpressionViewUtil

java.lang.Object
  extended bycom.waveset.object.ExpressionViewUtil

public class ExpressionViewUtil
extends java.lang.Object


Field Summary
static java.lang.String ACTION_DELETE
           
static java.lang.String ACTION_DOWN
           
static java.lang.String ACTION_EDIT
           
static java.lang.String ACTION_NEW
           
static java.lang.String ACTION_RESET
          Action constants supported by some styles.
static java.lang.String ACTION_UP
           
static java.lang.String code_id
           
static java.lang.String STYLE_BOOLEAN
           
static java.lang.String STYLE_CONCAT
           
static java.lang.String STYLE_LIST
           
static java.lang.String STYLE_RULE
           
static java.lang.String STYLE_TERM
           
static java.lang.String STYLE_VALUE
           
static java.lang.String STYLE_XML
          Expression styles.
static java.lang.String TYPE_INT
           
static java.lang.String TYPE_REFERENCE
           
static java.lang.String TYPE_RULE
           
static java.lang.String TYPE_STRING
          Type constants for some of the expression styles.
 
Constructor Summary
ExpressionViewUtil()
           
 
Method Summary
static ExNode getExpression(GenericObject view)
          Build an expression from the view.
static GenericObject getView(ExNode exp)
          Build the view representation of an expression.
static void processActions(GenericObject root, GenericObject view)
          Called by the view refresh handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

STYLE_XML

public static final java.lang.String STYLE_XML
Expression styles.

See Also:
Constant Field Values

STYLE_VALUE

public static final java.lang.String STYLE_VALUE
See Also:
Constant Field Values

STYLE_LIST

public static final java.lang.String STYLE_LIST
See Also:
Constant Field Values

STYLE_RULE

public static final java.lang.String STYLE_RULE
See Also:
Constant Field Values

STYLE_CONCAT

public static final java.lang.String STYLE_CONCAT
See Also:
Constant Field Values

STYLE_BOOLEAN

public static final java.lang.String STYLE_BOOLEAN
See Also:
Constant Field Values

STYLE_TERM

public static final java.lang.String STYLE_TERM
See Also:
Constant Field Values

TYPE_STRING

public static final java.lang.String TYPE_STRING
Type constants for some of the expression styles.

See Also:
Constant Field Values

TYPE_INT

public static final java.lang.String TYPE_INT
See Also:
Constant Field Values

TYPE_REFERENCE

public static final java.lang.String TYPE_REFERENCE
See Also:
Constant Field Values

TYPE_RULE

public static final java.lang.String TYPE_RULE
See Also:
Constant Field Values

ACTION_RESET

public static final java.lang.String ACTION_RESET
Action constants supported by some styles.

See Also:
Constant Field Values

ACTION_NEW

public static final java.lang.String ACTION_NEW
See Also:
Constant Field Values

ACTION_DELETE

public static final java.lang.String ACTION_DELETE
See Also:
Constant Field Values

ACTION_UP

public static final java.lang.String ACTION_UP
See Also:
Constant Field Values

ACTION_DOWN

public static final java.lang.String ACTION_DOWN
See Also:
Constant Field Values

ACTION_EDIT

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

ExpressionViewUtil

public ExpressionViewUtil()
Method Detail

getView

public static GenericObject getView(ExNode exp)
Build the view representation of an expression. Select the most appropriate style.


getExpression

public static ExNode getExpression(GenericObject view)
                            throws WavesetException
Build an expression from the view. This may be the wrapper object containing the "exprsesion" attribute or the inner expression view.

Throws:
WavesetException

processActions

public static void processActions(GenericObject root,
                                  GenericObject view)
                           throws WavesetException
Called by the view refresh handler. Walk over the view looking for transient attributes respresenting actions to be performed on the view. This includes doing style transformations on the expressions, and processing requests to add or delete terms of an expression. Walk over the view looking for any "expression" objects that contain "newStyle" attributes. In practice we should only have one of these, but let's try to handle multiples. Could be more focused if we posted the path to the expression that triggered the refresh.

Throws:
WavesetException