Click or drag to resize

NonIndexedThreadSafeGraph Class

A Thread Safe version of the Graph class.
Inheritance Hierarchy

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
public class NonIndexedThreadSafeGraph : ThreadSafeGraph

The NonIndexedThreadSafeGraph type exposes the following members.

Constructors
  NameDescription
Public methodNonIndexedThreadSafeGraph
Creates a new non-indexed Thread Safe Graph.
Top
Properties
  NameDescription
Public propertyAllNodes
Gets the unique Subject, Predicate and Object nodes of the Graph.
(Inherited from BaseGraph.)
Public propertyBaseUri
Gets the current Base Uri for the Graph.
(Inherited from BaseGraph.)
Public propertyIsEmpty
Gets whether a Graph is Empty ie. Contains No Triples or Nodes.
(Inherited from BaseGraph.)
Public propertyNamespaceMap
Gets the Namespace Mapper for this Graph which contains all in use Namespace Prefixes and their URIs.
(Inherited from BaseGraph.)
Public propertyNodes
Gets the unique Subject and Object nodes of the Graph.
(Inherited from BaseGraph.)
Public propertyTriples
Gets the set of Triples described in this Graph.
(Inherited from BaseGraph.)
Top
Methods
  NameDescription
Public methodAssert(IEnumerableTriple)
Asserts a List of Triples in the graph.
(Inherited from ThreadSafeGraph.)
Public methodAssert(Triple)
Asserts a Triple in the Graph.
(Inherited from ThreadSafeGraph.)
Protected methodAttachEventHandlers
Helper method for attaching the necessary event Handlers to a Triple Collection.
(Inherited from BaseGraph.)
Public methodClear
Clears all Triples from the Graph.
(Inherited from BaseGraph.)
Public methodContainsTriple
Gets whether a given Triple exists in this Graph.
(Inherited from BaseGraph.)
Public methodCreateBlankNode
Creates a New Blank Node with an auto-generated Blank Node ID.
(Inherited from BaseGraph.)
Public methodCreateBlankNode(String)
Creates a New Blank Node with a user-defined Blank Node ID.
(Inherited from BaseGraph.)
Public methodCreateGraphLiteralNode
Creates a new Graph Literal Node with its value being an Empty Subgraph.
(Inherited from BaseGraph.)
Public methodCreateGraphLiteralNode(IGraph)
Creates a new Graph Literal Node with its value being the given Subgraph.
(Inherited from BaseGraph.)
Public methodCreateLiteralNode(String)
Creates a New Literal Node with the given Value.
(Inherited from BaseGraph.)
Public methodCreateLiteralNode(String, String)
Creates a New Literal Node with the given Value and Language Specifier.
(Inherited from BaseGraph.)
Public methodCreateLiteralNode(String, Uri)
Creates a new Literal Node with the given Value and Data Type.
(Inherited from BaseGraph.)
Public methodCreateUriNode
Creates a new URI Node that refers to the Base Uri of the Graph.
(Inherited from BaseGraph.)
Public methodCreateUriNode(String)
Creates a new URI Node with the given QName.
(Inherited from BaseGraph.)
Public methodCreateUriNode(Uri)
Creates a new URI Node with the given URI.
(Inherited from BaseGraph.)
Public methodCreateVariableNode
Creates a new Variable Node.
(Inherited from BaseGraph.)
Protected methodDetachEventHandlers
Helper method for detaching the necessary event Handlers from a Triple Collection.
(Inherited from BaseGraph.)
Public methodDifference
Computes the Difference between this Graph the given Graph.
(Inherited from BaseGraph.)
Public methodDispose
Disposes of a Graph.
(Inherited from ThreadSafeGraph.)
Public methodEquals(Object)
Determines whether a Graph is equal to another Object.
(Inherited from BaseGraph.)
Public methodEquals(IGraph, DictionaryINode, INode)
Determines whether this Graph is equal to the given Graph.
(Inherited from BaseGraph.)
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 methodGetBlankNode
Returns the Blank Node with the given Identifier.
(Inherited from ThreadSafeGraph.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLiteralNode(String)
Returns the LiteralNode with the given Value if it exists.
(Inherited from ThreadSafeGraph.)
Public methodGetLiteralNode(String, String)
Returns the LiteralNode with the given Value in the given Language if it exists.
(Inherited from ThreadSafeGraph.)
Public methodGetLiteralNode(String, Uri)
Returns the LiteralNode with the given Value and given Data Type if it exists.
(Inherited from ThreadSafeGraph.)
Public methodGetNextBlankNodeID
Creates a new Blank Node ID and returns it.
(Inherited from ThreadSafeGraph.)
Public methodGetObjectData
Gets the Serialization Information for serializing a Graph.
(Inherited from BaseGraph.)
Public methodGetSchema
Gets the Schema for XML Serialization.
(Inherited from BaseGraph.)
Public methodGetTriples(Uri)
Gets all the Triples involving the given Uri.
(Inherited from ThreadSafeGraph.)
Public methodGetTriples(INode)
Gets all the Triples involving the given Node.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithObject(Uri)
Gets all the Triples with the given Uri as the Object.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithObject(INode)
Gets all the Triples with the given Node as the Object.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithPredicate(Uri)
Gets all the Triples with the given Uri as the Predicate.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithPredicate(INode)
Gets all the Triples with the given Node as the Predicate.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithPredicateObject
Selects all Triples with the given Predicate and Object.
(Inherited from Graph.)
Public methodGetTriplesWithSubject(Uri)
Gets all the Triples with the given Uri as the Subject.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithSubject(INode)
Gets all the Triples with the given Node as the Subject.
(Inherited from ThreadSafeGraph.)
Public methodGetTriplesWithSubjectObject
Selects all Triples with the given Subject and Object.
(Inherited from Graph.)
Public methodGetTriplesWithSubjectPredicate
Selects all Triples with the given Subject and Predicate.
(Inherited from Graph.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUriNode(String)
Returns the UriNode with the given QName if it exists.
(Inherited from ThreadSafeGraph.)
Public methodGetUriNode(Uri)
Returns the UriNode with the given Uri if it exists.
(Inherited from ThreadSafeGraph.)
Public methodHasSubGraph(IGraph)
Checks whether this Graph has the given Graph as a sub-graph.
(Inherited from BaseGraph.)
Public methodHasSubGraph(IGraph, DictionaryINode, INode)
Checks whether this Graph has the given Graph as a sub-graph.
(Inherited from BaseGraph.)
Public methodIsSubGraphOf(IGraph)
Checks whether this Graph is a sub-graph of the given Graph.
(Inherited from BaseGraph.)
Public methodIsSubGraphOf(IGraph, DictionaryINode, INode)
Checks whether this Graph is a sub-graph of the given Graph.
(Inherited from BaseGraph.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge(IGraph)
Merges another Graph into the current Graph.
(Inherited from BaseGraph.)
Public methodMerge(IGraph, Boolean)
Merges another Graph into the current Graph.
(Inherited from BaseGraph.)
Protected methodOnTripleAsserted
Event Handler which handles the Triple Added event from the underlying Triple Collection by raising the Graph's TripleAsserted event.
(Inherited from BaseGraph.)
Protected methodOnTripleRetracted
Event Handler which handles the Triple Removed event from the underlying Triple Collection by raising the Graph's Triple Retracted event.
(Inherited from BaseGraph.)
Protected methodRaiseCleared
Helper method for raising the Cleared event.
(Inherited from BaseGraph.)
Protected methodRaiseClearRequested
Helper method for raising the Clear Requested event and returning whether any of the Event Handlers cancelled the operation.
(Inherited from BaseGraph.)
Protected methodRaiseGraphChanged
Helper method for raising the Changed event.
(Inherited from BaseGraph.)
Protected methodRaiseGraphChanged(TripleEventArgs)
Helper method for raising the Changed event.
(Inherited from BaseGraph.)
Protected methodRaiseMerged
Helper method for raising the Merged event.
(Inherited from BaseGraph.)
Protected methodRaiseMergeRequested
Helper method for raising the Merge Requested event and returning whether any of the Event Handlers cancelled the operation.
(Inherited from BaseGraph.)
Protected methodRaiseTripleAsserted(Triple)
Helper method for raising the Triple Asserted event manually.
(Inherited from BaseGraph.)
Protected methodRaiseTripleAsserted(TripleEventArgs)
Helper method for raising the Triple Asserted event manually.
(Inherited from BaseGraph.)
Protected methodRaiseTripleRetracted(Triple)
Helper method for raising the Triple Retracted event manually.
(Inherited from BaseGraph.)
Protected methodRaiseTripleRetracted(TripleEventArgs)
Helper method for raising the Triple Retracted event manually.
(Inherited from BaseGraph.)
Public methodReadXml
Reads the data for XML deserialization.
(Inherited from BaseGraph.)
Public methodResolveQName
Helper function for Resolving QNames to URIs.
(Inherited from BaseGraph.)
Public methodRetract(IEnumerableTriple)
Retracts a enumeration of Triples from the graph.
(Inherited from ThreadSafeGraph.)
Public methodRetract(Triple)
Retracts a Triple from the Graph.
(Inherited from ThreadSafeGraph.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteXml
Writes the data for XML serialization.
(Inherited from BaseGraph.)
Top
Events
  NameDescription
Public eventChanged
Event which is raised when the Graph contents change
(Inherited from BaseGraph.)
Public eventCleared
Event which is raised after the Graph is cleared of its contents
(Inherited from BaseGraph.)
Public eventClearRequested
Event which is raised just before the Graph is cleared of its contents
(Inherited from BaseGraph.)
Public eventMerged
Event which is raised when a Merge operation is completed on the Graph
(Inherited from BaseGraph.)
Public eventMergeRequested
Event which is raised when a Merge operation is requested on the Graph
(Inherited from BaseGraph.)
Public eventTripleAsserted
Event which is raised when a Triple is asserted in the Graph
(Inherited from BaseGraph.)
Public eventTripleRetracted
Event which is raised when a Triple is retracted from the Graph
(Inherited from BaseGraph.)
Top
Fields
  NameDescription
Protected field_baseuri
Base Uri of the Graph.
(Inherited from BaseGraph.)
Protected field_bnodemapper
Blank Node ID Mapper.
(Inherited from BaseGraph.)
Protected field_lockManager
Locking Manager for the Graph.
(Inherited from ThreadSafeGraph.)
Protected field_nsmapper
Namespace Mapper.
(Inherited from BaseGraph.)
Protected field_triples
Collection of Triples in the Graph.
(Inherited from BaseGraph.)
Top
Remarks

Performance will be marginally worse than a normal Graph but in multi-threaded scenarios this will likely be offset by the benefits of multi-threading.

Since this is a non-indexed version load performance will be better but query performance better.

Thread Safety
Should be safe for almost any concurrent read and write access scenario, internally managed using a ReaderWriterLockSlim. If you encounter any sort of Threading/Concurrency issue please report to the. dotNetRDF Bugs Mailing List
See Also