Click or drag to resize

GraphFactory Class

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

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
public class GraphFactory

The GraphFactory type exposes the following members.

Public methodGraphFactory
Initializes a new instance of the GraphFactory class
Public propertyItem
Gets a Graph Reference for the given Graph URI.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetGraph
Gets a Graph Reference for the given Graph URI.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Resets the Factory so any Graphs with contents are emptied.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetGraph
Gets a Graph Reference for the given Graph URI and indicates whether this was a new Graph reference.

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.

See Also