public enum Dereferencing extends Enum<Dereferencing>
Draft v4 defines two dereferencing modes: canonical and inline. This enum defines those two modes, along with methods to generate appropriate schema trees.
InlineSchemaTree
,
CanonicalSchemaTree
Enum Constant and Description |
---|
CANONICAL
Canonical dereferencing
|
INLINE
Inline dereferencing
|
Modifier and Type | Method and Description |
---|---|
SchemaTree |
newTree(JsonNode node)
Create a new schema tree with an empty loading URI
|
SchemaTree |
newTree(JsonRef ref,
JsonNode node)
Create a new schema tree with a given loading URI and JSON Schema
|
protected abstract SchemaTree |
newTree(SchemaKey key,
JsonNode node) |
String |
toString() |
static Dereferencing |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Dereferencing[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Dereferencing CANONICAL
CanonicalSchemaTree
public static final Dereferencing INLINE
InlineSchemaTree
public static Dereferencing[] values()
for (Dereferencing c : Dereferencing.values()) System.out.println(c);
public static Dereferencing valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic SchemaTree newTree(JsonRef ref, JsonNode node)
ref
- the locationnode
- the schemapublic SchemaTree newTree(JsonNode node)
node
- the schemaprotected abstract SchemaTree newTree(SchemaKey key, JsonNode node)
public String toString()
toString
in class Enum<Dereferencing>