Class DatasetGraphCollection
A Graph Collection which wraps an ISparqlDataset implementation so it can be used as if it was a Graph Collection.
Implements
Inherited Members
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRdf.dll
Syntax
public class DatasetGraphCollection : BaseGraphCollection, IEnumerable<IGraph>, IEnumerable, IDisposable
Constructors
| Improve this Doc View SourceDatasetGraphCollection(ISparqlDataset)
Creates a new Dataset Graph collection.
Declaration
public DatasetGraphCollection(ISparqlDataset dataset)
Parameters
Type | Name | Description |
---|---|---|
ISparqlDataset | dataset | SPARQL Dataset. |
Properties
| Improve this Doc View SourceCount
Gets the number of Graphs in the Collection.
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
| Improve this Doc View SourceGraphNames
Provides an enumeration of the names of all of teh graphs in the collection.
Declaration
public override IEnumerable<IRefNode> GraphNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><IRefNode> |
Overrides
| Improve this Doc View SourceGraphUris
Gets the URIs of Graphs in the Collection.
Declaration
[Obsolete("Replaced by GraphNames")]
public override IEnumerable<Uri> GraphUris { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Overrides
| Improve this Doc View Sourcethis[Uri]
Gets the Graph with the given URI.
Declaration
[Obsolete("Replaced by this[IRefNode]")]
public override IGraph this[Uri graphUri] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Property Value
Type | Description |
---|---|
IGraph |
Overrides
| Improve this Doc View Sourcethis[IRefNode]
Gets a graph from the collection.
Declaration
public override IGraph this[IRefNode graphName] { get; }
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | The name of the graph to retrieve. |
Property Value
Type | Description |
---|---|
IGraph |
Overrides
Remarks
The null value is used to reference the default graph.
Methods
| Improve this Doc View SourceAdd(IGraph, bool)
Adds a Graph to the Collection.
Declaration
public override bool Add(IGraph g, bool mergeIfExists)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to add. |
System.Boolean | mergeIfExists | Whether to merge the given Graph with any existing Graph with the same URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Exceptions
Type | Condition |
---|---|
RdfException | Thrown if a Graph with the given URI already exists and the |
Contains(Uri)
Gets whether the Collection contains a Graph with the given URI.
Declaration
[Obsolete("Replaced by Contains(IRefNode)")]
public override bool Contains(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceContains(IRefNode)
Checks whether the graph with the given name exists in this graph collection.
Declaration
public override bool Contains(IRefNode graphName)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | Graph name to test for. |
Returns
Type | Description |
---|---|
System.Boolean | True if a graph with the specified name is in the collection, false otherwise. |
Overrides
Remarks
The null value is used to reference the default (unnamed) graph.
Dispose()
Disposes of the Graph Collection.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceGetEnumerator()
Gets the enumeration of Graphs in this Collection.
Declaration
public override IEnumerator<IGraph> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T><IGraph> |
Overrides
| Improve this Doc View SourceRemove(Uri)
Removes a Graph from the Collection.
Declaration
[Obsolete("Replaced by Remove(IRefNode)")]
public override bool Remove(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to removed. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemove(IRefNode)
Removes a graph from the collection.
Declaration
public override bool Remove(IRefNode graphName)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | Name of the Graph to remove. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The null value is used to reference the Default Graph.