|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.onwbp.adaptation.ReadContext
Provides a read-access facade to objects organized in a tree structure, this structure conforming to an underlying Adaptation Model (XML Schema document).
Access to a node:
Any node in the structure is accessed through a path: it is the path from the tree's root node up
to the searched node.
Value of a node:
If defined, a node's value is indeed:
| Field Summary | |
static String |
KEY
Deprecated. |
| Constructor Summary | |
ReadContext()
|
|
| Method Summary | |
String |
formatValue(Path path)
Deprecated. Client code should call either SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale). |
String |
formatValue(Path path,
String ignored)
Deprecated. Client code should call either SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale). |
List |
formatValues(Path path)
Deprecated. Client code should call, on each element of the List value,
either SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale). |
boolean |
get_boolean(Path aPath)
Returns the boolean value of the node specified. |
int |
get_int(Path aPath)
Returns the int value of the node specified. |
Object |
get(Path aPath)
Returns the value of the node specified. |
Date |
getDate(Path aPath)
Returns the Date value of the node specified. |
String |
getDescription(Path aPath)
Deprecated. Replaced by SchemaNode.getDescription(Locale). |
String |
getLabel(Path aPath)
Deprecated. Replaced by SchemaNode.getLabel(Locale). |
List |
getList(Path aPath)
Returns the List value of the node specified. |
Locale |
getLocale()
Deprecated. Historically was linked to a locale. This is no more the case. |
String |
getNomenclatureItemLabel(Path path,
String aFormattedValue)
Deprecated. Replaced by SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale). |
String |
getResourcePathInModule(Path aPath)
Returns the path to the resource that is hold by the node specified. |
String |
getResourcePathWithModule(Path aPath)
Returns the path (including module's path) to the resource that is hold by the node specified. |
String |
getString(Path aPath)
Returns the String value of the node specified. |
AdaptationTable |
getTable(Path aPath)
Returns the table instance hold by the node specified. |
boolean |
isEndUserDebug()
Returns true if debug mode is activated for current module. |
abstract void |
toHtmlString(Writer aWriter)
For debugging purpose, adds an HTML representation to the writer specified. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String KEY
ServletUtils.
| Constructor Detail |
public ReadContext()
| Method Detail |
public String formatValue(Path path)
throws PathAccessException
SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).
PathAccessException
public String formatValue(Path path,
String ignored)
SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).
public List formatValues(Path path)
List value,
either SchemaNode.formatToXsString(Object)
or SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).
The node's value must be a List instance. This is the case when corresponding
XML Schema element declaration defines attribute maxOccurs > 1.
The format used is either the specific format defined on type node or by default the one defined in formatting policy.
getList(com.orchestranetworks.schema.Path)
public Object get(Path aPath)
throws PathAccessException
null if node has an undefined
value.
If this method is called on an Adaptation, a lookup mechanism is used for retrieving the
value (see Adaptation comment).
Any update on data must conform to Rule for updates.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.Adaptation.getValueWithoutResolution(Path)
public boolean get_boolean(Path aPath)
throws PathAccessException
false if no value is
found.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not a boolean, meaning that underlying type node is not a
boolean XML Schema type.get(com.orchestranetworks.schema.Path)
public int get_int(Path aPath)
throws PathAccessException
int value of the node specified. Returns 0 if no
value is found.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not a int, meaning that underlying type
node is not a integer XML Schema type.get(com.orchestranetworks.schema.Path)
public Date getDate(Path aPath)
throws PathAccessException
Date value of the node specified. Returns null if
no value is found.
Any update on a date must conform to Rule for updates.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not a Date, meaning that underlying type
node is not a date XML Schema type.get(com.orchestranetworks.schema.Path)
public String getDescription(Path aPath)
throws PathAccessException
SchemaNode.getDescription(Locale).
PathAccessException
public String getLabel(Path aPath)
throws PathAccessException
SchemaNode.getLabel(Locale).
PathAccessException
public List getList(Path aPath)
throws PathAccessException
List value of the node specified. Returns a new empty
ArrayList if no value is found.
A node holds a List when, in XML Schema, corresponding node has been declared
with maxOccurs > 1.
Any update on list must conform to Rule for updates.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not a List, meaning that underlying type
node has not maxOccurs > 1 in XML Schema.get(com.orchestranetworks.schema.Path)public Locale getLocale()
public String getNomenclatureItemLabel(Path path,
String aFormattedValue)
SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale).
public String getResourcePathInModule(Path aPath)
throws PathAccessException
null if node has an undefined value.
The returned path may be used as a parameter of
ServletContext.getResource(java.lang.String) methods: it starts with a "/", just
after web application's specific path (without including it).
For example:
/www/images/logos/sample1.gif
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not an external resource, meaning that underlying type node
is not a resource XML Schema type.
public String getResourcePathWithModule(Path aPath)
throws PathAccessException
null if node has an undefined value.
The path starts with a "/" and does include web application's specific path.
For example:
/myWebAppPublicPath/www/fr_FR/images/logos/sample1.gif
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not an external resource, meaning that underlying type node
is not a resource XML Schema type.ServletContext.getResource(java.lang.String)
public String getString(Path aPath)
throws PathAccessException
String value of the node specified. Returns null if
no value is found.
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not a String, meaning that underlying type
node is not a string XML Schema type.get(com.orchestranetworks.schema.Path)
public AdaptationTable getTable(Path aPath)
throws PathAccessException
PathAccessException - if aPath does not refer to an existing node in the underlying
type tree structure.
ClassCastException - if node's value is not an instance of AdaptationTable, meaning
that underlying type node is not declared as a table.AdaptationTablepublic boolean isEndUserDebug()
true if debug mode is activated for current module. This mode is
configured by property frontEnd.debugMode in file
module.properties (default is on ebx.properties).
public abstract void toHtmlString(Writer aWriter)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.5.3 [0607:0001]
Copyright Orchestra Networks 2000-2008. All rights reserved.