Top Description Fields Constructors Methods
org.eclipse.persistence.internal.oxm

public Class XPathFragment<XML_FIELD extends Field>

extends Object
Class Inheritance
Imports
java.nio.charset.Charset, java.util.HashSet, .Set, .StringTokenizer, javax.xml.namespace.QName, org.eclipse.persistence.internal.oxm.mappings.Field

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:

Field Summary

Modifier and TypeField and Description
public static final XPathFragment<XML_FIELD extends Field>
private Set<String>
public static final Charset
private boolean
private boolean
protected boolean
private boolean
private boolean
private int
protected boolean
private QName
private String
private byte[]
protected boolean
private boolean
private char
private String
private XPathFragment<XML_FIELD extends Field>
private Set<String>
private XPathPredicate
private String
private byte[]
public static final XPathFragment<XML_FIELD extends Field>
public static final String
private String
private boolean
public static final XPathFragment<XML_FIELD extends Field>
private XML_FIELD
private String

Constructor Summary

AccessConstructor and Description
public
public
XPathFragment(String xpathString)

public
XPathFragment(String xpathString, char namespaceSeparator, boolean namespaceAware)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public boolean
equals(Object object, boolean ignorePredicate)

private Set<String>
public Set<String>

Returns:

Set containing localNames of attributes or elements of an XPathFragment.
getChildrenCollisionSet
(boolean
Determine if retrieving an element or an attribute collision set.
isAttribute
)

INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.

public boolean
public int
public QName
public String
public byte[]
public char
public String
public XPathFragment<XML_FIELD extends Field>
private Set<String>
public XPathPredicate
public String
public byte[]
public String
public XML_FIELD
public String
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private int
hasIndex(String xpathString)

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean

Returns:

true if the xpath is ".", false otherwise
isSelfFragment
()

INTERNAL: Indicates if the xpath is "."

public boolean
private void
public void
setAttribute(boolean isAttribute)

public void
setContainsIndex(boolean containsIndex)

public void
setGeneratedPrefix(boolean isGenerated)

public void
setHasText(boolean hasText)

public void
setIndexValue(int indexValue)

public void
public void
setLocalName(String localName)

public void
setNamespaceAware(boolean isNamespaceAware)

public void
setNamespaceSeparator(char namespaceSeparator)

public void
setNamespaceURI(String namespaceURI)

public void
setNextFragment(XPathFragment<XML_FIELD extends Field> nextFragment)

public void
public void
setPrefix(String prefix)

public void
setShouldExecuteSelectNodes(boolean newShouldExecuteSelectNodes)

private void
public void
setXMLField(XML_FIELD field)

public void
setXPath(String xpathString)

public boolean
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

ANY_FRAGMENTback to summary
public static final XPathFragment<XML_FIELD extends Field> ANY_FRAGMENT
attributeCollisionSetback to summary
private Set<String> attributeCollisionSet
CHARSETback to summary
public static final Charset CHARSET
containsIndexback to summary
private boolean containsIndex
generatedPrefixback to summary
private boolean generatedPrefix
hasAttributeback to summary
protected boolean hasAttribute
hasNamespaceback to summary
private boolean hasNamespace
hasTextback to summary
private boolean hasText
indexValueback to summary
private int indexValue
isSelfFragmentback to summary
protected boolean isSelfFragment
leafElementTypeback to summary
private QName leafElementType
localNameback to summary
private String localName
localNameBytesback to summary
private byte[] localNameBytes
nameIsTextback to summary
protected boolean nameIsText
namespaceAwareback to summary
private boolean namespaceAware
namespaceSeparatorback to summary
private char namespaceSeparator
namespaceURIback to summary
private String namespaceURI
nextFragmentback to summary
private XPathFragment<XML_FIELD extends Field> nextFragment
nonAttributeCollisionSetback to summary
private Set<String> nonAttributeCollisionSet
predicateback to summary
private XPathPredicate predicate
prefixback to summary
private String prefix
prefixBytesback to summary
private byte[] prefixBytes
SELF_FRAGMENTback to summary
public static final XPathFragment<XML_FIELD extends Field> SELF_FRAGMENT
SELF_XPATHback to summary
public static final String SELF_XPATH
shortNameback to summary
private String shortName
shouldExecuteSelectNodesback to summary
private boolean shouldExecuteSelectNodes
TEXT_FRAGMENTback to summary
public static final XPathFragment<XML_FIELD extends Field> TEXT_FRAGMENT
xmlFieldback to summary
private XML_FIELD xmlField
xpathback to summary
private String xpath

