public final class ElementScheme extends Object implements SimpleXPointerScheme
ElementXPointer
Modifier and Type | Field and Description |
---|---|
static Name[] |
SCHEME_NAMES |
Constructor and Description |
---|
ElementScheme() |
Modifier and Type | Method and Description |
---|---|
Name[] |
getSchemeNames()
Returns one or more names for this scheme.
|
static ElementXPointer |
parsePointer(String spec)
Returns a simple xpointer conforming to the element()
scheme constructed by parsing specified specification.
|
static ElementXPointer |
parseSchemeData(String data)
Returns a simple xpointer by parsing specified
element() scheme data.
|
ElementXPointer |
parseXPointer(Name schemeName,
String schemeData,
PrefixToNamespace prefixToNS)
Parses xpointer having specified scheme name and specified scheme data.
|
public static final Name[] SCHEME_NAMES
public Name[] getSchemeNames()
SimpleXPointerScheme
getSchemeNames
in interface SimpleXPointerScheme
public ElementXPointer parseXPointer(Name schemeName, String schemeData, PrefixToNamespace prefixToNS) throws XPointerException
SimpleXPointerScheme
parseXPointer
in interface SimpleXPointerScheme
schemeName
- the name of the scheme.
It's one of the names returned by SimpleXPointerScheme.getSchemeNames()
.schemeData
- the scheme data to be parsedprefixToNS
- maps prefixes to the corresponding namespacesnull
if the specification
cannot be parsed.XPointerException
- if the specification cannot be parsed.
Note that the implementation may choose to return null
rather than raise an exception.
public static final ElementXPointer parsePointer(String spec)
null
if specification has syntax errors. Shorthand
notation (example: #foo instead of #element(foo)) is
also supported.parseSchemeData(java.lang.String)
public static final ElementXPointer parseSchemeData(String data)
null
if the scheme data has syntax errors.parsePointer(java.lang.String)