Package org.semanticweb.owlapi.io
Class XZStreamDocumentSource
java.lang.Object
org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
org.semanticweb.owlapi.io.XZStreamDocumentSource
- All Implemented Interfaces:
OWLOntologyDocumentSource
An ontology document source which can read from a XZ stream.
- Since:
- 4.0.2
- Author:
- ses
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an input source which will read an ontology from a representation from the specified file.XZStreamDocumentSource
(InputStream stream, IRI documentIRI, OWLDocumentFormat format, String mime) Constructs an input source which will read an ontology from a representation from the specified stream. -
Method Summary
Modifier and TypeMethodDescriptionIf an input stream can be obtained from this document source then this method creates it.Gets a reader which an ontology document can be read from.Methods inherited from class org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
getAcceptHeaders, getDocumentIRI, getFormat, getMIMEType, hasAlredyFailedOnIRIResolution, hasAlredyFailedOnStreams, setAcceptHeaders, setIRIResolutionFailed
-
Constructor Details
-
XZStreamDocumentSource
Constructs an input source which will read an ontology from a representation from the specified file.- Parameters:
is
- The stream that the ontology representation will be read from.
-
XZStreamDocumentSource
public XZStreamDocumentSource(InputStream stream, IRI documentIRI, @Nullable OWLDocumentFormat format, @Nullable String mime) Constructs an input source which will read an ontology from a representation from the specified stream.- Parameters:
stream
- The stream that the ontology representation will be read from.documentIRI
- The document IRIformat
- ontology formatmime
- mime type
-
-
Method Details
-
getInputStream
Description copied from interface:OWLOntologyDocumentSource
If an input stream can be obtained from this document source then this method creates it. This method may be called multiple times. Each invocation will return a new input stream. If there is no input stream available, returns Optional.absent. .- Returns:
- A new input stream which the ontology can be read from, wrapped in an Optional.
-
getReader
Description copied from interface:OWLOntologyDocumentSource
Gets a reader which an ontology document can be read from. This method may be called multiple times. Each invocation will return a newReader
. If there is no reader stream available, returns Optional.absent.- Returns:
- A new
Reader
which the ontology can be read from, wrapped in an Optional.
-