- All Superinterfaces:
IResourceResolver
- All Known Subinterfaces:
IBoundLoader
- All Known Implementing Classes:
DefaultBoundLoader
Supports loading documents referenced in Metapath expressions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IDocumentNodeItemloadAsNodeItem(File file) Load a Metaschema-based document from a file resource.loadAsNodeItem(URI uri) Load a Metaschema-based document from a URI resource.default IDocumentNodeItemloadAsNodeItem(URL url) Load a Metaschema-based document from a URL resource.default IDocumentNodeItemloadAsNodeItem(Path path) Load a Metaschema-based document from a file resource identified by a path.voidsetUriResolver(IUriResolver resolver) Allows setting anIUriResolver, which will be used to map URIs prior to loading the resource.Methods inherited from interface dev.metaschema.core.model.IResourceResolver
getUriResolver, resolve
-
Method Details
-
setUriResolver
Allows setting anIUriResolver, which will be used to map URIs prior to loading the resource.- Parameters:
resolver- the resolver to set
-
loadAsNodeItem
Load a Metaschema-based document from a file resource.- Parameters:
file- the file to load- Returns:
- a document item representing the contents of the document.
- Throws:
IOException- if an error occurred while parsing the file
-
loadAsNodeItem
Load a Metaschema-based document from a file resource identified by a path.- Parameters:
path- the file to load- Returns:
- a document item representing the contents of the document.
- Throws:
IOException- if an error occurred while parsing the file
-
loadAsNodeItem
@NonNull default IDocumentNodeItem loadAsNodeItem(@NonNull URL url) throws IOException, URISyntaxException Load a Metaschema-based document from a URL resource.- Parameters:
url- the resource to load- Returns:
- a document item representing the contents of the document.
- Throws:
IOException- if an error occurred while parsing the resourceURISyntaxException- if the URL is not a valid URI
-
loadAsNodeItem
Load a Metaschema-based document from a URI resource.This is the expected, primary entry point for implementations.
- Parameters:
uri- the resource to load- Returns:
- a document item representing the contents of the document.
- Throws:
IOException- if an error occurred while parsing the resource
-