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.LoggerLOGGERprivate DocumentResolverresolver
-
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)DocumentloadDocument(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:DocumentLoaderRetrieve a remote document.- Specified by:
loadDocumentin interfaceDocumentLoader- Parameters:
url- of the remote document to fetchoptions- to set the behavior of the loader- Returns:
Documentrepresenting a remote document- Throws:
JsonLdError
-
detectedContentType
private static java.util.Optional<MediaType> detectedContentType(java.lang.String name)
-
-