public final class SchemaContainer extends Object
| Modifier and Type | Field and Description |
|---|---|
private static URI |
EMPTY_LOCATOR
Locator for an anonymous schema
|
private JsonRef |
locator |
private static org.slf4j.Logger |
logger |
private JsonNode |
schema |
| Constructor and Description |
|---|
SchemaContainer(JsonNode schema)
Return a new container based on a schema
|
SchemaContainer(URI uri,
JsonNode node)
Return a new container based on an URI and a schema
|
| Modifier and Type | Method and Description |
|---|---|
static SchemaContainer |
anonymousSchema(JsonNode node)
Create an anonymous schema
|
private static JsonNode |
cleanup(JsonNode schema)
Strip an object instance off its
id member, if any |
boolean |
equals(Object o) |
JsonRef |
getLocator()
Get this container's locator
|
JsonNode |
getSchema()
Get this container's underlying schema
|
int |
hashCode() |
private static final org.slf4j.Logger logger
private static final URI EMPTY_LOCATOR
private final JsonNode schema
private final JsonRef locator
public SchemaContainer(JsonNode schema)
Note that if the id node exists and is an URI,
but not absolute, an anonymousSchema(JsonNode) will be
returned.
schema - the schemapublic SchemaContainer(URI uri, JsonNode node)
Note that if the provided URI is not absolute, an
anonymousSchema(JsonNode) is returned.
uri - the URInode - the schemapublic static SchemaContainer anonymousSchema(JsonNode node)
node - the schema as a JsonNodepublic JsonRef getLocator()
public JsonNode getSchema()
JsonNodeCopyright © 2012. All Rights Reserved.