public class AdvancedJsonSchemaLoader extends java.lang.Object implements JsonSchemaLoader
JsonSchemaLoader
implementation that allows for more settings.
If you have a schema defined such that supporting files for your schema are only available on the
classpath, rather than as a file://
or http://
URL. :
{
"type": "array",
"items": {
"$ref": "classpath://com/adaptris/core/json/schema/test_schema.json"
}
}
then you need to enable the classpath aware functionality of the schema builder; this is disabled
by default with the expectation that generally either all schemas as self-contained, or they are
available explicitly as a standard URL resource.Constructor and Description |
---|
AdvancedJsonSchemaLoader() |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getClassPathAwareClient()
Returns whether or not to enable the classpath aware functionality of the schema builder.
|
java.lang.String |
getResolutionScope()
The initial resolution scope of the schema.
|
org.everit.json.schema.Schema |
loadSchema(org.json.JSONObject rawSchema)
Provide a JSON Schema based on the JSONObject parameter.
|
void |
setClassPathAwareClient(java.lang.Boolean classPathAwareClient)
Toggle the classpath aware functionality of the schema builder.
|
void |
setResolutionScope(java.lang.String resolutionScope)
Sets the initial resolution scope of the schema.
|
public org.everit.json.schema.Schema loadSchema(org.json.JSONObject rawSchema)
JsonSchemaLoader
loadSchema
in interface JsonSchemaLoader
rawSchema
- JSONObject to load as Schema.public void setClassPathAwareClient(java.lang.Boolean classPathAwareClient)
classPathAwareClient
- control classpath aware functionalitypublic java.lang.Boolean getClassPathAwareClient()
public void setResolutionScope(java.lang.String resolutionScope)
resolutionScope
- the initial (absolute) URI, used as the resolution scope.public java.lang.String getResolutionScope()