Class XPathFragment<XML_FIELD extends Field>
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.XPathFragment<XML_FIELD>
-
public class XPathFragment<XML_FIELD extends Field> extends Object
INTERNAL:Purpose: Represents a token from an XPath statement.
For example the following XPath statment a/b[2]/text() corresponds to three XPathFragments: "a", "b[2]", and "text()".
Responsibilities:
- Maintain name, namespace, and prefix information.
- Maintain information about the corresponding node type.
- Maintain index information if any. The XPathFragment corresponding to b[2] would have an index value of 2.
-
-
Field Summary
Fields Modifier and Type Field Description static XPathFragment
ANY_FRAGMENT
static Charset
CHARSET
protected boolean
hasAttribute
protected boolean
isSelfFragment
protected boolean
nameIsText
static XPathFragment
SELF_FRAGMENT
static String
SELF_XPATH
static XPathFragment
TEXT_FRAGMENT
-
Constructor Summary
Constructors Constructor Description XPathFragment()
XPathFragment(String xpathString)
XPathFragment(String xpathString, char namespaceSeparator, boolean namespaceAware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsIndex()
boolean
equals(Object object)
boolean
equals(Object object, boolean ignorePredicate)
Set<String>
getChildrenCollisionSet(boolean isAttribute)
INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.boolean
getHasText()
int
getIndexValue()
QName
getLeafElementType()
String
getLocalName()
byte[]
getLocalNameBytes()
char
getNamespaceSeparator()
String
getNamespaceURI()
XPathFragment
getNextFragment()
XPathPredicate
getPredicate()
String
getPrefix()
byte[]
getPrefixBytes()
String
getShortName()
XML_FIELD
getXMLField()
String
getXPath()
int
hashCode()
boolean
hasLeafElementType()
boolean
hasNamespace()
boolean
isAttribute()
boolean
isGeneratedPrefix()
boolean
isNamespaceAware()
boolean
isSelfFragment()
INTERNAL: Indicates if the xpath is "."boolean
nameIsText()
void
setAttribute(boolean isAttribute)
void
setContainsIndex(boolean containsIndex)
void
setGeneratedPrefix(boolean isGenerated)
void
setHasText(boolean hasText)
void
setIndexValue(int indexValue)
void
setLeafElementType(QName type)
void
setLocalName(String localName)
void
setNamespaceAware(boolean isNamespaceAware)
void
setNamespaceSeparator(char namespaceSeparator)
void
setNamespaceURI(String namespaceURI)
void
setNextFragment(XPathFragment nextFragment)
void
setPredicate(XPathPredicate condition)
void
setPrefix(String prefix)
void
setShouldExecuteSelectNodes(boolean newShouldExecuteSelectNodes)
void
setXMLField(XML_FIELD field)
void
setXPath(String xpathString)
boolean
shouldExecuteSelectNodes()
-
-
-
Field Detail
-
TEXT_FRAGMENT
public static final XPathFragment TEXT_FRAGMENT
-
SELF_XPATH
public static final String SELF_XPATH
- See Also:
- Constant Field Values
-
SELF_FRAGMENT
public static final XPathFragment SELF_FRAGMENT
-
ANY_FRAGMENT
public static final XPathFragment ANY_FRAGMENT
-
CHARSET
public static final Charset CHARSET
-
hasAttribute
protected boolean hasAttribute
-
nameIsText
protected boolean nameIsText
-
isSelfFragment
protected boolean isSelfFragment
-
-
Method Detail
-
setPredicate
public void setPredicate(XPathPredicate condition)
-
isNamespaceAware
public boolean isNamespaceAware()
-
setNamespaceAware
public void setNamespaceAware(boolean isNamespaceAware)
-
getNamespaceSeparator
public char getNamespaceSeparator()
-
setNamespaceSeparator
public void setNamespaceSeparator(char namespaceSeparator)
-
getPredicate
public XPathPredicate getPredicate()
-
getNextFragment
public XPathFragment getNextFragment()
-
setNextFragment
public void setNextFragment(XPathFragment nextFragment)
-
setXPath
public void setXPath(String xpathString)
-
isAttribute
public boolean isAttribute()
-
setAttribute
public void setAttribute(boolean isAttribute)
-
getShortName
public String getShortName()
-
getPrefix
public String getPrefix()
-
getPrefixBytes
public byte[] getPrefixBytes()
-
setPrefix
public void setPrefix(String prefix)
-
getLocalName
public String getLocalName()
-
getLocalNameBytes
public byte[] getLocalNameBytes()
-
setLocalName
public void setLocalName(String localName)
-
getNamespaceURI
public String getNamespaceURI()
-
setNamespaceURI
public void setNamespaceURI(String namespaceURI)
-
getIndexValue
public int getIndexValue()
-
setIndexValue
public void setIndexValue(int indexValue)
-
getXPath
public String getXPath()
-
hasNamespace
public boolean hasNamespace()
-
isSelfFragment
public boolean isSelfFragment()
INTERNAL: Indicates if the xpath is "."- Returns:
- true if the xpath is ".", false otherwise
-
nameIsText
public boolean nameIsText()
-
setHasText
public void setHasText(boolean hasText)
-
getHasText
public boolean getHasText()
-
setContainsIndex
public void setContainsIndex(boolean containsIndex)
-
containsIndex
public boolean containsIndex()
-
setShouldExecuteSelectNodes
public void setShouldExecuteSelectNodes(boolean newShouldExecuteSelectNodes)
-
shouldExecuteSelectNodes
public boolean shouldExecuteSelectNodes()
-
equals
public boolean equals(Object object, boolean ignorePredicate)
-
getLeafElementType
public QName getLeafElementType()
-
hasLeafElementType
public boolean hasLeafElementType()
-
setLeafElementType
public void setLeafElementType(QName type)
-
setGeneratedPrefix
public void setGeneratedPrefix(boolean isGenerated)
-
isGeneratedPrefix
public boolean isGeneratedPrefix()
-
getXMLField
public XML_FIELD getXMLField()
-
setXMLField
public void setXMLField(XML_FIELD field)
-
getChildrenCollisionSet
public Set<String> getChildrenCollisionSet(boolean isAttribute)
INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.- Parameters:
isAttribute
- Determine if retrieving an element or an attribute collision set.- Returns:
- Set containing localNames of attributes or elements of an XPathFragment.
-
-