Implements the XPointerPart interface for element() scheme specific processing.
| Modifier and Type | Class and Description |
|---|---|
| private class | ElementSchemePointer.Scanner
The XPointer expression scanner. |
| private class | ElementSchemePointer.Tokens
List of XPointer Framework tokens. |
| Modifier and Type | Field and Description |
|---|---|
| private int[] | |
| private int | |
| private int | |
| private int[] | |
| protected XMLErrorHandler | |
| protected XMLErrorReporter | |
| pack-priv int | |
| private boolean | |
| private boolean | |
| private boolean | |
| pack-priv boolean | |
| private String | |
| private String | |
| private ShortHandPointer | |
| private String | |
| private SymbolTable | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: booleanMatches the current position of the element being visited by checking its position and previous elements against the element XPointer expression. |
| public String | getSchemeData()
Implements org. |
| public String | getSchemeName()
Implements org. |
| protected void | |
| protected void | |
| public boolean | isChildFragmentResolved()
Implements org. |
| public boolean | isFragmentResolved()
Implements org. |
| protected boolean | Returns: boolean - true if the current element position in the document tree matches theelement position specified in the element XPointer scheme.Matches the current element position in the document tree with the element position specified in the element XPointer scheme. |
| public void | parseXPointer(String
A String representing the PointerPart or ShortHandPointer. xpointer)Implements org. |
| protected void | |
| 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. |
| public void | setSchemeData(String
A String containing the scheme data of the PointerPart. schemeData)Implements org. |
| public void | setSchemeName(String
A String containing the scheme name of the PointerPart. schemeName)Implements org. |
| fChildSequence | back to summary |
|---|---|
| private int[] fChildSequence | |
| fCurrentChildDepth | back to summary |
|---|---|
| private int fCurrentChildDepth | |
| fCurrentChildPosition | back to summary |
|---|---|
| private int fCurrentChildPosition | |
| fCurrentChildSequence | back to summary |
|---|---|
| private int[] fCurrentChildSequence | |
| fErrorHandler | back to summary |
|---|---|
| protected XMLErrorHandler fErrorHandler | |
| fErrorReporter | back to summary |
|---|---|
| protected XMLErrorReporter fErrorReporter | |
| fFoundDepth | back to summary |
|---|---|
| pack-priv int fFoundDepth | |
| fIsElementFound | back to summary |
|---|---|
| private boolean fIsElementFound | |
| fIsFragmentResolved | back to summary |
|---|---|
| private boolean fIsFragmentResolved | |
| fIsResolveElement | back to summary |
|---|---|
| private boolean fIsResolveElement | |
| fIsShortHand | back to summary |
|---|---|
| pack-priv boolean fIsShortHand | |
| fSchemeData | back to summary |
|---|---|
| private String fSchemeData | |
| fSchemeName | back to summary |
|---|---|
| private String fSchemeName | |
| fShortHandPointer | back to summary |
|---|---|
| private ShortHandPointer fShortHandPointer | |
| fShortHandPointerName | back to summary |
|---|---|
| private String fShortHandPointerName | |
| fSymbolTable | back to summary |
|---|---|
| private SymbolTable fSymbolTable | |
| fWasOnlyEmptyElementFound | back to summary |
|---|---|
| private boolean fWasOnlyEmptyElementFound | |
| ElementSchemePointer | back to summary |
|---|---|
| public ElementSchemePointer() | |
| ElementSchemePointer | back to summary |
|---|---|
| public ElementSchemePointer(SymbolTable symbolTable) | |
| ElementSchemePointer | back to summary |
|---|---|
| public ElementSchemePointer(SymbolTable symbolTable, XMLErrorReporter errorReporter) | |
| checkMatch | back to summary |
|---|---|
| protected boolean checkMatch() Matches the current position of the element being visited by checking its position and previous elements against the element XPointer expression. If a match is found it return true else false.
| |
| getSchemeData | back to summary |
|---|---|
| public String getSchemeData() Implements org. Returns the scheme data
| |
| getSchemeName | back to summary |
|---|---|
| public String getSchemeName() Implements org. Returns the scheme name i.e element
| |
| init | back to summary |
|---|---|
| protected void init() Initializes the element scheme processor | |
| initErrorReporter | back to summary |
|---|---|
| protected void initErrorReporter() Initializes error handling objects | |
| isChildFragmentResolved | back to summary |
|---|---|
| public boolean isChildFragmentResolved() Implements org. Returns true if the XPointer expression resolves to a non-element child of the current resource fragment.
| |
| isFragmentResolved | back to summary |
|---|---|
| public boolean isFragmentResolved() throws XNIException Implements org. Returns true if the node matches or is a child of a matching element() scheme XPointer.
| |
| matchChildSequence | back to summary |
|---|---|
| protected boolean matchChildSequence(QName element, int event) throws XNIException Matches the current element position in the document tree with the element position specified in the element XPointer scheme.
| |
| parseXPointer | back to summary |
|---|---|
| public void parseXPointer(String xpointer) throws XNIException Implements org. Parses the XPointer expression and tokenizes it into Strings delimited by whitespace.
| |
| reportError | back to summary |
|---|---|
| protected void reportError(String key, Object[] arguments) throws XNIException Reports an XPointer error | |
| resolveXPointer | back to summary |
|---|---|
| public boolean resolveXPointer(QName element, XMLAttributes attributes, Augmentations augs, int event) throws XNIException Implements org. Responsible for resolving the element() scheme XPointer. If a ShortHand Pointer is present and it is successfully resolved and if a child sequence is present, the child sequence is resolved relative to it.
| |
| setSchemeData | back to summary |
|---|---|
| public void setSchemeData(String schemeData) Implements org. Sets the scheme data
| |
| setSchemeName | back to summary |
|---|---|
| public void setSchemeName(String schemeName) Implements org. Sets the scheme name
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte | CHARTYPE_DIGIT
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_INVALID
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_LETTER
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_MINUS
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_NONASCII
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_OTHER
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_PERIOD
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_SLASH
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private static final byte | CHARTYPE_UNDERSCORE
7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 |
| private final byte[] | |
| private SymbolTable | fSymbolTable
Symbol table. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addToken(ElementSchemePointer.
This method adds the specified token to the token list. |
| private boolean | scanExpr(SymbolTable symbolTable, ElementSchemePointer.
Scans the XPointer Expression |
| private int | scanNCName(String
A String containing the XPointer expression data, int The int XPointer expression length endOffset, int An int representing the current position of the XPointer expression pointer currentOffset)Scans a NCName. |
| CHARTYPE_DIGIT | back to summary |
|---|---|
| private static final byte CHARTYPE_DIGIT 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_INVALID | back to summary |
|---|---|
| private static final byte CHARTYPE_INVALID 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_LETTER | back to summary |
|---|---|
| private static final byte CHARTYPE_LETTER 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_MINUS | back to summary |
|---|---|
| private static final byte CHARTYPE_MINUS 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_NONASCII | back to summary |
|---|---|
| private static final byte CHARTYPE_NONASCII 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_OTHER | back to summary |
|---|---|
| private static final byte CHARTYPE_OTHER 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_PERIOD | back to summary |
|---|---|
| private static final byte CHARTYPE_PERIOD 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_SLASH | back to summary |
|---|---|
| private static final byte CHARTYPE_SLASH 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| CHARTYPE_UNDERSCORE | back to summary |
|---|---|
| private static final byte CHARTYPE_UNDERSCORE 7-bit ASCII subset 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, HT, LF, 0, 0, CR, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 SP, !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, // 2 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, // 3 | |
| fASCIICharMap | back to summary |
|---|---|
| private final byte[] fASCIICharMap | |
| fSymbolTable | back to summary |
|---|---|
| private SymbolTable fSymbolTable Symbol table. | |
| Scanner | back to summary |
|---|---|
| private Scanner(SymbolTable symbolTable) Constructs an XPath expression scanner.
| |
| addToken | back to summary |
|---|---|
| protected void addToken(ElementSchemePointer. This method adds the specified token to the token list. By default, this method allows all tokens. However, subclasses of the XPathExprScanner can override this method in order to disallow certain tokens from being used in the scanned XPath expression. This is a convenient way of allowing only a subset of XPath. | |
| scanExpr | back to summary |
|---|---|
| private boolean scanExpr(SymbolTable symbolTable, ElementSchemePointer. Scans the XPointer Expression | |
| scanNCName | back to summary |
|---|---|
| private int scanNCName(String data, int endOffset, int currentOffset) Scans a NCName. From Namespaces in XML [5] NCName ::= (Letter | '_') (NCNameChar)* [6] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final String[] | |
| private SymbolTable | |
| private int | |
| private HashMap | |
| private int[] | |
| private static final int | |
| private static final int | |
| private static final int | XPTRTOKEN_ELEM_NCNAME
XPointer element() scheme [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence [2] ChildSequence ::= ('/' [1-9] [0-9]*)+ |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private Integer | |
| private int | |
| private String | |
| private boolean | |
| private int | |
| private String | |
| private int | |
| private void |
| fCurrentTokenIndex | back to summary |
|---|---|
| private int fCurrentTokenIndex | |
| fgTokenNames | back to summary |
|---|---|
| private final String[] fgTokenNames | |
| fSymbolTable | back to summary |
|---|---|
| private SymbolTable fSymbolTable | |
| fTokenCount | back to summary |
|---|---|
| private int fTokenCount | |
| fTokenNames | back to summary |
|---|---|
| private HashMap<K, V> fTokenNames | |
| fTokens | back to summary |
|---|---|
| private int[] fTokens | |
| INITIAL_TOKEN_COUNT | back to summary |
|---|---|
| private static final int INITIAL_TOKEN_COUNT | |
| XPTRTOKEN_ELEM_CHILD | back to summary |
|---|---|
| private static final int XPTRTOKEN_ELEM_CHILD | |
| XPTRTOKEN_ELEM_NCNAME | back to summary |
|---|---|
| private static final int XPTRTOKEN_ELEM_NCNAME XPointer element() scheme [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence [2] ChildSequence ::= ('/' [1-9] [0-9]*)+ | |
| Tokens | back to summary |
|---|---|
| private Tokens(SymbolTable symbolTable) Constructor
| |
| addToken | back to summary |
|---|---|
| private void addToken(String tokenStr) Add the specified string as a token
| |
| addToken | back to summary |
|---|---|
| private void addToken(int token) Add the specified int token
| |
| getToken | back to summary |
|---|---|
| private Integer getToken(int token) Returns the token String
| |
| getTokenCount | back to summary |
|---|---|
| private int getTokenCount() Returns the number of tokens. | |
| getTokenString | back to summary |
|---|---|
| private String getTokenString(int token) | |
| hasMore | back to summary |
|---|---|
| private boolean hasMore() Returns true if the | |
| nextToken | back to summary |
|---|---|
| private int nextToken() throws XNIException Obtains the token at the current position, then advance the current position by one. If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");. | |
| nextTokenAsString | back to summary |
|---|---|
| private String nextTokenAsString() throws XNIException Obtains the token at the current position as a String. If there's no current token or if the current token is not a string token, this method throws If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");. | |
| peekToken | back to summary |
|---|---|
| private int peekToken() throws XNIException Obtains the token at the current position, without advancing the current position. If there's no such next token, this method throws new XNIException("InvalidXPointerExpression");. | |
| rewind | back to summary |
|---|---|
| private void rewind() Resets the current position to the head of the token list. | |