public class DocumentSources extends Object
| Modifier and Type | Method and Description |
|---|---|
static Optional<InputStream> |
getInputStream(IRI documentIRI,
OWLOntologyLoaderConfiguration config)
A convenience method that obtains an input stream from a URI.
|
static InputStream |
wrap(InputStream delegate)
Wrap an input stream to strip BOMs.
|
static InputStream |
wrapInput(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration configuration)
Select the available input source as an input stream.
|
static Reader |
wrapInputAsReader(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration configuration)
Call #wrapwrapInputAsReader(OWLOntologyLoaderConfiguration, String) with
UTF-* as default encoding.
|
static Reader |
wrapInputAsReader(OWLOntologyDocumentSource source,
OWLOntologyLoaderConfiguration configuration,
Charset encoding)
Select the available input source and, if it is not already a Reader,
wrap it in a Reader.
|
public static Reader wrapInputAsReader(OWLOntologyDocumentSource source, OWLOntologyLoaderConfiguration configuration, Charset encoding) throws OWLOntologyInputSourceException
source - ontology sourceconfiguration - loader configuration to use of the reader must be built form the input
IRIencoding - character encoding if a new Reader needs to be created.OWLOntologyInputSourceException - if an IO related exception is thrown.public static Reader wrapInputAsReader(OWLOntologyDocumentSource source, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyInputSourceException
source - ontology sourceconfiguration - loader configuration to use of the reader must be built form the input
IRIOWLOntologyInputSourceException - if an IO related exception is thrown.public static InputStream wrapInput(OWLOntologyDocumentSource source, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyInputSourceException
source - ontology sourceconfiguration - loader configuration to use of the reader must be built form the input
IRIOWLOntologyInputSourceException - if an IO related exception is thrown.public static Optional<InputStream> getInputStream(IRI documentIRI, OWLOntologyLoaderConfiguration config) throws OWLOntologyInputSourceException
documentIRI - The URI from which the input stream should be returnedconfig - the load configurationOWLOntologyInputSourceException - if there was an IOException in obtaining the
input stream from the URI.public static InputStream wrap(InputStream delegate)
delegate - delegate to wrapCopyright © 2017 The University of Manchester. All rights reserved.