Class StringDocumentSource

java.lang.Object
org.semanticweb.owlapi.io.OWLOntologyDocumentSourceBase
org.semanticweb.owlapi.io.StringDocumentSource
All Implemented Interfaces:
OWLOntologyDocumentSource

public class StringDocumentSource extends OWLOntologyDocumentSourceBase
An ontology input source that wraps a string.
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
  • Constructor Details

    • StringDocumentSource

      public StringDocumentSource(String string)
      Parameters:
      string - the source string
    • StringDocumentSource

      public StringDocumentSource(String string, IRI iri)
      Parameters:
      string - the source string
      iri - The document IRI
    • StringDocumentSource

      public StringDocumentSource(StringDocumentTarget target)
      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 string
      documentIRI - The document IRI
      f - ontology format
      mime - 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 string
      prefix - The document IRI prefix
      f - ontology format
      mime - mime type
  • Method Details

    • getReader

      public Optional<Reader> 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 new Reader. 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.