Show / Hide Table of Contents

Class QuadDatasetTripleCollection

A Triple Collection which is a thin wrapper around a BaseQuadDataset to reduce much of the complexity for ISparqlDataset implementors around returning of Graphs.

Inheritance
System.Object
BaseTripleCollection
QuadDatasetTripleCollection
Implements
System.Collections.Generic.IEnumerable<T><Triple>
System.Collections.IEnumerable
System.IDisposable
Inherited Members
BaseTripleCollection.TripleAdded
BaseTripleCollection.TripleRemoved
BaseTripleCollection.RaiseTripleAdded(Triple)
BaseTripleCollection.RaiseTripleRemoved(Triple)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRdf.dll
Syntax
public class QuadDatasetTripleCollection : BaseTripleCollection, IEnumerable<Triple>, IEnumerable, IDisposable

Constructors

| Improve this Doc View Source

QuadDatasetTripleCollection(BaseQuadDataset, Uri)

Create a new triple collection that exposes a single named graph in a quad dataset.

Declaration
[Obsolete("Replaced by QuadDatasetTripleCollection(BaseQuadDataset, IRefNode)")]
public QuadDatasetTripleCollection(BaseQuadDataset dataset, Uri graphName)
Parameters
Type Name Description
BaseQuadDataset dataset

The dataset to wrap.

System.Uri graphName

The URI of the graph to expose through this interface.

| Improve this Doc View Source

QuadDatasetTripleCollection(BaseQuadDataset, IRefNode)

Create a new triple collection that exposes a single named graph in a quad dataset.

Declaration
public QuadDatasetTripleCollection(BaseQuadDataset dataset, IRefNode graphName)
Parameters
Type Name Description
BaseQuadDataset dataset

The dataset to wrap.

IRefNode graphName

The URI of the graph to expose through this interface.

Properties

| Improve this Doc View Source

Asserted

Gets the triples that are asserted in the collection.

