Interface OWLOntologyDocumentTarget

All Known Implementing Classes:
FileDocumentTarget, GZipFileDocumentTarget, GZipStreamDocumentTarget, StreamDocumentTarget, StringDocumentTarget, SystemOutDocumentTarget, WriterDocumentTarget, XZFileDocumentTarget, XZStreamDocumentTarget, ZipDocumentTarget

public interface OWLOntologyDocumentTarget
Specifies an interface that provides a pointer to an ontology document where an ontology can be stored.
Any client that writes an ontology to a "stream" will first try to obtain a writer, followed by an OutputStream , followed by trying to open a stream from a document IRI.
A client that writes an ontology to a database or some similar storage will simply try to use the IRI returned by getDocumentIRI().
Since:
2.2.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
  • Method Details

    • getWriter

      default Optional<Writer> getWriter()
      Gets a Writer that can be used to write an ontology to an ontology document. If none is available, return Optional.absent. Do not call multiple times for the same file: the output file will be opened for write multiple times.
      Returns:
      The writer
    • getOutputStream

      default Optional<OutputStream> getOutputStream()
      Gets an OutputStream that can be used to write an ontology to an ontology document. If none is available, return Optional.absent. Do not call multiple times for the same file: the output file will be opened for write multiple times.
      Returns:
      The output stream
    • getDocumentIRI

      default Optional<IRI> getDocumentIRI()
      Gets an IRI that points to an ontology document. If none is available, return Optional.absent.
      Returns:
      The IRI