Constructor Detail

XPathFragmentback to summary
public XPathFragment()
XPathFragmentback to summary
public XPathFragment(String xpathString)
XPathFragmentback to summary
public XPathFragment(String xpathString, char namespaceSeparator, boolean namespaceAware)

Method Detail

containsIndexback to summary
public boolean containsIndex()
equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
object:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
equalsback to summary
public boolean equals(Object object, boolean ignorePredicate)
getAttributeCollisionSetback to summary
private Set<String> getAttributeCollisionSet()
getChildrenCollisionSetback to summary
public Set<String> getChildrenCollisionSet(boolean isAttribute)

INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.

Parameters
isAttribute:boolean

Determine if retrieving an element or an attribute collision set.

Returns:Set<String>

Set containing localNames of attributes or elements of an XPathFragment.

getHasTextback to summary
public boolean getHasText()
getIndexValueback to summary
public int getIndexValue()
getLeafElementTypeback to summary
public QName getLeafElementType()
getLocalNameback to summary
public String getLocalName()
getLocalNameBytesback to summary
public byte[] getLocalNameBytes()
getNamespaceSeparatorback to summary
public char getNamespaceSeparator()
getNamespaceURIback to summary
public String getNamespaceURI()
getNextFragmentback to summary
public XPathFragment<XML_FIELD extends Field> getNextFragment()
getNonAttributeCollisionSetback to summary
private Set<String> getNonAttributeCollisionSet()
getPredicateback to summary
public XPathPredicate getPredicate()
getPrefixback to summary
public String getPrefix()
getPrefixBytesback to summary
public byte[] getPrefixBytes()
getShortNameback to summary
public String getShortName()
getXMLFieldback to summary
public XML_FIELD getXMLField()
getXPathback to summary
public String getXPath()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
hasIndexback to summary
private int hasIndex(String xpathString)
hasLeafElementTypeback to summary
public boolean hasLeafElementType()
hasNamespaceback to summary
public boolean hasNamespace()
isAttributeback to summary
public boolean isAttribute()
isGeneratedPrefixback to summary
public boolean isGeneratedPrefix()
isNamespaceAwareback to summary
public boolean isNamespaceAware()
isSelfFragmentback to summary
public boolean isSelfFragment()

INTERNAL: Indicates if the xpath is "."

Returns:boolean

true if the xpath is ".", false otherwise

nameIsTextback to summary
public boolean nameIsText()
resetShortNameback to summary
private void resetShortName()
setAttributeback to summary
public void setAttribute(boolean isAttribute)
setContainsIndexback to summary
public void setContainsIndex(boolean containsIndex)
setGeneratedPrefixback to summary
public void setGeneratedPrefix(boolean isGenerated)
setHasTextback to summary
public void setHasText(boolean hasText)
setIndexValueback to summary
public void setIndexValue(int indexValue)
setLeafElementTypeback to summary
public void setLeafElementType(QName type)
setLocalNameback to summary
public void setLocalName(String localName)
setNamespaceAwareback to summary
public void setNamespaceAware(boolean isNamespaceAware)
setNamespaceSeparatorback to summary
public void setNamespaceSeparator(char namespaceSeparator)
setNamespaceURIback to summary
public void setNamespaceURI(String namespaceURI)
setNextFragmentback to summary
public void setNextFragment(XPathFragment<XML_FIELD extends Field> nextFragment)
setPredicateback to summary
public void setPredicate(XPathPredicate condition)
setPrefixback to summary
public void setPrefix(String prefix)
setShouldExecuteSelectNodesback to summary
public void setShouldExecuteSelectNodes(boolean newShouldExecuteSelectNodes)
setupNamespaceInformationback to summary
private void setupNamespaceInformation(String xpathString)
setXMLFieldback to summary
public void setXMLField(XML_FIELD field)
setXPathback to summary
public void setXPath(String xpathString)
shouldExecuteSelectNodesback to summary
public boolean shouldExecuteSelectNodes()