|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a SessionContext. This interface describes a SessionContext. The SessionContext is a data container containing structured XML which can be retrieved/set by the session transformer. This interface does not specify how the session context stores the data. This is left to the implementation itself, but actually this interface is build in the DOM model. As this context is used in a web context, all methods must be synchronized.
Method Summary | |
void |
appendXML(String path,
DocumentFragment fragment)
Append a document fragment at the given path. |
Object |
getAttribute(String key)
Get the value of a context attribute. |
Object |
getAttribute(String key,
Object defaultObject)
Get the value of a context attribute. |
String |
getName()
Get the name of the context |
NodeList |
getNodeList(String path)
Get a copy of all nodes specified by the path. |
Node |
getSingleNode(String path)
Get a copy of the first node specified by the path. |
String |
getValueOfNode(String path)
Get the value of this node. |
DocumentFragment |
getXML(String path)
Get a document fragment. |
void |
loadXML(String path,
SourceParameters parameters)
Try to load XML into the context. |
void |
removeXML(String path)
Remove some content from the context. |
void |
saveXML(String path,
SourceParameters parameters)
Try to save XML from the context. |
void |
setAttribute(String key,
Object value)
Set a context attribute. |
void |
setNode(String path,
Node node)
Set the value of a node. |
void |
setup(String value,
String loadResource,
String saveResource)
Set the name of the context. |
void |
setValueOfNode(String path,
String value)
Set the value of a node. |
void |
setXML(String path,
DocumentFragment fragment)
Set a document fragment at the given path. |
boolean |
streamXML(String path,
ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Stream the XML directly to the handler. |
Method Detail |
public void setup(String value, String loadResource, String saveResource)
public String getName()
public DocumentFragment getXML(String path) throws ProcessingException
null
is returned.
ProcessingException
public void setXML(String path, DocumentFragment fragment) throws ProcessingException
ProcessingException
public void appendXML(String path, DocumentFragment fragment) throws ProcessingException
ProcessingException
public void removeXML(String path) throws ProcessingException
ProcessingException
public void setAttribute(String key, Object value) throws ProcessingException
value
is null
the attribute is
removed. If already an attribute exists with the same key, the value
is overwritten with the new one.
ProcessingException
public Object getAttribute(String key) throws ProcessingException
null
.
ProcessingException
public Object getAttribute(String key, Object defaultObject) throws ProcessingException
defaultObject
.
ProcessingException
public Node getSingleNode(String path) throws ProcessingException
null
is returned.
ProcessingException
public NodeList getNodeList(String path) throws ProcessingException
ProcessingException
public void setNode(String path, Node node) throws ProcessingException
ProcessingException
public String getValueOfNode(String path) throws ProcessingException
null
is returned.
ProcessingException
public void setValueOfNode(String path, String value) throws ProcessingException
ProcessingException
public boolean streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException, ProcessingException
false
is
returned, otherwise true
.
SAXException
ProcessingException
public void loadXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
SAXException
ProcessingException
IOException
public void saveXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
SAXException
ProcessingException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |