|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.core.tree.BaseSchemaTree
com.github.fge.jsonschema.core.tree.InlineSchemaTree
@Immutable @ParametersAreNonnullByDefault public final class InlineSchemaTree
A SchemaTree using inline dereferencing
In inline dereferencing, implementations are expected to trust that the
schema is the referrent document for all contexts declared by id.
For instance, with this schema:
{
"id": "x;//y/z",
"sub": {
"id": "t"
}
}
JSON Reference x://y/t# is this JSON document at JSON Pointer
/sub.
| Field Summary |
|---|
| Fields inherited from class com.github.fge.jsonschema.core.tree.BaseSchemaTree |
|---|
baseNode, key, pointer |
| Constructor Summary | |
|---|---|
InlineSchemaTree(JsonNode baseNode)
Deprecated. use InlineSchemaTree(SchemaKey, JsonNode) instead |
|
InlineSchemaTree(JsonRef loadingRef,
JsonNode baseNode)
Deprecated. use InlineSchemaTree(SchemaKey, JsonNode) instead |
|
InlineSchemaTree(SchemaKey key,
JsonNode baseNode)
Main constructor |
|
| 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 |
JsonPointer |
matchingPointer(JsonRef ref)
Return a matching pointer in this tree for a fully resolved reference |
SchemaTree |
setPointer(JsonPointer pointer)
Relocate the tree with an absolute pointer |
| Methods inherited from class com.github.fge.jsonschema.core.tree.BaseSchemaTree |
|---|
asJson, equals, getBaseNode, getContext, getDollarSchema, getId, getLoadingRef, getNode, getPointer, hashCode, idFromNode, resolve, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InlineSchemaTree(SchemaKey key,
JsonNode baseNode)
key - the schema keybaseNode - the base node@Deprecated public InlineSchemaTree(JsonNode baseNode)
InlineSchemaTree(SchemaKey, JsonNode) instead
baseNode - the base node
@Deprecated
public InlineSchemaTree(JsonRef loadingRef,
JsonNode baseNode)
InlineSchemaTree(SchemaKey, JsonNode) instead
loadingRef - the loading refbaseNode - the base node| Method Detail |
|---|
public SchemaTree append(JsonPointer pointer)
SchemaTree
pointer - the pointer to append
JsonPointer.append(JsonPointer)public SchemaTree setPointer(JsonPointer pointer)
SchemaTree
pointer - the pointer
public boolean containsRef(JsonRef ref)
SchemaTreeThis 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
SchemaTree.resolve(JsonRef)public JsonPointer matchingPointer(JsonRef ref)
SchemaTreeThis must be called only when SchemaTree.containsRef(JsonRef)
returns true. Otherwise, its result is undefined.
ref - the reference
null if not found
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||