Package org.semanticweb.owlapi.rio
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 Summary
ConstructorsConstructorDescriptionRioMemoryTripleSource(Iterable<org.eclipse.rdf4j.model.Statement> statements) Creates a RioMemoryTripleSource using anIterableofStatementobjects.RioMemoryTripleSource(Iterator<org.eclipse.rdf4j.model.Statement> statements) Creates a RioMemoryTripleSource using anIterableofStatementobjects.RioMemoryTripleSource(Iterator<org.eclipse.rdf4j.model.Statement> statements, Map<String, String> namespaces) Creates a RioMemoryTripleSource using anIterableofStatementobjects.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.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. -
Method Summary
Modifier and TypeMethodDescriptionorg.semanticweb.owlapi.model.IRIIterator<org.eclipse.rdf4j.model.Statement>booleanbooleanvoidsetIRIResolutionFailed(boolean value) voidsetNamespaces(Map<String, String> nextNamespaces) voidsetNamespaces(Set<org.eclipse.rdf4j.model.Namespace> nextNamespaces) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.semanticweb.owlapi.io.OWLOntologyDocumentSource
getAcceptHeaders, getFormat, getInputStream, getMIMEType, getReader, setAcceptHeaders
-
Constructor Details
-
RioMemoryTripleSource
Creates a RioMemoryTripleSource using anIterableofStatementobjects.- Parameters:
statements- AnIteratorofStatementobjects that make up this source.
-
RioMemoryTripleSource
public RioMemoryTripleSource(Iterator<org.eclipse.rdf4j.model.Statement> statements, Map<String, String> namespaces) Creates a RioMemoryTripleSource using anIterableofStatementobjects.- Parameters:
statements- AnIteratorofStatementobjects that make up this source.namespaces- A Map of namespaces from prefix to full URI which are to be used by this source.
-
RioMemoryTripleSource
Creates a RioMemoryTripleSource using anIterableofStatementobjects.
If the Iterable is an instance ofModel, the namespaces from the model are also used.- Parameters:
statements- ACloseableIterationofStatementobjects 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- ACloseableIterationofStatementobjects 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- ACloseableIterationofStatementobjects 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:
getDocumentIRIin interfaceorg.semanticweb.owlapi.io.OWLOntologyDocumentSource
-
hasAlredyFailedOnStreams
public boolean hasAlredyFailedOnStreams()- Specified by:
hasAlredyFailedOnStreamsin interfaceorg.semanticweb.owlapi.io.OWLOntologyDocumentSource
-
getNamespaces
- Returns:
- namespace map
-
setNamespaces
- Parameters:
nextNamespaces- map of namespaces to set
-
getStatementIterator
- Returns:
- statements
-
setNamespaces
- Parameters:
nextNamespaces- set of namespaces to set
-
hasAlredyFailedOnIRIResolution
public boolean hasAlredyFailedOnIRIResolution()- Specified by:
hasAlredyFailedOnIRIResolutionin interfaceorg.semanticweb.owlapi.io.OWLOntologyDocumentSource
-
setIRIResolutionFailed
public void setIRIResolutionFailed(boolean value) - Specified by:
setIRIResolutionFailedin interfaceorg.semanticweb.owlapi.io.OWLOntologyDocumentSource
-