public class FileDocumentTarget extends Object implements OWLOntologyDocumentTarget
OWLOntologyDocumentTarget
that supports writing out to a
File
.Constructor and Description |
---|
FileDocumentTarget(File file)
Constructs the document target, with the target being the specified file.
|
Modifier and Type | Method and Description |
---|---|
IRI |
getDocumentIRI()
Gets an IRI that points to an ontology document.
|
OutputStream |
getOutputStream()
Gets an
OutputStream that can be used to write an
ontology to an ontology document. |
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 . |
public boolean isWriterAvailable()
OWLOntologyDocumentTarget
Writer
.isWriterAvailable
in interface OWLOntologyDocumentTarget
true
if a Writer
can be obtained from
this document target.@Nonnull public Writer getWriter() throws IOException
OWLOntologyDocumentTarget
Writer
that can be used to write an ontology to an
ontology document.getWriter
in interface OWLOntologyDocumentTarget
IOException
- if there was a problem obtaining the writerpublic boolean isOutputStreamAvailable()
OWLOntologyDocumentTarget
OutputStream
.isOutputStreamAvailable
in interface OWLOntologyDocumentTarget
true
if an OutputStream
can be obtained
from this document target.public OutputStream getOutputStream() throws IOException
OWLOntologyDocumentTarget
OutputStream
that can be used to write an
ontology to an ontology document.getOutputStream
in interface OWLOntologyDocumentTarget
IOException
- if there was a problem obtaining the output streampublic boolean isDocumentIRIAvailable()
OWLOntologyDocumentTarget
isDocumentIRIAvailable
in interface OWLOntologyDocumentTarget
true
if an IRI is available, otherwise false
.public IRI getDocumentIRI()
OWLOntologyDocumentTarget
getDocumentIRI
in interface OWLOntologyDocumentTarget
Copyright © 2020 The University of Manchester. All rights reserved.