Class BaseDataset
Abstract Base Class for Datasets which provides implementation of Active and Default Graph management.
Inheritance
System.Object
BaseDataset
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()
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseDataset : ISparqlDataset
Constructors
|
Improve this Doc
View Source
BaseDataset()
Creates a new Dataset.
Declaration
|
Improve this Doc
View Source
BaseDataset(Boolean)
Creates a new Dataset with the given Union Default Graph setting.
Declaration
public BaseDataset(bool unionDefaultGraph)
Parameters
Type |
Name |
Description |
System.Boolean |
unionDefaultGraph |
Whether to use a Union Default Graph. |
|
Improve this Doc
View Source
BaseDataset(Uri)
Creates a new Dataset with a fixed Default Graph and without a Union Default Graph.
Declaration
public BaseDataset(Uri defaultGraphUri)
Parameters
Type |
Name |
Description |
System.Uri |
defaultGraphUri |
|
Properties
|
Improve this Doc
View Source
ActiveGraphUris
Gets the Active Graph URIs.
Declaration
public IEnumerable<Uri> ActiveGraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
DefaultGraphUris
Gets the Default Graph URIs.
Declaration
public IEnumerable<Uri> DefaultGraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
Graphs
Gets all the Graphs in the Dataset.
Declaration
public abstract IEnumerable<IGraph> Graphs { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<IGraph> |
|
|
Improve this Doc
View Source
GraphUris
Gets all the URIs of Graphs in the Dataset.
Declaration
public abstract IEnumerable<Uri> GraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
HasTriples
Gets whether the Dataset has any Triples.
Declaration
public virtual bool HasTriples { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InternalDefaultGraph
Gets a reference to the actual
IGraph that is currently treated as the default graph.
Declaration
protected IGraph InternalDefaultGraph { get; }
Property Value
|
Improve this Doc
View Source
Item[Uri]
Gets the Graph with the given URI from the Dataset.
Declaration
public virtual IGraph this[Uri graphUri] { get; }
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Property Value
|
Improve this Doc
View Source
Triples
Gets all the Triples in the Dataset.
Declaration
public IEnumerable<Triple> Triples { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
UsesUnionDefaultGraph
Gets whether the Default Graph is treated as being the union of all Graphs in the dataset when no Default Graph is otherwise set.
Declaration
public bool UsesUnionDefaultGraph { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
AddGraph(IGraph)
Adds a Graph to the Dataset.
Declaration
public abstract bool AddGraph(IGraph g)
Parameters
Type |
Name |
Description |
IGraph |
g |
Graph. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ContainsTriple(Triple)
Gets whether the Dataset contains a specific Triple.
Declaration
public bool ContainsTriple(Triple t)
Parameters
Type |
Name |
Description |
Triple |
t |
Triple. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ContainsTripleInternal(Triple)
Determines whether the Dataset contains a specific Triple.
Declaration
protected abstract bool ContainsTripleInternal(Triple t)
Parameters
Type |
Name |
Description |
Triple |
t |
Triple to search for. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Discard()
Ensures that any changes to the Dataset (if any) are discarded.
Declaration
public abstract void Discard()
|
Improve this Doc
View Source
Flush()
Ensures that any changes to the Dataset (if any) are flushed to the underlying Storage.
Declaration
public abstract void Flush()
|
Improve this Doc
View Source
GetAllTriples()
Abstract method that concrete implementations must implement to return an enumerable of all the Triples in the Dataset.
Declaration
protected abstract IEnumerable<Triple> GetAllTriples()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetGraphInternal(Uri)
Gets the given Graph from the Dataset.
Declaration
protected abstract IGraph GetGraphInternal(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
|
Improve this Doc
View Source
GetModifiableGraph(Uri)
Gets the Graph with the given URI from the Dataset.
Declaration
public abstract IGraph GetModifiableGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
|
Improve this Doc
View Source
GetTriplesWithObject(INode)
Gets all the Triples in the Dataset with the given Object.
Declaration
public IEnumerable<Triple> GetTriplesWithObject(INode obj)
Parameters
Type |
Name |
Description |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithObjectInternal(INode)
Gets all the Triples in the Dataset with the given Object.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithObjectInternal(INode obj)
Parameters
Type |
Name |
Description |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicate(INode)
Gets all the Triples in the Dataset with the given Predicate.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(INode pred)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicateInternal(INode)
Gets all the Triples in the Dataset with the given Predicate.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithPredicateInternal(INode pred)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicateObject(INode, INode)
Gets all the Triples in the Dataset with the given Predicate and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicateObject(INode pred, INode obj)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicateObjectInternal(INode, INode)
Gets all the Triples in the Dataset with the given Predicate and Object.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithPredicateObjectInternal(INode pred, INode obj)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubject(INode)
Gets all the Triples in the Dataset with the given Subject.
Declaration
public IEnumerable<Triple> GetTriplesWithSubject(INode subj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectInternal(INode)
Gets all the Triples in the Dataset with the given Subject.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithSubjectInternal(INode subj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectObject(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectObject(INode subj, INode obj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectObjectInternal(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Object.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithSubjectObjectInternal(INode subj, INode obj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectPredicate(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Predicate.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectPredicate(INode subj, INode pred)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectPredicateInternal(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Predicate.
Declaration
protected abstract IEnumerable<Triple> GetTriplesWithSubjectPredicateInternal(INode subj, INode pred)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
HasGraph(Uri)
Gets whether a Graph with the given URI is the Dataset.
Declaration
public bool HasGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HasGraphInternal(Uri)
Determines whether a given Graph exists in the Dataset.
Declaration
protected abstract bool HasGraphInternal(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RemoveGraph(Uri)
Removes a Graph from the Dataset.
Declaration
public virtual bool RemoveGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
RemoveGraphInternal(Uri)
Removes a Graph from the Dataset.
Declaration
protected abstract bool RemoveGraphInternal(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ResetActiveGraph()
Sets the Active Graph for the SPARQL query to be the previous Active Graph.
Declaration
public void ResetActiveGraph()
|
Improve this Doc
View Source
ResetDefaultGraph()
Sets the Default Graph for the SPARQL Query to be the previous Default Graph.
Declaration
public void ResetDefaultGraph()
|
Improve this Doc
View Source
SetActiveGraph(IEnumerable<Uri>)
Sets the Active Graph for the SPARQL query.
Declaration
public void SetActiveGraph(IEnumerable<Uri> graphUris)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
graphUris |
URIs of the Graphs which form the Active Graph. |
|
Improve this Doc
View Source
SetActiveGraph(Uri)
Sets the Active Graph for the SPARQL query.
Declaration
public void SetActiveGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Uri of the Active Graph. |
|
Improve this Doc
View Source
SetDefaultGraph(IEnumerable<Uri>)
Sets the Default Graph.
Declaration
public void SetDefaultGraph(IEnumerable<Uri> graphUris)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
graphUris |
Graph URIs. |
|
Improve this Doc
View Source
SetDefaultGraph(Uri)
Sets the Default Graph.
Declaration
public void SetDefaultGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Implements
Extension Methods