Show / Hide Table of Contents

Class GraphFactory

A Graph Factory provides access to consistent Graph References so that Nodes and Triples can be instantiated in the correct Graphs.

Inheritance
object
GraphFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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

| Edit this page View Source

this[Uri]

Gets a Graph Reference for the given Graph URI.

Declaration
public IGraph this[Uri graphUri] { get; }
Parameters
Type Name Description
Uri graphUri

Graph URI.

Property Value
Type Description
IGraph

Methods

| Edit this page View Source

GetGraph(Uri)

Gets a Graph Reference for the given Graph URI.

Declaration
public IGraph GetGraph(Uri graphUri)
Parameters
Type Name Description
Uri graphUri

Graph URI.

Returns
Type Description
IGraph
Remarks

Synonym for the index access method i.e. factory[graphUri].

| Edit this page View Source

Reset()

Resets the Factory so any Graphs with contents are emptied.

Declaration
public void Reset()
| Edit this page View Source

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
Uri graphUri

Graph URI.

bool created

Indicates whether the returned reference was newly created.

Returns
Type Description
IGraph

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Properties
    • this[Uri]
  • Methods
    • GetGraph(Uri)
    • Reset()
    • TryGetGraph(Uri, out bool)
  • Extension Methods
Back to top Generated by DocFX