Top Description Fields Constructors Methods
org.apache.xerces.xpointer

pack-priv final Class ShortHandPointer

extends Object
implements XPointerPart
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xpointer.XPointerPart
Imports
org.apache.xerces.impl.Constants, org.apache.xerces.impl.dv.XSSimpleType, org.apache.xerces.util.SymbolTable, org.apache.xerces.xni.Augmentations, .QName, .XMLAttributes, .XNIException, org.apache.xerces.xs.AttributePSVI, .XSTypeDefinition

Implements the XPointerPart interface and handles processing of ShortHand Pointers. It identifies at most one element in the resource's information set; specifically, the first one (if any) in document order that has a matching NCName as an identifier.

Version
$Id: ShortHandPointer.java 603808 2007-12-13 03:44:48Z mrglavas $

Field Summary

Modifier and TypeField and Description
private boolean
pack-priv int
fMatchingChildCount

Resolves the XPointer ShortHand pointer based on the rules defined in Section 3.2 of the XPointer Framework Recommendation.

private String
private SymbolTable

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

String - We return null since we currenly do not supprt this.
getChildrenSchemaDeterminedID
(XMLAttributes attributes, int index)

Not quite sure how this can be correctly implemented.

public String

Returns:

String
getDTDDeterminedID
(XMLAttributes attributes, int index)

Rerturns the DTD determine-ID

public String

Returns:

A String containing the schema-determined ID.
getSchemaDeterminedID
(XMLAttributes attributes, int index)

Returns the schema-determined-ID.

public String
getSchemeData()

Implements org.apache.xerces.xpointer.XPointerPart.getSchemeData.

Returns a String containing the scheme data of the PointerPart.
public String
getSchemeName()

Implements org.apache.xerces.xpointer.XPointerPart.getSchemeName.

Returns the name of the ShortHand pointer
private boolean
hasMatchingIdentifier(QName element, XMLAttributes attributes, Augmentations augs, int event)

public boolean
isChildFragmentResolved()

Implements org.apache.xerces.xpointer.XPointerPart.isChildFragmentResolved.

Returns true if the XPointer expression resolves to a non-element child of the current resource fragment.
public boolean
isFragmentResolved()

Implements org.apache.xerces.xpointer.XPointerPart.isFragmentResolved.

Returns true if the XPointer expression resolves to a resource fragment specified as input else returns false.
public void
parseXPointer(String
A String representing the PointerPart or ShortHandPointer.
part
)

Implements org.apache.xerces.xpointer.XPointerPart.parseXPointer.

The XPointerProcessor takes care of this.
public boolean
resolveXPointer(QName
- The name of the element.
element
,
XMLAttributes
- The element attributes.
attributes
,
Augmentations
- Additional information that may include infoset augmentations
augs
,
int
- An integer indicating 0 - The start of an element 1 - The end of an element 2 - An empty element call
event
)

Implements org.apache.xerces.xpointer.XPointerPart.resolveXPointer.

Evaluates an XML resource with respect to an XPointer expressions by checking if it's element and attributes parameters match the criteria specified in the xpointer expression.
public void
setSchemeData(String
A String containing the scheme data of the PointerPart.
schemeData
)

Implements org.apache.xerces.xpointer.XPointerPart.setSchemeData.

Sets the scheme data of the PointerPart.
public void
setSchemeName(String
A String containing the scheme name of the PointerPart.
schemeName
)

Implements org.apache.xerces.xpointer.XPointerPart.setSchemeName.

Sets the scheme name of the PointerPart or the ShortHand Pointer name.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fIsFragmentResolvedback to summary
private boolean fIsFragmentResolved
fMatchingChildCountback to summary
pack-priv int fMatchingChildCount

Resolves the XPointer ShortHand pointer based on the rules defined in Section 3.2 of the XPointer Framework Recommendation. Note that in the current implementation only supports DTD determined ID's.

See Also
org.apache.xerces.xpointer.XPointerPart#resolveXPointer(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations, int event)
fShortHandPointerback to summary
private String fShortHandPointer
fSymbolTableback to summary
private SymbolTable fSymbolTable

Constructor Detail

ShortHandPointerback to summary
public ShortHandPointer()
ShortHandPointerback to summary
public ShortHandPointer(SymbolTable symbolTable)

Method Detail

getChildrenSchemaDeterminedIDback to summary
public String getChildrenSchemaDeterminedID(XMLAttributes attributes, int index) throws XNIException

Not quite sure how this can be correctly implemented.

Returns:String

String - We return null since we currenly do not supprt this.

getDTDDeterminedIDback to summary
public String getDTDDeterminedID(XMLAttributes attributes, int index) throws XNIException

