|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.inria.ns.reflex.processor.asl.CandidateNode
org.inria.ns.reflex.processor.asl.TextCandidate
public abstract class TextCandidate
Support for candidate texts used for testing a type.
As a type can be applied indifferently for text contents and attributes, this class is derived in 2 flavors.
When successive matchers are testing a text candidate, a next candidate is set to the remainder of the previous text matched and so on. If the full matching sequence fails, this candidate may be reset to the previous full text value to try another matching sequence. The errors raised will be ignored.
| Nested Class Summary | |
|---|---|
static class |
TextCandidate.Attr
A candidate text for an attribute value. |
static class |
TextCandidate.Text
A candidate text for which comments and processing instructions have been ignored and adjacent text nodes merged. |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
TextCandidate()
|
|
| Method Summary | |
|---|---|
Node |
appendChild(Node node)
|
Node |
cloneNode(boolean param)
|
NamedNodeMap |
getAttributes()
|
NodeList |
getChildNodes()
|
Node |
getFirstChild()
|
Node |
getLastChild()
|
Node |
getNextSibling()
|
String |
getNodeValue()
|
Document |
getOwnerDocument()
|
Node |
getParentNode()
|
Node |
getPreviousSibling()
|
boolean |
hasAttributes()
|
boolean |
hasChildNodes()
|
Node |
insertBefore(Node node,
Node node1)
|
boolean |
isSupported(String str,
String str1)
|
boolean |
isWhitespace()
|
static TextCandidate |
newTextCandidate(Attr attr)
Create a new text candidate based on an attribute. |
static TextCandidate |
newTextCandidate(Node node)
Create a candidate text node from a given node. |
static TextCandidate |
newTextCandidate(Object o)
Create a candidate text node from an object. |
static TextCandidate |
newTextCandidate(String remainder,
Node candidate)
Create a new text candidate based on the previous candidate. |
static TextCandidate |
newTextCandidate(Text textNode,
Node parent,
Node next,
Node previous)
Create a new text candidate based on a tex node. |
void |
normalize()
|
Node |
removeChild(Node node)
|
Node |
replaceChild(Node node,
Node node1)
|
void |
setNodeValue(String str)
|
void |
setPrefix(String str)
|
String |
toString()
Return the string value. |
| Methods inherited from class org.inria.ns.reflex.processor.asl.CandidateNode |
|---|
compareDocumentPosition, getBaseURI, getFeature, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
|---|
compareDocumentPosition, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeName, getNodeType, getPrefix, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData |
| Constructor Detail |
|---|
public TextCandidate()
| Method Detail |
|---|
public boolean isWhitespace()
public Node appendChild(Node node)
throws DOMException
appendChild in interface NodeDOMExceptionpublic Node cloneNode(boolean param)
cloneNode in interface Nodepublic NamedNodeMap getAttributes()
getAttributes in interface Nodepublic NodeList getChildNodes()
getChildNodes in interface Nodepublic Node getFirstChild()
getFirstChild in interface Nodepublic Node getLastChild()
getLastChild in interface Nodepublic Node getNextSibling()
getNextSibling in interface Node
public String getNodeValue()
throws DOMException
getNodeValue in interface NodeDOMExceptionpublic Document getOwnerDocument()
getOwnerDocument in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic boolean hasAttributes()
hasAttributes in interface Nodepublic boolean hasChildNodes()
hasChildNodes in interface Node
public Node insertBefore(Node node,
Node node1)
throws DOMException
insertBefore in interface NodeDOMException
public boolean isSupported(String str,
String str1)
isSupported in interface Nodepublic void normalize()
normalize in interface Node
public Node removeChild(Node node)
throws DOMException
removeChild in interface NodeDOMException
public Node replaceChild(Node node,
Node node1)
throws DOMException
replaceChild in interface NodeDOMException
public void setNodeValue(String str)
throws DOMException
setNodeValue in interface NodeDOMException
public void setPrefix(String str)
throws DOMException
setPrefix in interface NodeDOMException
public static TextCandidate newTextCandidate(String remainder,
Node candidate)
remainder - The part of the text that is candidate.candidate - The previous candidate.
public static TextCandidate newTextCandidate(Text textNode,
Node parent,
Node next,
Node previous)
textNode - The text node that has all its value as a candidate.parent - The parent, may differ from the real parent.next - The next node.previous - The previous node.
public static TextCandidate newTextCandidate(Attr attr)
attr - The attribute that has all its value as a candidate.
public static TextCandidate newTextCandidate(Node node)
node - The node.
public static TextCandidate newTextCandidate(Object o)
o - The object, from which the text value is computed.
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||