Module org.eclipse.persistence.core
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 XPathFragmentANY_FRAGMENTstatic CharsetCHARSETprotected booleanhasAttributeprotected booleanisSelfFragmentprotected booleannameIsTextstatic XPathFragmentSELF_FRAGMENTstatic StringSELF_XPATHstatic XPathFragmentTEXT_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 booleancontainsIndex()booleanequals(Object object)booleanequals(Object object, boolean ignorePredicate)Set<String>getChildrenCollisionSet(boolean isAttribute)INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.booleangetHasText()intgetIndexValue()QNamegetLeafElementType()StringgetLocalName()byte[]getLocalNameBytes()chargetNamespaceSeparator()StringgetNamespaceURI()XPathFragmentgetNextFragment()XPathPredicategetPredicate()StringgetPrefix()byte[]getPrefixBytes()StringgetShortName()XML_FIELDgetXMLField()StringgetXPath()inthashCode()booleanhasLeafElementType()booleanhasNamespace()booleanisAttribute()booleanisGeneratedPrefix()booleanisNamespaceAware()booleanisSelfFragment()INTERNAL: Indicates if the xpath is "."booleannameIsText()voidsetAttribute(boolean isAttribute)voidsetContainsIndex(boolean containsIndex)voidsetGeneratedPrefix(boolean isGenerated)voidsetHasText(boolean hasText)voidsetIndexValue(int indexValue)voidsetLeafElementType(QName type)voidsetLocalName(String localName)voidsetNamespaceAware(boolean isNamespaceAware)voidsetNamespaceSeparator(char namespaceSeparator)voidsetNamespaceURI(String namespaceURI)voidsetNextFragment(XPathFragment nextFragment)voidsetPredicate(XPathPredicate condition)voidsetPrefix(String prefix)voidsetShouldExecuteSelectNodes(boolean newShouldExecuteSelectNodes)voidsetXMLField(XML_FIELD field)voidsetXPath(String xpathString)booleanshouldExecuteSelectNodes()
-
-
-
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.
-
-