public class FileDocumentSource extends OWLOntologyDocumentSourceBase
| Constructor and Description |
|---|
FileDocumentSource(File file)
Constructs an ontology input source using the specified file.
|
FileDocumentSource(File file,
OWLDocumentFormat format)
Constructs an ontology input source using the specified file.
|
FileDocumentSource(File file,
OWLDocumentFormat format,
String mime)
Constructs an ontology input source using the specified file.
|
| 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.
|
getFormat, getMIMEType, getNextDocumentIRI, isFormatKnown, isMIMETypeKnown, wrappublic FileDocumentSource(@Nonnull File file)
file - The file from which a concrete representation of an ontology will
be obtained.public FileDocumentSource(@Nonnull File file, OWLDocumentFormat format)
file - The file from which a concrete representation of an ontology will
be obtained.format - ontology format. Can be null.public FileDocumentSource(@Nonnull File file, OWLDocumentFormat format, String mime)
file - The file from which a concrete representation of an ontology will
be obtained.format - ontology format. Can be null.mime - mime typepublic IRI getDocumentIRI()
OWLOntologyDocumentSourcepublic boolean isInputStreamAvailable()
OWLOntologyDocumentSourcetrue if an input stream can be obtained, false if
an input stream cannot be obtained from this document source.@Nonnull public InputStream getInputStream()
OWLOntologyDocumentSourceisInputStreamAvailable method returns false
.public boolean isReaderAvailable()
OWLOntologyDocumentSourcetrue if a reader can be obtained from this document
source, or false if a reader cannot be obtained from this
document source.public Reader getReader()
OWLOntologyDocumentSourceReader. 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.Copyright © 2016 The University of Manchester. All Rights Reserved.