Class TreeIndexedTripleCollection
An indexed triple collection that uses our VDS.Common.Collections.MultiDictionary<TKey, TValue> and VDS.Common.Trees.BinaryTree`2 implementations under the hood for the index structures.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public class TreeIndexedTripleCollection : AbstractIndexedTripleCollection, IEnumerable<Triple>, IEnumerable, IDisposable
Constructors
| Improve this Doc View SourceTreeIndexedTripleCollection()
Creates a new Tree Indexed triple collection.
Declaration
public TreeIndexedTripleCollection()
TreeIndexedTripleCollection(bool, bool, bool, bool, bool, bool, bool, MultiDictionaryMode)
Creates a new Tree Indexed triple collection with the given Indexing options.
Declaration
public TreeIndexedTripleCollection(bool subjIndex, bool predIndex, bool objIndex, bool subjPredIndex, bool subjObjIndex, bool predObjIndex, bool indexQuoted, MultiDictionaryMode compoundIndexMode)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | subjIndex | Whether to create a subject index. |
System.Boolean | predIndex | Whether to create a predicate index. |
System.Boolean | objIndex | Whether to create an object index. |
System.Boolean | subjPredIndex | Whether to create a subject predicate index. |
System.Boolean | subjObjIndex | Whether to create a subject object index. |
System.Boolean | predObjIndex | Whether to create a predicate object index. |
System.Boolean | indexQuoted | Whether to create the same set of indexes for quoted triples. |
VDS.Common.Collections.MultiDictionaryMode | compoundIndexMode | Mode to use for compound indexes. |
TreeIndexedTripleCollection(bool, bool, bool, bool, bool, bool, MultiDictionaryMode)
Creates a new Tree Indexed triple collection with the given Indexing options.
Declaration
public TreeIndexedTripleCollection(bool subjIndex, bool predIndex, bool objIndex, bool subjPredIndex, bool subjObjIndex, bool predObjIndex, MultiDictionaryMode compoundIndexMode)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | subjIndex | Whether to create a subject index. |
System.Boolean | predIndex | Whether to create a predicate index. |
System.Boolean | objIndex | Whether to create an object index. |
System.Boolean | subjPredIndex | Whether to create a subject predicate index. |
System.Boolean | subjObjIndex | Whether to create a subject object index. |
System.Boolean | predObjIndex | Whether to create a predicate object index. |
VDS.Common.Collections.MultiDictionaryMode | compoundIndexMode | Mode to use for compound indexes. |
TreeIndexedTripleCollection(bool)
Creates a new Tree Indexed triple collection.
Declaration
public TreeIndexedTripleCollection(bool fullTripleIndexing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fullTripleIndexing | Whether to create subject-predicate, subject-object and subject-predicate indexes in addition to the basic subject, predicate and object indexes. Defaults to true. |
TreeIndexedTripleCollection(MultiDictionaryMode, bool)
Creates a new Tree Indexed triple collection.
Declaration
public TreeIndexedTripleCollection(MultiDictionaryMode compoundIndexMode, bool fullTripleIndexing = true)
Parameters
Type | Name | Description |
---|---|---|
VDS.Common.Collections.MultiDictionaryMode | compoundIndexMode | Mode to use for compound indexes. |
System.Boolean | fullTripleIndexing | Whether to create subject-predicate, subject-object and subject-predicate indexes in addition to the basic subject, predicate and object indexes. Defaults to true. |
Properties
| Improve this Doc View Sourcethis[Triple]
Gets the specific instance of a Triple in the collection.
Declaration
public override Triple this[Triple t] { get; }
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Property Value
Type | Description |
---|---|
Triple |
Overrides
| Improve this Doc View SourceObjectNodes
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
| 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.Collections.Generic.IEnumerable<T><INode> |
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.Collections.Generic.IEnumerable<T><INode> |
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.Collections.Generic.IEnumerable<T><INode> |
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.Collections.Generic.IEnumerable<T><INode> |
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.Collections.Generic.IEnumerable<T><INode> |
Overrides
Methods
| Improve this Doc View SourceDispose()
Disposes of the collection.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceIndexAsserted(Triple)
Indexes a Triple.
Declaration
protected override void IndexAsserted(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Overrides
| Improve this Doc View SourceIndexQuoted(Triple)
Override in derived classes to add a quoted triple to the index.
Declaration
protected override void IndexQuoted(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple to add. |
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.Collections.Generic.IEnumerable<T><Triple> |
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.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | pred | Predicate to lookup. |
INode | obj | Object to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
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.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | subj | Subject to lookup. |
INode | obj | Object to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | subj | Subject to lookup. |
INode | pred | Predicate to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceUnindexAsserted(Triple)
Unindexes a triple.
Declaration
protected override void UnindexAsserted(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Overrides
| Improve this Doc View SourceUnindexQuoted(Triple)
Override in derived classes to remove a quoted triple from the index.
Declaration
protected override void UnindexQuoted(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t |
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.Collections.Generic.IEnumerable<T><Triple> |
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.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | pred | Predicate to lookup. |
INode | obj | Object to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
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.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | subj | Subject to lookup. |
INode | obj | Object to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
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
Type | Name | Description |
---|---|---|
INode | subj | Subject to lookup. |
INode | pred | Predicate to lookup. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |