Class UnionTripleCollection
Represents a union of multiple Triple Collections.
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 class UnionTripleCollection : BaseTripleCollection, IEnumerable<Triple>, IEnumerable, IDisposable
Remarks
The union consists of a Base collection which is the collection that Triples can actually be added to and deleted from and any number of additional collections which are read-only as far as the union is concerned (this does not mean they cannot be altered elsewhere by other code).
Constructors
| Improve this Doc View SourceUnionTripleCollection(BaseTripleCollection, IEnumerable<BaseTripleCollection>)
Creates a new Union Triple Collection which is a union of any number of collections.
Declaration
public UnionTripleCollection(BaseTripleCollection baseTriples, IEnumerable<BaseTripleCollection> additionalTriples)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseTripleCollection | baseTriples | Base Triple Collection. |
| System.Collections.Generic.IEnumerable<BaseTripleCollection> | additionalTriples | Additional Triple Collection(s). |
UnionTripleCollection(BaseTripleCollection, BaseTripleCollection)
Creates a new Union Triple Collection which is a union of two collections.
Declaration
public UnionTripleCollection(BaseTripleCollection baseTriples, BaseTripleCollection additionalTriples)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseTripleCollection | baseTriples | Base Triple Collection. |
| BaseTripleCollection | additionalTriples | Additional Triple Collection. |
Properties
| Improve this Doc View SourceCount
Gets the count of Triples in this union.
Declaration
public override int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Overrides
Remarks
The Count is the total number of Triples, this may be different from the number of distinct triples.
|
Improve this Doc
View Source
Item[Triple]
Retrieves a Triple from the union.
Declaration
public override Triple this[Triple t] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to retrieve. |
Property Value
| Type | Description |
|---|---|
| Triple |
Overrides
Exceptions
| Type | Condition |
|---|---|
| System.Collections.Generic.KeyNotFoundException | Thrown if the Triple is not contained in any of the collections this union comprises. |
ObjectNodes
Gets the enumeration of distinct objects of Triples.
Declaration
public override IEnumerable<INode> ObjectNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<INode> |
Overrides
| Improve this Doc View SourcePredicateNodes
Gets the enumeration of distinct predicates of Triples.
Declaration
public override IEnumerable<INode> PredicateNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<INode> |
Overrides
| Improve this Doc View SourceSubjectNodes
Gets the enumeration of distinct subjects of Triples.
Declaration
public override IEnumerable<INode> SubjectNodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<INode> |
Overrides
Methods
| Improve this Doc View SourceAdd(Triple)
Adds a Triple to the base collection.
Declaration
protected override bool Add(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to add. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceContains(Triple)
Checks whether the union contains this Triple in any of the collections it comprises.
Declaration
public override bool Contains(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to test. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceDelete(Triple)
Deletes a Triple from the base collection.
Declaration
protected override bool Delete(Triple t)
Parameters
| Type | Name | Description |
|---|---|---|
| Triple | t | Triple to delete. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceDispose()
Disposes of the collection.
Declaration
public override void Dispose()
Overrides
Remarks
This does nothing since we don't know where and how the collections we are the union of are being used and therefore to dispose of them could have unwanted/unexpected results.
|
Improve this Doc
View Source
GetEnumerator()
Gets the enumeration of Triples in the union.
Declaration
public override IEnumerator<Triple> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<Triple> |
Overrides
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IDisposable