Class GraphFactory
A Graph Factory provides access to consistent Graph References so that Nodes and Triples can be instantiated in the correct Graphs.
Inheritance
System.Object
GraphFactory
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 GraphFactory
Remarks
Primarily designed for internal use in some of our code but may prove useful to other users hence is a public class. Internally this is just a wrapper around a TripleStore instance.
The main usage for this class is scenarios where consistent graph references matter such as returning node references from out of memory datasets (like SQL backed ones) particularly with regards to blank nodes since blank node equality is predicated upon Graph reference.
Properties
| Improve this Doc View SourceItem[Uri]
Gets a Graph Reference for the given Graph URI.
Declaration
public IGraph this[Uri graphUri] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Property Value
Type | Description |
---|---|
IGraph |
Methods
| Improve this Doc View SourceGetGraph(Uri)
Gets a Graph Reference for the given Graph URI.
Declaration
public IGraph GetGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Returns
Type | Description |
---|---|
IGraph |
Remarks
Synonym for the index access method i.e. factory[graphUri].
|
Improve this Doc
View Source
Reset()
Resets the Factory so any Graphs with contents are emptied.
Declaration
public void Reset()
TryGetGraph(Uri, out Boolean)
Gets a Graph Reference for the given Graph URI and indicates whether this was a new Graph reference.
Declaration
public IGraph TryGetGraph(Uri graphUri, out bool created)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
System.Boolean | created | Indicates whether the returned reference was newly created. |
Returns
Type | Description |
---|---|
IGraph |