@ThreadSafe public class SchemaDocumentCache extends Object implements Validator.SchemaDocumentResolver, Serializable
SchemaDocument instances that each have a validator that can
validate JSON Documents. When a SchemaDocument is needed and has not yet been loaded, this cache finds the corresponding JSON
Schema documents from the DocumentLibrary, and uses a factory to create the
Validator.| Constructor and Description |
|---|
SchemaDocumentCache(DocumentLibrary jsonSchemaDocuments,
String defaultMetaSchemaUri) |
| Modifier and Type | Method and Description |
|---|---|
protected Validator.Factory |
createFactory(URI schemaRefUri,
Problems problems) |
SchemaDocument |
get(String uri,
Problems problems)
Find the JSON Schema document with the supplied URI, and build the
in-memory representation
(including the validator. |
boolean |
remove(String uri)
Remove any
SchemaDocument that was loaded into this cache. |
void |
removeAll()
Remove all
SchemaDocument loaded into this cache. |
public SchemaDocumentCache(DocumentLibrary jsonSchemaDocuments, String defaultMetaSchemaUri)
public SchemaDocument get(String uri, Problems problems)
in-memory representation
(including the validator.get in interface Validator.SchemaDocumentResolveruri - the URI of the schema being readproblems - the object for recording any problems encountered while loading the schemaDocument representation, or null if there were fatal errorspublic boolean remove(String uri)
SchemaDocument that was loaded into this cache.uri - the URI of the schema being readpublic void removeAll()
SchemaDocument loaded into this cache.protected Validator.Factory createFactory(URI schemaRefUri, Problems problems)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.