public interface SchemaTree extends SimpleTree
In addition to navigation capabilities and node retrieval, this tree returns URI context information and JSON Reference resolution.
Modifier and Type | Method and Description |
---|---|
SchemaTree |
append(JsonPointer pointer)
Relocate the tree relatively to the current tree's pointer
|
boolean |
containsRef(JsonRef ref)
Tell whether a JSON Reference is contained within this schema tree
|
JsonRef |
getContext()
Get the current resolution context
|
JsonRef |
getDollarSchema()
Return the metaschema URI for that schema (ie,
$schema ) |
long |
getId()
Deprecated.
superseded by
SchemaKey |
JsonRef |
getLoadingRef()
Get the loading URI for that schema
|
JsonPointer |
matchingPointer(JsonRef ref)
Return a matching pointer in this tree for a fully resolved reference
|
JsonRef |
resolve(JsonRef other)
Resolve a JSON Reference against the current resolution context
|
SchemaTree |
setPointer(JsonPointer pointer)
Relocate the tree with an absolute pointer
|
getBaseNode, getNode, getPointer
SchemaTree append(JsonPointer pointer)
pointer
- the pointer to appendJsonPointer.append(JsonPointer)
SchemaTree setPointer(JsonPointer pointer)
pointer
- the pointerJsonRef resolve(JsonRef other)
other
- the JSON Reference to resolveJsonRef.resolve(JsonRef)
boolean containsRef(JsonRef ref)
This method will return true
if the caller can attempt
to retrieve the JSON value addressed by this reference from the schema
tree directly.
Note that the reference must be fully resolved for this method to work.
ref
- the target referenceresolve(JsonRef)
@Nullable JsonPointer matchingPointer(JsonRef ref)
This must be called only when containsRef(JsonRef)
returns true
. Otherwise, its result is undefined.
ref
- the referencenull
if not found@Deprecated long getId()
SchemaKey
JsonRef getDollarSchema()
$schema
)
Note: it is required that if present, $schema
be an
absolute JSON Reference. If this keyword is not present and/or is
malformed, an empty reference is returned.
$schema
as a JsonRef
JsonRef getLoadingRef()
JsonRef