Class RioMemoryTripleSource

java.lang.Object
org.semanticweb.owlapi.rio.RioMemoryTripleSource
All Implemented Interfaces:
org.semanticweb.owlapi.io.OWLOntologyDocumentSource

public class RioMemoryTripleSource extends Object implements org.semanticweb.owlapi.io.OWLOntologyDocumentSource
An implementation of the OWLOntologyDocumentSource interface that does not implement any of the InputStream, Reader, or IRI source retrieval methods. Instead it holds a reference to an iterator that will generate bare triples to be interpreted by a Sesame Rio based OWLParser implementation.
Since:
4.0.0
Author:
Peter Ansell p_ansell@yahoo.com
  • Constructor Details

    • RioMemoryTripleSource

      public RioMemoryTripleSource(Iterator<org.eclipse.rdf4j.model.Statement> statements)
      Creates a RioMemoryTripleSource using an Iterable of Statement objects.
      Parameters:
      statements - An Iterator of Statement objects that make up this source.
    • RioMemoryTripleSource

      public RioMemoryTripleSource(Iterator<org.eclipse.rdf4j.model.Statement> statements, Map<String,String> namespaces)
      Creates a RioMemoryTripleSource using an Iterable of Statement objects.
      Parameters:
      statements - An Iterator of Statement objects that make up this source.
      namespaces - A Map of namespaces from prefix to full URI which are to be used by this source.
    • RioMemoryTripleSource

      public RioMemoryTripleSource(Iterable<org.eclipse.rdf4j.model.Statement> statements)
      Creates a RioMemoryTripleSource using an Iterable of Statement objects.
      If the Iterable is an instance of Model, the namespaces from the model are also used.
      Parameters:
      statements - A CloseableIteration of Statement objects that make up this source.
    • RioMemoryTripleSource

      public RioMemoryTripleSource(org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.model.Statement,? extends org.eclipse.rdf4j.common.exception.RDF4JException> statements)
      Creates a RioMemoryTripleSource using a closeable iteration. Internally this wraps the statements as an Iterator, and hence all statements must be read for the iterator to be closed automatically.
      Parameters:
      statements - A CloseableIteration of Statement objects that make up this source.
    • RioMemoryTripleSource

      public RioMemoryTripleSource(org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.model.Statement,? extends org.eclipse.rdf4j.common.exception.RDF4JException> statements, Map<String,String> namespaces)
      Creates a RioMemoryTripleSource using a closeable iteration. Internally this wraps the statements as an Iterator, and hence all statements must be read for the iterator to be closed automatically.
      Parameters:
      statements - A CloseableIteration of Statement objects that make up this source.
      namespaces - A Map of namespaces from prefix to full URI which are to be used by this source.
  • Method Details

    • getDocumentIRI

      public org.semanticweb.owlapi.model.IRI getDocumentIRI()
      Specified by:
      getDocumentIRI in interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource
    • hasAlredyFailedOnStreams

      public boolean hasAlredyFailedOnStreams()
      Specified by:
      hasAlredyFailedOnStreams in interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource
    • getNamespaces

      public Map<String,String> getNamespaces()
      Returns:
      namespace map
    • setNamespaces

      public void setNamespaces(Map<String,String> nextNamespaces)
      Parameters:
      nextNamespaces - map of namespaces to set
    • getStatementIterator

      public Iterator<org.eclipse.rdf4j.model.Statement> getStatementIterator()
      Returns:
      statements
    • setNamespaces

      public void setNamespaces(Set<org.eclipse.rdf4j.model.Namespace> nextNamespaces)
      Parameters:
      nextNamespaces - set of namespaces to set
    • hasAlredyFailedOnIRIResolution

      public boolean hasAlredyFailedOnIRIResolution()
      Specified by:
      hasAlredyFailedOnIRIResolution in interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource
    • setIRIResolutionFailed

      public void setIRIResolutionFailed(boolean value)
      Specified by:
      setIRIResolutionFailed in interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource