|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SchemaTree
Tree representation of a JSON Schema
In addition to navigation capabilities and node retrieval, this tree returns URI context information and JSON Reference resolution.
| Method Summary | |
|---|---|
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()
|
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 |
| Methods inherited from interface com.github.fge.jsonschema.core.tree.SimpleTree |
|---|
getBaseNode, getNode, getPointer |
| Methods inherited from interface com.github.fge.jsonschema.core.util.AsJson |
|---|
asJson |
| Method Detail |
|---|
SchemaTree append(JsonPointer pointer)
pointer - the pointer to append
JsonPointer.append(JsonPointer)SchemaTree setPointer(JsonPointer pointer)
pointer - the pointer
JsonRef resolve(JsonRef other)
other - the JSON Reference to resolve
JsonRef.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 reference
resolve(JsonRef)JsonPointer matchingPointer(JsonRef ref)
This must be called only when containsRef(JsonRef)
returns true. Otherwise, its result is undefined.
ref - the reference
null if not foundlong getId()
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 JsonRefJsonRef getLoadingRef()
JsonRefJsonRef getContext()
JsonRef
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||