Package org.apache.any23.validator
Interface DOMDocument
-
- All Known Implementing Classes:
DefaultDOMDocument
public interface DOMDocument
This interface models a document to be processed by theValidator
.- Author:
- Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)
-
-
Method Summary
All Methods Modifier and Type Method Description void
addAttribute (String xPath, String attrName, String attrValue)
Adds an attribute to a node addressed by the given XPath.URI
getDocumentIRI ()
Node
getNode (String xPath)
Returns the node addressed by the given XPath, if more then one an exception will be raised.List<Node>
getNodes (String xPath)
Returns the list of nodes addressed by the given XPath.List<Node>
getNodesWithAttribute (String attrName)
Returns all the nodes declaring an attribute with the specified name.Document
getOriginalDocument ()
Returns the original document.
-
-
-
Method Detail
-
getDocumentIRI
URI getDocumentIRI()
- Returns:
- the original document IRI.
-
getOriginalDocument
Document getOriginalDocument()
Returns the original document.- Returns:
- the original document.
-
getNodes
List<Node> getNodes(String xPath)
Returns the list of nodes addressed by the given XPath.- Parameters:
xPath
- a valid XPath- Returns:
- a not null list of nodes.
-
getNode
Node getNode(String xPath)
Returns the node addressed by the given XPath, if more then one an exception will be raised.- Parameters:
xPath
- a valid XPath.- Returns:
- a node or
null
if nothing found.
-
-