Show / Hide Table of Contents

Class BaseTripleCollection

Abstract Base Class for Triple Collections.
Inheritance
System.Object
BaseTripleCollection
SubTreeIndexedTripleCollection
TreeIndexedTripleCollection
TripleCollection
UnionTripleCollection
WrapperTripleCollection
Implements
System.Collections.Generic.IEnumerable<Triple>
System.Collections.IEnumerable
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseTripleCollection : IEnumerable<Triple>, IEnumerable, IDisposable
Remarks
Designed to allow the underlying storage of a Triple Collection to be changed at a later date without affecting classes that use it.

Properties

| Improve this Doc View Source

Count

Gets the Number of Triples in the Triple Collection.
Declaration
public abstract int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Item[Triple]

Gets the given Triple.
Declaration
public abstract Triple this[Triple t] { get; }
Parameters
Type Name Description
Triple t Triple to retrieve.
Property Value
Type Description
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 Triples in the Triple Collection.
Declaration
public abstract IEnumerable<INode> ObjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>
| Improve this Doc View Source

PredicateNodes

Gets all the Nodes which are Predicates of Triples in the Triple Collection.
Declaration
public abstract IEnumerable<INode> PredicateNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>
| Improve this Doc View Source

SubjectNodes

Gets all the Nodes which are Subjects of Triples in the Triple Collection.
Declaration
public abstract IEnumerable<INode> SubjectNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>

Methods

| Improve this Doc View Source

Add(Triple)

Adds a Triple to the Collection.
Declaration
protected abstract bool Add(Triple t)
Parameters
Type Name Description
Triple t Triple to add.
Returns
Type Description
System.Boolean
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 in the Triple Collection.
Declaration
public abstract bool Contains(Triple t)
Parameters
Type Name Description
Triple t The Triple to test.
Returns
Type Description
System.Boolean True if the Triple already exists in the Triple Collection.
| Improve this Doc View Source

Delete(Triple)

Deletes a Triple from the Collection.
Declaration
protected abstract bool Delete(Triple t)
Parameters
Type Name Description
Triple t Triple to remove.
Returns
Type Description
System.Boolean
Remarks
Deleting something that doesn't exist should have no effect and give no error.
| Improve this Doc View Source

Dispose()

Diposes of a Triple Collection.
Declaration
public abstract void Dispose()
| Improve this Doc View Source

GetEnumerator()

Gets the typed Enumerator for the Triple Collection.
Declaration
public abstract IEnumerator<Triple> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<Triple>
| Improve this Doc View Source

RaiseTripleAdded(Triple)

Helper method for raising the TripleAdded event.
Declaration
protected void RaiseTripleAdded(Triple t)
Parameters
Type Name Description
Triple t Triple.
| Improve this Doc View Source

RaiseTripleRemoved(Triple)

Helper method for raising the TripleRemoved event.
Declaration
protected void RaiseTripleRemoved(Triple t)
Parameters
Type Name Description
Triple t Triple.
| Improve this Doc View Source

WithObject(INode)

Gets all the Triples with the given Object.
Declaration
public virtual IEnumerable<Triple> WithObject(INode obj)
Parameters
Type Name Description
INode obj Object to lookup.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

WithPredicate(INode)

Gets all the Triples with the given Predicate.
Declaration
public virtual IEnumerable<Triple> WithPredicate(INode pred)
Parameters
Type Name Description
INode pred Predicate to lookup.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

WithPredicateObject(INode, INode)

Gets all the Triples with the given Predicate Object pair.
Declaration
public virtual 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<Triple>
| Improve this Doc View Source

WithSubject(INode)

Gets all the Triples with the given Subject.
Declaration
public virtual IEnumerable<Triple> WithSubject(INode subj)
Parameters
Type Name Description
INode subj ubject to lookup.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

WithSubjectObject(INode, INode)

Gets all the Triples with the given Subject Object pair.
Declaration
public virtual 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<Triple>
| Improve this Doc View Source

WithSubjectPredicate(INode, INode)

Gets all the Triples with the given Subject Predicate pair.
Declaration
public virtual 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<Triple>

Events

| Improve this Doc View Source

TripleAdded

Event which occurs when a Triple is added to the Collection
Declaration
public event TripleEventHandler TripleAdded
Event Type
Type Description
TripleEventHandler
| Improve this Doc View Source

TripleRemoved

Event which occurs when a Triple is removed from the Collection
Declaration
public event TripleEventHandler TripleRemoved
Event Type
Type Description
TripleEventHandler

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Gets the non-generic Enumerator for the Triple Collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

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

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.IsDisjoint<T>(IEnumerable<T>, IEnumerable<T>)
Extensions.ChunkBy<T>(IEnumerable<T>, Int32)
Extensions.WithSubject(IEnumerable<Triple>, INode)
Extensions.WithPredicate(IEnumerable<Triple>, INode)
Extensions.WithObject(IEnumerable<Triple>, INode)
  • Improve this Doc
  • View Source
In This Article
  • Properties
    • Count
    • Item[Triple]
    • ObjectNodes
    • PredicateNodes
    • SubjectNodes
  • Methods
    • Add(Triple)
    • Contains(Triple)
    • Delete(Triple)
    • Dispose()
    • GetEnumerator()
    • RaiseTripleAdded(Triple)
    • RaiseTripleRemoved(Triple)
    • WithObject(INode)
    • WithPredicate(INode)
    • WithPredicateObject(INode, INode)
    • WithSubject(INode)
    • WithSubjectObject(INode, INode)
    • WithSubjectPredicate(INode, INode)
  • Events
    • TripleAdded
    • TripleRemoved
  • Explicit Interface Implementations
    • IEnumerable.GetEnumerator()
  • Implements
  • Extension Methods
Back to top Generated by DocFX