Package org.semanticweb.owlapi.io
Class StringDocumentSource
java.lang.Object
org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
org.semanticweb.owlapi.io.StringDocumentSource
- All Implemented Interfaces:
OWLOntologyDocumentSource
An ontology input source that wraps a string.
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Constructor Summary
ConstructorsConstructorDescriptionStringDocumentSource
(String string) StringDocumentSource
(String string, String prefix, OWLDocumentFormat f, String mime) Specifies a string as an ontology document.StringDocumentSource
(String string, IRI iri) StringDocumentSource
(String string, IRI documentIRI, OWLDocumentFormat f, String mime) Specifies a string as an ontology document. -
Method Summary
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
getInputStream
-
Constructor Details
-
StringDocumentSource
- Parameters:
string
- the source string
-
StringDocumentSource
- Parameters:
string
- the source stringiri
- The document IRI
-
StringDocumentSource
- Parameters:
target
- a document target
-
StringDocumentSource
public StringDocumentSource(String string, IRI documentIRI, @Nullable OWLDocumentFormat f, @Nullable String mime) Specifies a string as an ontology document.- Parameters:
string
- The stringdocumentIRI
- The document IRIf
- ontology formatmime
- mime type
-
StringDocumentSource
public StringDocumentSource(String string, String prefix, @Nullable OWLDocumentFormat f, @Nullable String mime) Specifies a string as an ontology document.- Parameters:
string
- The stringprefix
- The document IRI prefixf
- ontology formatmime
- mime type
-
-
Method Details
-
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.
-