public class SchemaStore extends Object
Modifier and Type | Field and Description |
---|---|
protected ContentResolver |
contentResolver |
protected FragmentResolver |
fragmentResolver |
protected Map<URI,Schema> |
schemas |
Constructor and Description |
---|
SchemaStore() |
SchemaStore(ContentResolver contentResolver) |
Modifier and Type | Method and Description |
---|---|
void |
clearCache() |
Schema |
create(Schema parent,
String path,
String refFragmentPathDelimiters)
Create or look up a new schema using the given schema as a parent and the
path as a relative reference.
|
Schema |
create(URI id,
String refFragmentPathDelimiters)
Create or look up a new schema which has the given ID and read the
contents of the given ID as a URL.
|
protected URI |
removeFragment(URI id) |
protected boolean |
selfReferenceWithoutParentFile(Schema parent,
String path) |
protected final FragmentResolver fragmentResolver
protected final ContentResolver contentResolver
public SchemaStore()
public SchemaStore(ContentResolver contentResolver)
public Schema create(URI id, String refFragmentPathDelimiters)
id
- the id of the schema being createdrefFragmentPathDelimiters
- A string containing any characters
that should act as path delimiters when resolving $ref fragments.public Schema create(Schema parent, String path, String refFragmentPathDelimiters)
parent
- the schema which is the parent of the schema to be created.path
- the relative path of this schema (will be used to create a
complete URI by resolving this path against the parent
schema's id)refFragmentPathDelimiters
- A string containing any characters
that should act as path delimiters when resolving $ref fragments.protected boolean selfReferenceWithoutParentFile(Schema parent, String path)
public void clearCache()
Copyright © 2022. All rights reserved.