Class QuadDatasetTripleCollection
A Triple Collection which is a thin wrapper around a Base
Implements
Inherited Members
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRdf.dll
Syntax
public class QuadDatasetTripleCollection : BaseTripleCollection, IEnumerable<Triple>, IEnumerable, IDisposable
Constructors
| Improve this Doc View SourceQuadDatasetTripleCollection(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 |
---|---|---|
Base |
dataset | The dataset to wrap. |
System. |
graphName | The URI of the graph to expose through this interface. |
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 |
---|---|---|
Base |
dataset | The dataset to wrap. |
IRef |
graphName | The URI of the graph to expose through this interface. |
Properties
| Improve this Doc View SourceAsserted
Gets the triples that are asserted in the collection.
Declaration
public override IEnumerable<Triple> Asserted { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Remarks
This returns the same set of triples as the enumerator on this class, but as an System.
Count
Gets the number of asserted triples in the triple collection.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Improve this Doc View Sourcethis[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
Exceptions
Type | Condition |
---|---|
System. |
Thrown if the given Triple doesn't exist. |
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. |
Overrides
| Improve this Doc View SourcePredicateNodes
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. |
Overrides
| Improve this Doc View SourceQuoted
Gets the triples that are quoted in the collection.
Declaration
public override IEnumerable<Triple> Quoted { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceQuotedCount
Gets the number of quoted triples in the triple collection.
Declaration
public override int QuotedCount { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Improve this Doc View SourceQuotedObjectNodes
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. |
Overrides
| Improve this Doc View SourceQuotedPredicateNodes
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. |
Overrides
| Improve this Doc View SourceQuotedSubjectNodes
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. |
Overrides
| Improve this Doc View SourceSubjectNodes
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. |
Overrides
Methods
| Improve this Doc View SourceAdd(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. |
Overrides
Remarks
Adding a Triple that already exists should be permitted though it is not necessary to persist the duplicate to underlying storage.
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. |
True if the triple exists as an asserted triple in the collection. |
Overrides
| Improve this Doc View SourceContainsQuoted(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. |
True if the triple is quoted in the triple collection, false otherwise. |
Overrides
| Improve this Doc View SourceDelete(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. |
True if the operation removed an asserted triple from the collection, false otherwise. |
Overrides
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.
Dispose()
Disposes of a Triple Collection.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceGetEnumerator()
Gets the typed Enumerator for the Triple Collection.
Declaration
public override IEnumerator<Triple> GetEnumerator()
Returns
Type | Description |
---|---|
System. |
An enumerator over the asserted triples in the triple collection. |
Overrides
| Improve this Doc View SourceQuotedWithObject(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. |
Overrides
| Improve this Doc View SourceQuotedWithPredicate(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. |
Overrides
| Improve this Doc View SourceQuotedWithPredicateObject(INode, INode)
Gets all the quoted triples with the given Predicate Object pair.
Declaration
public override IEnumerable<Triple> QuotedWithPredicateObject(INode pred, INode obj)
Parameters
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceQuotedWithSubject(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. |
Overrides
| Improve this Doc View SourceQuotedWithSubjectObject(INode, INode)
Gets all the quoted triples with the given Subject Object pair.
Declaration
public override IEnumerable<Triple> QuotedWithSubjectObject(INode subj, INode obj)
Parameters
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceQuotedWithSubjectPredicate(INode, INode)
Gets all the quoted triples with the given Subject Predicate pair.
Declaration
public override IEnumerable<Triple> QuotedWithSubjectPredicate(INode subj, INode pred)
Parameters
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceWithObject(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. |
Overrides
| Improve this Doc View SourceWithPredicate(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. |
Overrides
| Improve this Doc View SourceWithPredicateObject(INode, INode)
Gets all the Triples with the given Predicate Object pair.
Declaration
public override IEnumerable<Triple> WithPredicateObject(INode pred, INode obj)
Parameters
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceWithSubject(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. |
Overrides
| Improve this Doc View SourceWithSubjectObject(INode, INode)
Gets all the Triples with the given Subject Object pair.
Declaration
public override IEnumerable<Triple> WithSubjectObject(INode subj, INode obj)
Parameters
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceWithSubjectPredicate(INode, INode)
Gets all the asserted triples with the given subject/predicate pair.
Declaration
public override IEnumerable<Triple> WithSubjectPredicate(INode subj, INode pred)
Parameters
Returns
Type | Description |
---|---|
System. |