Package no.hasmac.jsonld.loader
Class FileLoader
- java.lang.Object
-
- no.hasmac.jsonld.loader.FileLoader
-
- All Implemented Interfaces:
DocumentLoader
public final class FileLoader extends java.lang.Object implements DocumentLoader
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Logger
LOGGER
private DocumentResolver
resolver
-
Constructor Summary
Constructors Constructor Description FileLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Optional<MediaType>
detectedContentType(java.lang.String name)
Document
loadDocument(java.net.URI url, DocumentLoaderOptions options)
Retrieve a remote document.
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
resolver
private final DocumentResolver resolver
-
-
Method Detail
-
loadDocument
public Document loadDocument(java.net.URI url, DocumentLoaderOptions options) throws JsonLdError
Description copied from interface:DocumentLoader
Retrieve a remote document.- Specified by:
loadDocument
in interfaceDocumentLoader
- Parameters:
url
- of the remote document to fetchoptions
- to set the behavior of the loader- Returns:
Document
representing a remote document- Throws:
JsonLdError
-
detectedContentType
private static java.util.Optional<MediaType> detectedContentType(java.lang.String name)
-
-