Package com.adaptris.core.json.schema
Class AdvancedJsonSchemaLoader
- java.lang.Object
-
- com.adaptris.core.json.schema.AdvancedJsonSchemaLoader
-
- All Implemented Interfaces:
JsonSchemaLoader
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://
orhttp://
URL. :{ "type": "array", "items": { "$ref": "classpath://com/adaptris/core/json/schema/test_schema.json" } }
-
-
Constructor Summary
Constructors Constructor Description AdvancedJsonSchemaLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
loadSchema
public org.everit.json.schema.Schema loadSchema(org.json.JSONObject rawSchema)
Description copied from interface:JsonSchemaLoader
Provide a JSON Schema based on the JSONObject parameter.- Specified by:
loadSchema
in interfaceJsonSchemaLoader
- Parameters:
rawSchema
- JSONObject to load as Schema.- Returns:
- Schema based on JSONObject.
-
setClassPathAwareClient
public void setClassPathAwareClient(java.lang.Boolean classPathAwareClient)
Toggle the classpath aware functionality of the schema builder.- Parameters:
classPathAwareClient
- control classpath aware functionality
-
getClassPathAwareClient
public java.lang.Boolean getClassPathAwareClient()
Returns whether or not to enable the classpath aware functionality of the schema builder.- Returns:
- whether or not to enable the classpath aware functionality
-
setResolutionScope
public void setResolutionScope(java.lang.String resolutionScope)
Sets the initial resolution scope of the schema.- Parameters:
resolutionScope
- the initial (absolute) URI, used as the resolution scope.
-
getResolutionScope
public java.lang.String getResolutionScope()
The initial resolution scope of the schema.- Returns:
- The (absolute) URI, used as the resolution scope.
-
-