Class GraphFactory
A Graph Factory provides access to consistent Graph References so that Nodes and Triples can be instantiated in the correct Graphs.
Inheritance
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
[Obsolete("This class is obsolete and will be removed in a future release. There is no replacement for this class.")]
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 Sourcethis[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 |
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.
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].
Reset()
Resets the Factory so any Graphs with contents are emptied.
Declaration
public void Reset()
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.
TryGetGraph(Uri, out bool)
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 |
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.