@Immutable @ParametersAreNonnullByDefault public abstract class BaseSchemaTree extends Object implements SchemaTree
SchemaTree
CanonicalSchemaTree
,
InlineSchemaTree
Modifier and Type | Field and Description |
---|---|
protected JsonNode |
baseNode
The initial node
|
protected SchemaKey |
key |
protected JsonPointer |
pointer
The current JSON Pointer into the node.
|
Modifier | Constructor and Description |
---|---|
protected |
BaseSchemaTree(BaseSchemaTree other,
JsonPointer newPointer) |
protected |
BaseSchemaTree(JsonRef loadingRef,
JsonNode baseNode,
JsonPointer pointer)
Deprecated.
|
protected |
BaseSchemaTree(SchemaKey key,
JsonNode baseNode,
JsonPointer pointer) |
Modifier and Type | Method and Description |
---|---|
JsonNode |
asJson()
Return a JSON representation of this object
|
boolean |
equals(Object obj) |
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()
Deprecated.
|
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
|
int |
hashCode() |
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
append, containsRef, matchingPointer, setPointer
protected final SchemaKey key
protected final JsonNode baseNode
protected final JsonPointer pointer
protected BaseSchemaTree(SchemaKey key, JsonNode baseNode, JsonPointer pointer)
@Deprecated protected BaseSchemaTree(JsonRef loadingRef, JsonNode baseNode, JsonPointer pointer)
protected BaseSchemaTree(BaseSchemaTree other, JsonPointer newPointer)
@Deprecated public final long getId()
SchemaTree
getId
in interface SchemaTree
public final JsonNode getBaseNode()
SimpleTree
Note: in current Jackson versions, this node is unfortunately mutable, so be careful...
getBaseNode
in interface SimpleTree
public final JsonPointer getPointer()
SimpleTree
getPointer
in interface SimpleTree
public final JsonNode getNode()
SimpleTree
getNode
in interface SimpleTree
MissingNode
if there is no matching
node at that pointer)public final JsonRef resolve(JsonRef other)
resolve
in interface SchemaTree
other
- the JSON Reference to resolveJsonRef.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 JsonRef
public final JsonRef getLoadingRef()
getLoadingRef
in interface SchemaTree
JsonRef
public final JsonRef getContext()
getContext
in interface SchemaTree
JsonRef
public final JsonNode asJson()
AsJson
@Nullable protected 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 nodenull