Package org.semanticweb.owlapi.io
Class FileDocumentSource
java.lang.Object
org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
org.semanticweb.owlapi.io.FileDocumentSource
- All Implemented Interfaces:
OWLOntologyDocumentSource
A convenience class which will prepare an input source from a file.
- Since:
- 2.2.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Constructor Summary
ConstructorsConstructorDescriptionFileDocumentSource
(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. -
Method Summary
Modifier and TypeMethodDescriptionIf an input stream can be obtained from this document source then this method creates it.Methods inherited from class org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
getAcceptHeaders, getDocumentIRI, getFormat, getMIMEType, hasAlredyFailedOnIRIResolution, hasAlredyFailedOnStreams, setAcceptHeaders, setIRIResolutionFailed
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource
getReader
-
Constructor Details
-
FileDocumentSource
Constructs an ontology input source using the specified file.- Parameters:
file
- The file from which a concrete representation of an ontology will be obtained.
-
FileDocumentSource
Constructs an ontology input source using the specified file.- Parameters:
file
- The file from which a concrete representation of an ontology will be obtained.format
- ontology format. Can be null.
-
FileDocumentSource
Constructs an ontology input source using the specified file.- Parameters:
file
- The file from which a concrete representation of an ontology will be obtained.format
- ontology format. Can be null.mime
- 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.
-