|
|||||||||
| 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
@Immutable public abstract class BaseSchemaTree
Base implementation of a SchemaTree
CanonicalSchemaTree,
InlineSchemaTree| Field Summary | |
|---|---|
protected JsonNode |
baseNode
The initial node |
protected JsonRef |
loadingRef
The JSON Reference from which this node has been loaded |
protected JsonPointer |
pointer
The current JSON Pointer into the node. |
| Constructor Summary | |
|---|---|
protected |
BaseSchemaTree(BaseSchemaTree other,
JsonPointer newPointer)
|
protected |
BaseSchemaTree(JsonRef loadingRef,
JsonNode baseNode,
JsonPointer pointer)
|
| Method Summary | |
|---|---|
JsonNode |
asJson()
Return a JSON representation of this object |
JsonNode |
getBaseNode()
Return the node this tree was created with |
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 |
JsonNode |
getNode()
Get the node at the current path |
JsonPointer |
getPointer()
Get the current path into the document |
protected static JsonRef |
idFromNode(JsonNode node)
Build a JSON Reference from a node |
JsonRef |
resolve(JsonRef other)
Resolve a JSON Reference against the current resolution context |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.github.fge.jsonschema.core.tree.SchemaTree |
|---|
append, containsRef, matchingPointer, setPointer |
| Field Detail |
|---|
protected final JsonNode baseNode
protected final JsonPointer pointer
protected final JsonRef loadingRef
If loaded without a URI, this will be the empty reference.
| Constructor Detail |
|---|
protected BaseSchemaTree(JsonRef loadingRef,
JsonNode baseNode,
JsonPointer pointer)
protected BaseSchemaTree(BaseSchemaTree other,
JsonPointer newPointer)
| Method Detail |
|---|
public final long getId()
getId in interface SchemaTreepublic final JsonNode getBaseNode()
SimpleTreeNote: in current Jackson versions, this node is unfortunately mutable, so be careful...
getBaseNode in interface SimpleTreepublic final JsonPointer getPointer()
SimpleTree
getPointer in interface SimpleTreepublic final JsonNode getNode()
SimpleTree
getNode in interface SimpleTreeMissingNode if there is no matching
node at that pointer)public final JsonRef resolve(JsonRef other)
resolve in interface SchemaTreeother - the JSON Reference to resolve
JsonRef.resolve(JsonRef)public final JsonRef getDollarSchema()
SchemaTree$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.
getDollarSchema in interface SchemaTree$schema as a JsonRefpublic final JsonRef getLoadingRef()
getLoadingRef in interface SchemaTreeJsonRefpublic final JsonRef getContext()
getContext in interface SchemaTreeJsonRefpublic final JsonNode asJson()
AsJson
asJson in interface AsJsonJsonNodepublic final String toString()
toString in class Objectprotected static JsonRef idFromNode(JsonNode node)
This will return null if the reference could not be built. The
conditions for a successful build are as follows:
id;
node - the node
null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||