public interface OWLOntologyDocumentTarget
Any client that writes an ontology to a "stream" will first try to obtain a writer (if isWriterAvailable()
returns true),
followed by an OutputStream (if isOutputStreamAvailable()
returns true), followed by trying
to open a stream from a document IRI (if isDocumentIRIAvailable returns true).
A client that writes an ontology to a database or some similar storage will simply try to use the IRI
returned by getDocumentIRI()
.
Modifier and Type | Method and Description |
---|---|
IRI |
getDocumentIRI()
Gets an IRI that points to an ontology document.
|
java.io.OutputStream |
getOutputStream()
Gets an
OutputStream that can be used to write an ontology to an ontology document. |
java.io.Writer |
getWriter()
Gets a
Writer that can be used to write an ontology to an ontology document. |
boolean |
isDocumentIRIAvailable()
Determines if an IRI that points to an ontology document is available.
|
boolean |
isOutputStreamAvailable()
Determines if this document target can be pointed to by an
OutputStream . |
boolean |
isWriterAvailable()
Determines if this document target can be pointed to by a
Writer . |
boolean isWriterAvailable()
Writer
.true
if a Writer
can be obtained from this document target.java.io.Writer getWriter() throws java.io.IOException
Writer
that can be used to write an ontology to an ontology document.java.io.IOException
- if there was a problem obtaining the writerOWLRuntimeException
- if a writer is not available (isWriterAvailable()
returns false
) and this method is called.boolean isOutputStreamAvailable()
OutputStream
.true
if an OutputStream
can be obtained from this document target.java.io.OutputStream getOutputStream() throws java.io.IOException
OutputStream
that can be used to write an ontology to an ontology document.java.io.IOException
- if there was a problem obtaining the output streamOWLRuntimeException
- if an output stream is not available (isOutputStreamAvailable()
returns false
) and this method is called.boolean isDocumentIRIAvailable()
true
if an IRI is available, otherwise false
.IRI getDocumentIRI()
OWLRuntimeException
- if an IRI is not available (isDocumentIRIAvailable()
returns false
) and this method is called.