Rerturns the DTD determine-ID

Returns:String

String

getSchemaDeterminedIDback to summary
public String getSchemaDeterminedID(XMLAttributes attributes, int index) throws XNIException

Returns the schema-determined-ID.

Returns:String

A String containing the schema-determined ID.

getSchemeDataback to summary
public String getSchemeData()

Implements org.apache.xerces.xpointer.XPointerPart.getSchemeData.

Doc from org.apache.xerces.xpointer.XPointerPart.getSchemeData.

Returns a String containing the scheme data of the PointerPart.

Returns:String

A String containing the scheme data of the PointerPart.

See Also
org.apache.xerces.xpointer.XPointerPart#getSchemeData()
getSchemeNameback to summary
public String getSchemeName()

Implements org.apache.xerces.xpointer.XPointerPart.getSchemeName.

Returns the name of the ShortHand pointer

Returns:String

Doc from org.apache.xerces.xpointer.XPointerPart.getSchemeName.

A String containing the scheme name of the PointerPart.

See Also
org.apache.xerces.xpointer.XPointerPart#getSchemeName()
hasMatchingIdentifierback to summary
private boolean hasMatchingIdentifier(QName element, XMLAttributes attributes, Augmentations augs, int event) throws XNIException
isChildFragmentResolvedback to summary
public boolean isChildFragmentResolved()

Implements org.apache.xerces.xpointer.XPointerPart.isChildFragmentResolved.

Doc from org.apache.xerces.xpointer.XPointerPart.isChildFragmentResolved.

Returns true if the XPointer expression resolves to a non-element child of the current resource fragment.

Returns:boolean

True if the XPointer expression resolves to a non-element child of the current resource fragment.

See Also
org.apache.xerces.xpointer.XPointerPart#isChildFragmentResolved()
isFragmentResolvedback to summary
public boolean isFragmentResolved()

Implements org.apache.xerces.xpointer.XPointerPart.isFragmentResolved.

Doc from org.apache.xerces.xpointer.XPointerPart.isFragmentResolved.

Returns true if the XPointer expression resolves to a resource fragment specified as input else returns false.

Returns:boolean

True if the xpointer expression matches a fragment in the resource else returns false.

See Also
org.apache.xerces.xpointer.XPointerPart#isFragmentResolved()
parseXPointerback to summary
public void parseXPointer(String part) throws XNIException

Implements org.apache.xerces.xpointer.XPointerPart.parseXPointer.

The XPointerProcessor takes care of this. Simply set the ShortHand Pointer here.

Parameters
part:String

Doc from org.apache.xerces.xpointer.XPointerPart.parseXPointer.

A String representing the PointerPart or ShortHandPointer.

Exceptions
XNIException:

Doc from org.apache.xerces.xpointer.XPointerPart.parseXPointer.

Thrown if the PointerPart string does not conform to the syntax defined by its scheme.

See Also
org.apache.xerces.xpointer.XPointerPart#parseXPointer(java.lang.String)
resolveXPointerback to summary
public boolean resolveXPointer(QName element, XMLAttributes attributes, Augmentations augs, int event) throws XNIException

Implements org.apache.xerces.xpointer.XPointerPart.resolveXPointer.

Doc from org.apache.xerces.xpointer.XPointerPart.resolveXPointer.

Evaluates an XML resource with respect to an XPointer expressions by checking if it's element and attributes parameters match the criteria specified in the xpointer expression.

Parameters
element:QName

- The name of the element.

attributes:XMLAttributes

- The element attributes.

augs:Augmentations

- Additional information that may include infoset augmentations

event:int

- An integer indicating 0 - The start of an element 1 - The end of an element 2 - An empty element call

Exceptions
XNIException:
Thrown to signal an error
setSchemeDataback to summary
public void setSchemeData(String schemeData)

Implements org.apache.xerces.xpointer.XPointerPart.setSchemeData.

Doc from org.apache.xerces.xpointer.XPointerPart.setSchemeData.

Sets the scheme data of the PointerPart.

Parameters
schemeData:String

A String containing the scheme data of the PointerPart.

See Also
org.apache.xerces.xpointer.XPointerPart#setSchemeData(java.lang.String)
setSchemeNameback to summary
public void setSchemeName(String schemeName)

Implements org.apache.xerces.xpointer.XPointerPart.setSchemeName.

Doc from org.apache.xerces.xpointer.XPointerPart.setSchemeName.

Sets the scheme name of the PointerPart or the ShortHand Pointer name.

Parameters
schemeName:String

A String containing the scheme name of the PointerPart.

See Also
org.apache.xerces.xpointer.XPointerPart#setSchemeName(java.lang.String)