public abstract class StreamDocumentSourceBase extends OWLOntologyDocumentSourceBase
Constructor and Description |
---|
StreamDocumentSourceBase(InputStream stream,
IRI documentIRI,
OWLDocumentFormat format,
String mime)
Constructs an input source which will read an ontology from a representation from the
specified stream.
|
StreamDocumentSourceBase(Reader stream,
IRI documentIRI,
OWLDocumentFormat format,
String mime)
Constructs an input source which will read an ontology from a representation from the
specified stream.
|
Modifier and Type | Method and Description |
---|---|
IRI |
getDocumentIRI()
Gets the IRI of the ontology document.
|
InputStream |
getInputStream()
If an input stream can be obtained from this document source then this method creates it.
|
Reader |
getReader()
Gets a reader which an ontology document can be read from.
|
boolean |
isInputStreamAvailable()
Determines if an input stream is available which an ontology document can be parsed from.
|
boolean |
isReaderAvailable()
Determines if a reader is available which an ontology document can be parsed from.
|
getAcceptHeaders, getFormat, getMIMEType, getNextDocumentIRI, isFormatKnown, isMIMETypeKnown, setAcceptHeaders, wrap
public StreamDocumentSourceBase(@Nonnull InputStream stream, @Nonnull IRI documentIRI, OWLDocumentFormat format, String mime)
stream
- The stream that the ontology representation will be read from.documentIRI
- The document IRIformat
- ontology formatmime
- mime typepublic StreamDocumentSourceBase(@Nonnull Reader stream, @Nonnull IRI documentIRI, OWLDocumentFormat format, String mime)
stream
- The stream that the ontology representation will be read from.documentIRI
- The document IRIformat
- ontology formatmime
- mime typepublic IRI getDocumentIRI()
OWLOntologyDocumentSource
public boolean isInputStreamAvailable()
OWLOntologyDocumentSource
true
if an input stream can be obtained, false
if an input stream
cannot be obtained from this document source.public InputStream getInputStream()
OWLOntologyDocumentSource
isInputStreamAvailable
method returns
false
.public Reader getReader()
OWLOntologyDocumentSource
Reader
. This method should not be called if
the isReaderAvailable
method returns false. A Runtime
execption will be
thrown if this happens.Reader
which the ontology can be read from.public boolean isReaderAvailable()
OWLOntologyDocumentSource
true
if a reader can be obtained from this document source, or false
if a reader cannot be obtained from this document source.Copyright © 2020 The University of Manchester. All rights reserved.