|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.mdm.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)
Returns a user-friendly string that represents the value of the node specified. |
String |
formatValue(Path path,
String formatPattern)
Returns a user-friendly string that represents the value of the node specified. |
List |
formatValues(Path path)
Deprecated. |
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)
Returns the description of the node specified. |
String |
getLabel(Path aPath)
Returns the label of the node specified. |
List |
getList(Path aPath)
Returns the List value of the node specified. |
Locale |
getLocale()
Deprecated. |
String |
getNomenclatureItemLabel(Path path,
String aFormattedValue)
Deprecated. |
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
The format used is either the specific format defined on type node or by default the one defined in formatting policy.
PathAccessException
get(com.softwareag.mdm.schema.Path)
public String formatValue(Path path, String formatPattern)
The string is generated according to the format pattern specified in argument.
public List formatValues(Path path)
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.softwareag.mdm.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.softwareag.mdm.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.softwareag.mdm.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.softwareag.mdm.schema.Path)
public String getDescription(Path aPath) throws PathAccessException
description
element content documentation
element of corresponding node in underlying XML
Schema.
Note : not yet internationalized.
PathAccessException
- if aPath
does not refer to an existing node in the underlying
type tree structure.public String getLabel(Path aPath) throws PathAccessException
label
element
content documentation
element of corresponding node in underlying XML Schema.
Note : not yet internationalized.
PathAccessException
- if aPath
does not refer to an existing node in the underlying
type tree structure.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.softwareag.mdm.schema.Path)
public Locale getLocale()
public String getNomenclatureItemLabel(Path path, String aFormattedValue)
enumeration
and if
aFormattedValue
corresponds to an authorized value, this method returns the
associated label.
formatValue(com.softwareag.mdm.schema.Path)
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.softwareag.mdm.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.AdaptationTable
public 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 mdm.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)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.