Show / Hide Table of Contents

Class TripleStore

Class for representing Triple Stores which are collections of RDF Graphs.

Inheritance
object
BaseTripleStore
TripleStore
DiskDemandTripleStore
InferencingTripleStore
ThreadSafeTripleStore
WebDemandTripleStore
Implements
IInMemoryQueryableStore
ISparqlUpdateTripleStore
IUpdateableTripleStore
ITripleStore
IDisposable
Inherited Members
BaseTripleStore._graphs
BaseTripleStore.IsEmpty
BaseTripleStore.Graphs
BaseTripleStore.Triples
BaseTripleStore.Quads
BaseTripleStore.Assert(Quad)
BaseTripleStore.Retract(Quad)
BaseTripleStore.Add(IRefNode)
BaseTripleStore.Add(IGraph)
BaseTripleStore.Add(IGraph, bool)
BaseTripleStore.AddFromUri(Uri)
BaseTripleStore.AddFromUri(Uri, bool)
BaseTripleStore.AddFromUri(Uri, bool, Loader)
BaseTripleStore.Remove(Uri)
BaseTripleStore.Remove(IRefNode)
BaseTripleStore.HasGraph(Uri)
BaseTripleStore.HasGraph(IRefNode)
BaseTripleStore.this[Uri]
BaseTripleStore.this[IRefNode]
BaseTripleStore.GetQuads(INode, INode, INode, IRefNode, bool)
BaseTripleStore.GetTriplesFromGraph(IGraph, INode, INode, INode)
BaseTripleStore.GraphAdded
BaseTripleStore.GraphRemoved
BaseTripleStore.GraphChanged
BaseTripleStore.GraphCleared
BaseTripleStore.GraphMerged
BaseTripleStore.RaiseGraphAdded(IGraph)
BaseTripleStore.RaiseGraphAdded(GraphEventArgs)
BaseTripleStore.OnGraphAdded(object, GraphEventArgs)
BaseTripleStore.RaiseGraphRemoved(IGraph)
BaseTripleStore.RaiseGraphRemoved(GraphEventArgs)
BaseTripleStore.OnGraphRemoved(object, GraphEventArgs)
BaseTripleStore.RaiseGraphChanged(GraphEventArgs)
BaseTripleStore.OnGraphChanged(object, GraphEventArgs)
BaseTripleStore.RaiseGraphChanged(IGraph)
BaseTripleStore.RaiseGraphCleared(GraphEventArgs)
BaseTripleStore.OnGraphCleared(object, GraphEventArgs)
BaseTripleStore.RaiseGraphMerged(GraphEventArgs)
BaseTripleStore.OnGraphMerged(object, GraphEventArgs)
BaseTripleStore.AttachEventHandlers(IGraph)
BaseTripleStore.DetachEventHandlers(IGraph)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public class TripleStore : BaseTripleStore, IInMemoryQueryableStore, ISparqlUpdateTripleStore, IUpdateableTripleStore, ITripleStore, IDisposable

Constructors

| Edit this page View Source

TripleStore()

Creates a new Triple Store using a new empty Graph collection.

Declaration
public TripleStore()
| Edit this page View Source

TripleStore(BaseGraphCollection)

Creates a new Triple Store using the given Graph collection which may be non-empty.

Declaration
public TripleStore(BaseGraphCollection graphCollection)
Parameters
Type Name Description
BaseGraphCollection graphCollection

Graph Collection.

| Edit this page View Source

TripleStore(BaseGraphCollection, IUriFactory)

Creates a mew triple store using the given graph collection which may be non-empty.

Declaration
public TripleStore(BaseGraphCollection graphCollection, IUriFactory uriFactory)
Parameters
Type Name Description
BaseGraphCollection graphCollection

The graph collection.

IUriFactory uriFactory

The preferred URI factory to use when creating URIs in this triple store.

Fields

| Edit this page View Source

_inferenceGraphUri

Graph Uri for the special Graph used to store inferred information.

Declaration
protected readonly UriNode _inferenceGraphUri
Field Value
Type Description
UriNode
| Edit this page View Source

_storeInferencesExternally

Controls whether inferred information is stored in a special Graph or in the original Graph.

Declaration
protected bool _storeInferencesExternally
Field Value
Type Description
bool

Properties

| Edit this page View Source

UriFactory

Get the preferred URI factory to use when creating URIs in this store.

Declaration
public override IUriFactory UriFactory { get; }
Property Value
Type Description
IUriFactory
Overrides
BaseTripleStore.UriFactory

Methods

| Edit this page View Source

Contains(Triple)

Returns whether the Store contains the given Triple within the Query Triples.

Declaration
public bool Contains(Triple t)
Parameters
Type Name Description
Triple t

Triple to search for.

Returns
Type Description
bool
| Edit this page View Source

Dispose()

Disposes of a Triple Store.

Declaration
public override void Dispose()
Overrides
BaseTripleStore.Dispose()
| Edit this page View Source

ExecuteUpdate(string)

Executes an Update against the Triple Store.

Declaration
public void ExecuteUpdate(string update)
Parameters
Type Name Description
string update

SPARQL Update Command(s).

Remarks

As per the SPARQL 1.1 Update specification the command string may be a sequence of commands.

| Edit this page View Source

ExecuteUpdate(SparqlUpdateCommand)

Executes a single Update Command against the Triple Store.

Declaration
public void ExecuteUpdate(SparqlUpdateCommand update)
Parameters
Type Name Description
SparqlUpdateCommand update

SPARQL Update Command.

| Edit this page View Source

ExecuteUpdate(SparqlUpdateCommandSet)

Executes a set of Update Commands against the Triple Store.

Declaration
public void ExecuteUpdate(SparqlUpdateCommandSet updates)
Parameters
Type Name Description
SparqlUpdateCommandSet updates

SPARQL Update Command Set.

| Edit this page View Source

GetTriples(List<Uri>, Uri)

Selects all Triples which have a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriples(List<IRefNode>, Uri)")]
public IEnumerable<Triple> GetTriples(List<Uri> graphUris, Uri uri)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

Uri uri

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriples(List<Uri>, INode)

Selects all Triples which contain the given Node from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriples(List<IRefNode>, INode)")]
public IEnumerable<Triple> GetTriples(List<Uri> graphUris, INode n)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriples(List<IRefNode>, Uri)

Selects all Triples which have a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriples(List<IRefNode> graphNames, Uri uri)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

Uri uri

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriples(List<IRefNode>, INode)

Selects all Triples which contain the given Node from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriples(List<IRefNode> graphNames, INode n)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriples(Uri)

Selects all Triples which have a Uri Node with the given Uri from all the Query Triples.

Declaration
public IEnumerable<Triple> GetTriples(Uri uri)
Parameters
Type Name Description
Uri uri

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriples(INode)

Selects all Triples which contain the given Node from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriples(INode n)
Parameters
Type Name Description
INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(List<Uri>, Uri)

Selects all Triples where the Object is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithObject(List<IRefNode>, Uri)")]
public IEnumerable<Triple> GetTriplesWithObject(List<Uri> graphUris, Uri u)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(List<Uri>, INode)

Selects all Triples where the Object is a given Node from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithObject(List<IRefNode>, INode)")]
public IEnumerable<Triple> GetTriplesWithObject(List<Uri> graphUris, INode n)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(List<IRefNode>, Uri)

Selects all Triples where the Object is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithObject(List<IRefNode> graphNames, Uri u)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(List<IRefNode>, INode)

Selects all Triples where the Object is a given Node from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithObject(List<IRefNode> graphNames, INode n)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(Uri)

Selects all Triples where the Object is a Uri Node with the given Uri from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithObject(Uri u)
Parameters
Type Name Description
Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithObject(INode)

Selects all Triples where the Object is a given Node from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithObject(INode n)
Parameters
Type Name Description
INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(List<Uri>, Uri)

Selects all Triples where the Predicate is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithPredicate(List<IRefNode>, Uri)")]
public IEnumerable<Triple> GetTriplesWithPredicate(List<Uri> graphUris, Uri u)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(List<Uri>, INode)

Selects all Triples where the Predicate is a given Node from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithPredicate(List<IRefNode>, INode)")]
public IEnumerable<Triple> GetTriplesWithPredicate(List<Uri> graphUris, INode n)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(List<IRefNode>, Uri)

Selects all Triples where the Predicate is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(List<IRefNode> graphNames, Uri u)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(List<IRefNode>, INode)

Selects all Triples where the Predicate is a given Node from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(List<IRefNode> graphNames, INode n)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(Uri)

Selects all Triples where the Predicate is a Uri Node with the given Uri from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(Uri u)
Parameters
Type Name Description
Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicate(INode)

Selects all Triples where the Predicate is a given Node from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(INode n)
Parameters
Type Name Description
INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithPredicateObject(INode, INode)

Selects all the Triples with the given Predicate-Object pair from all the Query Triples.

Declaration
public IEnumerable<Triple> GetTriplesWithPredicateObject(INode predicate, INode obj)
Parameters
Type Name Description
INode predicate

Predicate.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(List<Uri>, Uri)

Selects all Triples where the Subject is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithSubject(List<IRefNode>, Uri)")]
public IEnumerable<Triple> GetTriplesWithSubject(List<Uri> graphUris, Uri u)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(List<Uri>, INode)

Selects all Triples where the Subject is a given Node from a Subset of Graphs in the Triple Store.

Declaration
[Obsolete("Replaced by GetTriplesWithSubject(List<IRefNode>, INode)")]
public IEnumerable<Triple> GetTriplesWithSubject(List<Uri> graphUris, INode n)
Parameters
Type Name Description
List<Uri> graphUris

List of the Graph URIs of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(List<IRefNode>, Uri)

Selects all Triples where the Subject is a Uri Node with the given Uri from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithSubject(List<IRefNode> graphNames, Uri u)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(List<IRefNode>, INode)

Selects all Triples where the Subject is a given Node from a Subset of Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithSubject(List<IRefNode> graphNames, INode n)
Parameters
Type Name Description
List<IRefNode> graphNames

List of the names of Graphs you want to select over.

INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(Uri)

Selects all Triples where the Subject is a Uri Node with the given Uri from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithSubject(Uri u)
Parameters
Type Name Description
Uri u

Uri.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubject(INode)

Selects all Triples where the Subject is a given Node from all Graphs in the Triple Store.

Declaration
public IEnumerable<Triple> GetTriplesWithSubject(INode n)
Parameters
Type Name Description
INode n

Node.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubjectObject(INode, INode)

Selects all the Triples with the given Subject-Object pair from all the Query Triples.

Declaration
public IEnumerable<Triple> GetTriplesWithSubjectObject(INode subj, INode obj)
Parameters
Type Name Description
INode subj

Subject.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
| Edit this page View Source

GetTriplesWithSubjectPredicate(INode, INode)

Selects all the Triples with the given Subject-Predicate pair from all the Query Triples.

Declaration
public IEnumerable<Triple> GetTriplesWithSubjectPredicate(INode subj, INode predicate)
Parameters
Type Name Description
INode subj

Subject.

INode predicate

Predicate.

Returns
Type Description
IEnumerable<Triple>

Implements

IInMemoryQueryableStore
ISparqlUpdateTripleStore
IUpdateableTripleStore
ITripleStore
IDisposable

Extension Methods

Extensions.ToSafeString(object)
TripleStoreExtensions.LoadFromEmbeddedResource(ITripleStore, string)
TripleStoreExtensions.LoadFromEmbeddedResource(ITripleStore, string, IStoreReader)
TripleStoreExtensions.LoadFromFile(ITripleStore, string)
TripleStoreExtensions.LoadFromFile(ITripleStore, string, IStoreReader)
TripleStoreExtensions.LoadFromString(ITripleStore, string)
TripleStoreExtensions.LoadFromString(ITripleStore, string, IStoreReader)
TripleStoreExtensions.LoadFromUri(ITripleStore, Uri)
TripleStoreExtensions.LoadFromUri(ITripleStore, Uri, IStoreReader)
TripleStoreExtensions.LoadFromUri(ITripleStore, Uri, IStoreReader, Loader)
TripleStoreExtensions.SaveToFile(ITripleStore, string)
TripleStoreExtensions.SaveToFile(ITripleStore, string, IStoreWriter)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • TripleStore()
    • TripleStore(BaseGraphCollection)
    • TripleStore(BaseGraphCollection, IUriFactory)
  • Fields
    • _inferenceGraphUri
    • _storeInferencesExternally
  • Properties
    • UriFactory
  • Methods
    • Contains(Triple)
    • Dispose()
    • ExecuteUpdate(string)
    • ExecuteUpdate(SparqlUpdateCommand)
    • ExecuteUpdate(SparqlUpdateCommandSet)
    • GetTriples(List<Uri>, Uri)
    • GetTriples(List<Uri>, INode)
    • GetTriples(List<IRefNode>, Uri)
    • GetTriples(List<IRefNode>, INode)
    • GetTriples(Uri)
    • GetTriples(INode)
    • GetTriplesWithObject(List<Uri>, Uri)
    • GetTriplesWithObject(List<Uri>, INode)
    • GetTriplesWithObject(List<IRefNode>, Uri)
    • GetTriplesWithObject(List<IRefNode>, INode)
    • GetTriplesWithObject(Uri)
    • GetTriplesWithObject(INode)
    • GetTriplesWithPredicate(List<Uri>, Uri)
    • GetTriplesWithPredicate(List<Uri>, INode)
    • GetTriplesWithPredicate(List<IRefNode>, Uri)
    • GetTriplesWithPredicate(List<IRefNode>, INode)
    • GetTriplesWithPredicate(Uri)
    • GetTriplesWithPredicate(INode)
    • GetTriplesWithPredicateObject(INode, INode)
    • GetTriplesWithSubject(List<Uri>, Uri)
    • GetTriplesWithSubject(List<Uri>, INode)
    • GetTriplesWithSubject(List<IRefNode>, Uri)
    • GetTriplesWithSubject(List<IRefNode>, INode)
    • GetTriplesWithSubject(Uri)
    • GetTriplesWithSubject(INode)
    • GetTriplesWithSubjectObject(INode, INode)
    • GetTriplesWithSubjectPredicate(INode, INode)
  • Implements
  • Extension Methods
Back to top Generated by DocFX