Declaration
public override IEnumerable<Triple> Asserted { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.Asserted
Remarks

This returns the same set of triples as the enumerator on this class, but as an System.Collections.Generic.IEnumerable<T> instance.

| Improve this Doc View Source

Count

Gets the number of asserted triples in the triple collection.

Declaration
public override int Count { get; }
Property Value
Type Description
int
Overrides
BaseTripleCollection.Count
| Improve this Doc View Source

this[Triple]

Gets the given triple.

Declaration
public override Triple this[Triple t] { get; }
Parameters
Type Name Description
Triple t

Triple to retrieve.

Property Value
Type Description
Triple
Overrides
BaseTripleCollection.this[Triple]
Exceptions
Type Condition
System.Collections.Generic.KeyNotFoundException

Thrown if the given Triple doesn't exist.

| Improve this Doc View Source

ObjectNodes

Gets all the nodes which are objects of asserted triples in the triple collection.

Declaration
public override IEnumerable<INode> ObjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.ObjectNodes
| Improve this Doc View Source

PredicateNodes

Gets all the nodes which are predicates of asserted triples in the triple collection.

Declaration
public override IEnumerable<INode> PredicateNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.PredicateNodes
| Improve this Doc View Source

Quoted

Gets the triples that are quoted in the collection.

Declaration
public override IEnumerable<Triple> Quoted { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.Quoted
| Improve this Doc View Source

QuotedCount

Gets the number of quoted triples in the triple collection.

Declaration
public override int QuotedCount { get; }
Property Value
Type Description
int
Overrides
BaseTripleCollection.QuotedCount
| Improve this Doc View Source

QuotedObjectNodes

Gets all the nodes which are subjects of quoted triples in the triple collection.

Declaration
public override IEnumerable<INode> QuotedObjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.QuotedObjectNodes
| Improve this Doc View Source

QuotedPredicateNodes

Gets all the nodes which are predicates of quoted triples in the triple collection.

Declaration
public override IEnumerable<INode> QuotedPredicateNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.QuotedPredicateNodes
| Improve this Doc View Source

QuotedSubjectNodes

Gets all the nodes which are objects of quoted triples in the triple collection.

Declaration
public override IEnumerable<INode> QuotedSubjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.QuotedSubjectNodes
| Improve this Doc View Source

SubjectNodes

Gets all the nodes which are subjects of asserted triples in the triple collection.

Declaration
public override IEnumerable<INode> SubjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><INode>
Overrides
BaseTripleCollection.SubjectNodes

Methods

| Improve this Doc View Source

Add(Triple)

Adds a Triple to the Collection.

Declaration
protected override bool Add(Triple t)
Parameters
Type Name Description
Triple t

Triple to add.

Returns
Type Description
System.Boolean
Overrides
BaseTripleCollection.Add(Triple)
Remarks

Adding a Triple that already exists should be permitted though it is not necessary to persist the duplicate to underlying storage.

| Improve this Doc View Source

Contains(Triple)

Determines whether a given Triple is asserted in the Triple Collection.

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

The Triple to test.

Returns
Type Description
System.Boolean

True if the triple exists as an asserted triple in the collection.

Overrides
BaseTripleCollection.Contains(Triple)
| Improve this Doc View Source

ContainsQuoted(Triple)

Determines whether a given triple is quoted by a triple node of a triple in the collection.

Declaration
public override bool ContainsQuoted(Triple t)
Parameters
Type Name Description
Triple t

The triple to test.

Returns
Type Description
System.Boolean

True if the triple is quoted in the triple collection, false otherwise.

Overrides
BaseTripleCollection.ContainsQuoted(Triple)
| Improve this Doc View Source

Delete(Triple)

Deletes an asserted triple from the collection.

Declaration
protected override bool Delete(Triple t)
Parameters
Type Name Description
Triple t

Triple to remove.

Returns
Type Description
System.Boolean

True if the operation removed an asserted triple from the collection, false otherwise.

Overrides
BaseTripleCollection.Delete(Triple)
Remarks

Deleting a triple that is not asserted in the collection should have no effect and give no error. Quoted triples cannot be removed from the collection via this method - instead they should be automatically removed when all asserted triples that reference them are removed. Deleting a triple that is both asserted and quoted will remove the assertion of the triple (and return true), but the triple will remain in the collection as a quoted triples.

| Improve this Doc View Source

Dispose()

Disposes of a Triple Collection.

Declaration
public override void Dispose()
Overrides
BaseTripleCollection.Dispose()
| Improve this Doc View Source

GetEnumerator()

Gets the typed Enumerator for the Triple Collection.

Declaration
public override IEnumerator<Triple> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<T><Triple>

An enumerator over the asserted triples in the triple collection.

Overrides
BaseTripleCollection.GetEnumerator()
| Improve this Doc View Source

QuotedWithObject(INode)

Gets all the quoted triples with the given Object.

Declaration
public override IEnumerable<Triple> QuotedWithObject(INode obj)
Parameters
Type Name Description
INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithObject(INode)
| Improve this Doc View Source

QuotedWithPredicate(INode)

Gets all the quoted triples with the given Predicate.

Declaration
public override IEnumerable<Triple> QuotedWithPredicate(INode pred)
Parameters
Type Name Description
INode pred

Predicate to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithPredicate(INode)
| Improve this Doc View Source

QuotedWithPredicateObject(INode, INode)

Gets all the quoted triples with the given Predicate Object pair.

Declaration
public override IEnumerable<Triple> QuotedWithPredicateObject(INode pred, INode obj)
Parameters
Type Name Description
INode pred

Predicate to lookup.

INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithPredicateObject(INode, INode)
| Improve this Doc View Source

QuotedWithSubject(INode)

Gets all quoted triples with the given subject.

Declaration
public override IEnumerable<Triple> QuotedWithSubject(INode subj)
Parameters
Type Name Description
INode subj

Subject to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithSubject(INode)
| Improve this Doc View Source

QuotedWithSubjectObject(INode, INode)

Gets all the quoted triples with the given Subject Object pair.

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

Subject to lookup.

INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithSubjectObject(INode, INode)
| Improve this Doc View Source

QuotedWithSubjectPredicate(INode, INode)

Gets all the quoted triples with the given Subject Predicate pair.

Declaration
public override IEnumerable<Triple> QuotedWithSubjectPredicate(INode subj, INode pred)
Parameters
Type Name Description
INode subj

Subject to lookup.

INode pred

Predicate to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.QuotedWithSubjectPredicate(INode, INode)
| Improve this Doc View Source

WithObject(INode)

Gets all the asserted triples with the given object.

Declaration
public override IEnumerable<Triple> WithObject(INode obj)
Parameters
Type Name Description
INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithObject(INode)
| Improve this Doc View Source

WithPredicate(INode)

Gets all the asserted triples with the given predicate.

Declaration
public override IEnumerable<Triple> WithPredicate(INode pred)
Parameters
Type Name Description
INode pred

Predicate to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithPredicate(INode)
| Improve this Doc View Source

WithPredicateObject(INode, INode)

Gets all the Triples with the given Predicate Object pair.

Declaration
public override IEnumerable<Triple> WithPredicateObject(INode pred, INode obj)
Parameters
Type Name Description
INode pred

Predicate to lookup.

INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithPredicateObject(INode, INode)
| Improve this Doc View Source

WithSubject(INode)

Gets all the asserted triples with the given subject.

Declaration
public override IEnumerable<Triple> WithSubject(INode subj)
Parameters
Type Name Description
INode subj

Subject to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithSubject(INode)
| Improve this Doc View Source

WithSubjectObject(INode, INode)

Gets all the Triples with the given Subject Object pair.

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

Subject to lookup.

INode obj

Object to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithSubjectObject(INode, INode)
| Improve this Doc View Source

WithSubjectPredicate(INode, INode)

Gets all the asserted triples with the given subject/predicate pair.

Declaration
public override IEnumerable<Triple> WithSubjectPredicate(INode subj, INode pred)
Parameters
Type Name Description
INode subj

Subject to lookup.

INode pred

Predicate to lookup.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><Triple>
Overrides
BaseTripleCollection.WithSubjectPredicate(INode, INode)

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IDisposable

Extension Methods

Extensions.ChunkBy<T>(IEnumerable<T>, int)
Extensions.IsDisjoint<T>(IEnumerable<T>, IEnumerable<T>)
Extensions.WithObject(IEnumerable<Triple>, INode)
Extensions.WithPredicate(IEnumerable<Triple>, INode)
Extensions.WithSubject(IEnumerable<Triple>, INode)
LiteralExtensions.ToTripleCollection(IEnumerable<Triple>, bool)
Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • QuadDatasetTripleCollection(BaseQuadDataset, Uri)
    • QuadDatasetTripleCollection(BaseQuadDataset, IRefNode)
  • Properties
    • Asserted
    • Count
    • this[Triple]
    • ObjectNodes
    • PredicateNodes
    • Quoted
    • QuotedCount
    • QuotedObjectNodes
    • QuotedPredicateNodes
    • QuotedSubjectNodes
    • SubjectNodes
  • Methods
    • Add(Triple)
    • Contains(Triple)
    • ContainsQuoted(Triple)
    • Delete(Triple)
    • Dispose()
    • GetEnumerator()
    • QuotedWithObject(INode)
    • QuotedWithPredicate(INode)
    • QuotedWithPredicateObject(INode, INode)
    • QuotedWithSubject(INode)
    • QuotedWithSubjectObject(INode, INode)
    • QuotedWithSubjectPredicate(INode, INode)
    • WithObject(INode)
    • WithPredicate(INode)
    • WithPredicateObject(INode, INode)
    • WithSubject(INode)
    • WithSubjectObject(INode, INode)
    • WithSubjectPredicate(INode, INode)
  • Implements
  • Extension Methods
Back to top Generated by DocFX