public class DocumentSources extends Object
Modifier and Type | Method and Description |
---|---|
static Optional<InputStream> |
getInputStream(IRI documentIRI,
OWLOntologyLoaderConfiguration config)
Deprecated.
|
static Optional<InputStream> |
getInputStream(IRI documentIRI,
OWLOntologyLoaderConfiguration config,
String acceptHeaders)
A convenience method that obtains an input stream from a URI.
|
static InputStream |
wrap(InputStream delegate)
Wrap an input stream to strip the BOM.
|
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.@Deprecated public static Optional<InputStream> getInputStream(IRI documentIRI, OWLOntologyLoaderConfiguration config) throws OWLOntologyInputSourceException
getInputStream(IRI, OWLOntologyLoaderConfiguration, String)
insteaddocumentIRI
- 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 Optional<InputStream> getInputStream(IRI documentIRI, OWLOntologyLoaderConfiguration config, String acceptHeaders) throws OWLOntologyInputSourceException
documentIRI
- The URI from which the input stream should be returnedconfig
- the load configurationacceptHeaders
- accept headers for the connectionOWLOntologyInputSourceException
- if there was an IOException
in obtaining the
input stream from the URI.public static InputStream wrap(InputStream delegate)
delegate
- delegate to wrapCopyright © 2020 The University of Manchester. All rights reserved.