|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gridsystems.nextgrid.api.pom.ref.ReferenceSupport<org.w3c.dom.Document>
com.gridsystems.nextgrid.api.pom.ref.DomReference
public class DomReference
A DomReference instance wraps an XML DOM document.
There are mainly two use cases where a DomReference makes sense:
Field Summary |
---|
Fields inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport |
---|
LOG |
Constructor Summary | |
---|---|
DomReference()
Creates a new empty instance. |
|
DomReference(org.w3c.dom.Document doc)
Creates a new instance. |
|
DomReference(java.lang.String xml)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
canCastFrom(java.lang.Class<?> type)
|
boolean |
canCastTo(java.lang.Class<?> type)
|
java.lang.Object |
castTo(java.lang.Class<?> type)
|
org.w3c.dom.Document |
getValue()
|
java.lang.Class<org.w3c.dom.Document> |
getValueType()
|
protected static org.w3c.dom.Document |
newDocument()
Creates a new XML document instance. |
protected static org.w3c.dom.Document |
parseDoc(java.lang.String xml)
Parses a string into a DOM document. |
void |
setValue(java.lang.Object value)
|
protected static java.lang.String |
xmlToString(org.w3c.dom.Node node)
Gets a string representation of the given XML node. |
Methods inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport |
---|
addReader, addWriter, clearLinks, copy, dispose, getReaders, getWriters, isAvailable, readLock, removeReader, removeWriter, reset, setAvailable, waitAvailable, writeLock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomReference()
public DomReference(org.w3c.dom.Document doc)
doc
- XML document to wrappublic DomReference(java.lang.String xml) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
xml
- A string containing an XML document
org.xml.sax.SAXException
- Parse error
javax.xml.parsers.ParserConfigurationException
- Factory configuration errorMethod Detail |
---|
public final org.w3c.dom.Document getValue()
public final void setValue(java.lang.Object value)
public java.lang.Class<org.w3c.dom.Document> getValueType()
public boolean canCastTo(java.lang.Class<?> type)
public boolean canCastFrom(java.lang.Class<?> type)
public java.lang.Object castTo(java.lang.Class<?> type)
protected static org.w3c.dom.Document parseDoc(java.lang.String xml) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
xml
- The string containing the XML document to parse
javax.xml.parsers.ParserConfigurationException
- Factory configuration error
org.xml.sax.SAXException
- Parse errorprotected static org.w3c.dom.Document newDocument() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- Factory configuration errorprotected static java.lang.String xmlToString(org.w3c.dom.Node node)
node
- A node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |