com.orchestranetworks.instance
Interface ValueContext

All Known Subinterfaces:
ValueContextForInputValidation, ValueContextForUpdate, ValueContextForValidation

public interface ValueContext

Common interface for accessing the content and context of an instance or an occurrence.

See Also:
Adaptation

Method Summary
 String displayOccurrence(Object value, Locale aLocale)
          Deprecated. This method is replaced by SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)
 String formatOccurrence(Object value)
          Deprecated. Client code should call either SchemaNode.formatToXsString(Object) or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).
 AdaptationHome getHome()
          Returns the current home.
 SchemaNode getNode()
          Returns the current schema node of this context.
 SchemaNode getNode(Path aPath)
          Returns the schema node at the path specified.
 Object getValue()
          Returns the value of the current node of this context.
 Object getValue(Path aPath)
          Returns the value of the node specified.
 

Method Detail

getHome

public AdaptationHome getHome()
Returns the current home.


getNode

public SchemaNode getNode()
Returns the current schema node of this context. When a path-based access is made, any relative path is resolved regarding this node.

See Also:
getValue(Path)

getNode

public SchemaNode getNode(Path aPath)
                   throws PathAccessException
Returns the schema node at the path specified. If the path is relative, it is resolved regarding the current node of this context.

Throws:
PathAccessException
See Also:
getNode()

getValue

public Object getValue(Path aPath)
                throws PathAccessException
Returns the value of the node specified. Returns null if node has an undefined value.

An inheritance lookup mechanism may be used for retrieving the value:

Warning: data updates

Any update on data must conform to Rule for updates.

Throws:
PathAccessException - if aPath does not refer to an existing node in the underlying type tree structure.

getValue

public Object getValue()
                throws PathAccessException
Returns the value of the current node of this context.

This method is a shortcut for getValue(Path.SELF).

Warning: data updates

Any update on data must conform to Rule for updates.

Throws:
PathAccessException

displayOccurrence

public String displayOccurrence(Object value,
                                Locale aLocale)
Deprecated. This method is replaced by SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)


formatOccurrence

public String formatOccurrence(Object value)
Deprecated. Client code should call either SchemaNode.formatToXsString(Object) or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).

As the format to use for numbers and dates depends on a Locale, this method gets it from session, if this context depends on a session. Otherwise, if it is independent of any session it will use en-US (english) locale.



(report a bug)
EBX.Platform 4.5.0 [0598]
Copyright Orchestra Networks 2000-2008. All rights reserved.