|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.driver.xds.DocumentImpl
com.novell.nds.dirxml.driver.xds.XDSQueryResultDocument
The XmlDocument
returned from method
query(XmlDocument)
of interface
XmlQueryProcessor
.
Interface PublicationShim implements this method. An XmlQueryProcessor object reference is passed to the SubscriptionShim.execute(XmlDocument, XmlQueryProcessor) method.
Constructor Summary | |
XDSQueryResultDocument()
Constructs an empty, writeable result document. |
|
XDSQueryResultDocument(DTDVersion dtdVersion)
Constructs an empty, writeable result doucment. |
|
XDSQueryResultDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML)
Constructs a readable result document from an existing XDS-formatted, XML document. |
Method Summary | |
XDSInstanceElement |
appendInstanceElement()
Appends an empty, child <instance> element to this
document's <output> element. |
XDSQueryTokenElement |
appendQueryTokenElement(String someToken)
Appends an empty, child <query-token> element to this
document's <output> element. |
XDSSourceElement |
appendSourceElement()
Appends an empty, child <source> element to this
document's <nds> element. |
XDSStatusElement |
appendStatusElement()
Appends an empty, child <status> element to this
document's <input> or <output>
element. |
List |
childElements()
Returns the child elements of this document's <output> element. |
boolean |
containsQueryToken(String someToken)
Does this document contain a specific query token? |
boolean |
containsQueryTokenElements()
Does this document contain query token elements? |
void |
empty()
Removes all child nodes from this document's <input>
or <output> element. |
List |
extractInstanceElements()
Returns this document's <instance> elements. |
List |
extractQueryTokenElements()
Returns this document's <query-token> elements. |
XDSSourceElement |
extractSourceElement()
Returns this document's <source> element. |
List |
extractStatusElements()
Returns this document's <status> elements. |
List |
extractStatusElements(String someID)
Returns the status elements with an event-id attribute
value equal to someID . |
DTDVersion |
getDTDVersion()
Returns the dtdversion attribute value from this document's
<nds> element. |
XDSStatusElement |
mostSevereStatusElement(String someID)
Returns the status element with the most severe level
attribute value with an event-id attribute value equal to
someID . |
StatusLevel |
mostSevereStatusLevel(String someID)
Returns the most severe level attribute value for all
<status> elements with an event-id
attribute value equal to someID . |
com.novell.nds.dirxml.driver.XmlDocument |
toXML()
Converts this document into an XmlDocument . |
void |
validate()
Validates this document. |
Methods inherited from class com.novell.nds.dirxml.driver.xds.DocumentImpl |
domDocument, domIOElement, domNDSElement, isEmpty |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.novell.nds.dirxml.driver.xds.XDSDocument |
domDocument, domIOElement, domNDSElement, isEmpty |
Constructor Detail |
public XDSQueryResultDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML) throws XDSParseException
This constructor should be used to parse documents returned from the
XmlQueryProcessor
object passed to method
execute(XmlDocument, XmlQueryProcessor)
of interface
SubscriptionShim
xdsXML
- must not be null
XDSParseException
- thrown if xdsXML
is empty,
malformed, or invalidSkeletonSubscriptionShim.execute(XmlDocument,
com.novell.nds.dirxml.driver.XmlQueryProcessor)
public XDSQueryResultDocument()
This constructor should be used to build documents returned from method
query(XmlDocument)
of interface
PublicationShim
SkeletonPublicationShim.query(XmlDocument)
public XDSQueryResultDocument(DTDVersion dtdVersion)
This constructor should be used to build documents returned from method
query(XmlDocument)
of interface
PublicationShim
dtdVersion
- must not be null
SkeletonPublicationShim.query(XmlDocument)
Method Detail |
public DTDVersion getDTDVersion()
ReadableDocument
dtdversion
attribute value from this document's
<nds>
element.
getDTDVersion
in interface ReadableDocument
null
; if absent, this method
returns DTDVersion.UNKNOWN
public XDSSourceElement extractSourceElement()
ReadableDocument
<source>
element.
extractSourceElement
in interface ReadableDocument
null
public boolean containsQueryTokenElements()
QueryResultDocument
containsQueryTokenElements
in interface QueryResultDocument
true
if it does, false
otherwisepublic boolean containsQueryToken(String someToken)
QueryResultDocument
containsQueryToken
in interface QueryResultDocument
someToken
- may be null
true
if it does, false
otherwisepublic List extractQueryTokenElements()
QueryResultDocument
<query-token>
elements.
extractQueryTokenElements
in interface QueryResultDocument
Collections.EMPTY_LIST
or a list of
XDSStatusElement
objects; will not return
null
public List extractStatusElements(String someID)
QueryResultDocument
event-id
attribute
value equal to someID
.
extractStatusElements
in interface QueryResultDocument
someID
- may be null
Collections.EMPTY_LIST
or a list of
XDSStatusElement
objects; will not return
null
public List extractStatusElements()
QueryResultDocument
<status>
elements.
extractStatusElements
in interface QueryResultDocument
Collections.EMPTY_LIST
or a list of
XDSStatusElement
objects; will not return
null
public XDSStatusElement mostSevereStatusElement(String someID)
QueryResultDocument
level
attribute value with an event-id
attribute value equal to
someID
.
If no matching status element is found, the status element with the most severe level is returned irrespective of event-id value.
mostSevereStatusElement
in interface QueryResultDocument
someID
- may be null
null
public StatusLevel mostSevereStatusLevel(String someID)
QueryResultDocument
level
attribute value for all
<status>
elements with an event-id
attribute value equal to someID
.
If no matching status element is found, the most severe status level is returned irrespective of event-id value. If no status info is available, StatusLevel.SUCCESS is returned.
mostSevereStatusLevel
in interface QueryResultDocument
someID
- may be null
null
public List extractInstanceElements()
QueryResultDocument
<instance>
elements.
extractInstanceElements
in interface QueryResultDocument
Collections.EMPTY_LIST
or a list of
XDSInstanceElement
objects; will not return
null
public List childElements()
<output>
element.
childElements
in interface ReadableDocument
Collections.EMPTY_LIST
or a list of
XDSStatusElement
, XDSInstanceElement
,
XDSQueryTokenElement
, and
NonXDSElement
objects; will not return
null
public XDSInstanceElement appendInstanceElement()
<instance>
element to this
document's <output>
element.
appendInstanceElement
in interface QueryResultDocument
null
public XDSQueryTokenElement appendQueryTokenElement(String someToken)
QueryResultDocument
<query-token>
element to this
document's <output>
element.
appendQueryTokenElement
in interface QueryResultDocument
someToken
- the unique token for the source query of this document;
should not be null
null
public void validate() throws XDSParseException
WriteableDocument
validate
in interface WriteableDocument
XDSParseException
- if this document is malformed or invalidpublic XDSSourceElement appendSourceElement()
WriteableDocument
<source>
element to this
document's <nds>
element. When called more than
once, no action is taken and the same <source>
element is returned.
appendSourceElement
in interface WriteableDocument
null
public com.novell.nds.dirxml.driver.XmlDocument toXML()
WriteableDocument
XmlDocument
.
toXML
in interface WriteableDocument
XmlDocument
public void empty()
WriteableDocument
<input>
or <output>
element.
empty
in interface WriteableDocument
public XDSStatusElement appendStatusElement()
StatusDocument
<status>
element to this
document's <input>
or <output>
element.
appendStatusElement
in interface StatusDocument
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |