Click or drag to resize

BaseGraph Class

Abstract Base Implementation of the IGraph interface.
Inheritance Hierarchy

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
Syntax
[SerializableAttribute]
public abstract class BaseGraph : IGraph, 
	INodeFactory, IDisposable, IXmlSerializable, ISerializable

The BaseGraph type exposes the following members.

Constructors
  NameDescription
Protected methodBaseGraph
Creates a new Base Graph which uses the default TreeIndexedTripleCollection as the Triple Collection.
Protected methodBaseGraph(BaseTripleCollection)
Creates a new Base Graph using the given Triple Collection.
Protected methodBaseGraph(SerializationInfo, StreamingContext)
Creates a Graph from the given Serialization Information.
Top
Properties
  NameDescription
Public propertyAllNodes
Gets the unique Subject, Predicate and Object nodes of the Graph.
Public propertyBaseUri
Gets the current Base Uri for the Graph.
Public propertyIsEmpty
Gets whether a Graph is Empty ie. Contains No Triples or Nodes.
Public propertyNamespaceMap
Gets the Namespace Mapper for this Graph which contains all in use Namespace Prefixes and their URIs.
Public propertyNodes
Gets the unique Subject and Object nodes of the Graph.
Public propertyTriples
Gets the set of Triples described in this Graph.
Top
Methods
  NameDescription
Public methodAssert(IEnumerableTriple)
Asserts a List of Triples in the graph.
Public methodAssert(Triple)
Asserts a Triple in the Graph.
Protected methodAttachEventHandlers
Helper method for attaching the necessary event Handlers to a Triple Collection.
Public methodClear
Clears all Triples from the Graph.
Public methodContainsTriple
Gets whether a given Triple exists in this Graph.
Public methodCreateBlankNode
Creates a New Blank Node with an auto-generated Blank Node ID.
Public methodCreateBlankNode(String)
Creates a New Blank Node with a user-defined Blank Node ID.
Public methodCreateGraphLiteralNode
Creates a new Graph Literal Node with its value being an Empty Subgraph.
Public methodCreateGraphLiteralNode(IGraph)
Creates a new Graph Literal Node with its value being the given Subgraph.
Public methodCreateLiteralNode(String)
Creates a New Literal Node with the given Value.
Public methodCreateLiteralNode(String, String)
Creates a New Literal Node with the given Value and Language Specifier.
Public methodCreateLiteralNode(String, Uri)
Creates a new Literal Node with the given Value and Data Type.
Public methodCreateUriNode
Creates a new URI Node that refers to the Base Uri of the Graph.
Public methodCreateUriNode(String)
Creates a new URI Node with the given QName.
Public methodCreateUriNode(Uri)
Creates a new URI Node with the given URI.
Public methodCreateVariableNode
Creates a new Variable Node.
Protected methodDetachEventHandlers
Helper method for detaching the necessary event Handlers from a Triple Collection.
Public methodDifference
Computes the Difference between this Graph the given Graph.
Public methodDispose
Disposes of a Graph.
Public methodEquals(Object)
Determines whether a Graph is equal to another Object.
(Overrides ObjectEquals(Object).)
Public methodEquals(IGraph, DictionaryINode, INode)
Determines whether this Graph is equal to the given Graph.
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.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLiteralNode(String)
Returns the LiteralNode with the given Value if it exists.
Public methodGetLiteralNode(String, String)
Returns the LiteralNode with the given Value in the given Language if it exists.
Public methodGetLiteralNode(String, Uri)
Returns the LiteralNode with the given Value and given Data Type if it exists.
Public methodGetNextBlankNodeID
Creates a new unused Blank Node ID and returns it.
Public methodGetObjectData
Gets the Serialization Information for serializing a Graph.
Public methodGetSchema
Gets the Schema for XML Serialization.
Public methodGetTriples(Uri)
Gets all the Triples involving the given Uri.
Public methodGetTriples(INode)
Gets all the Triples involving the given Node.
Public methodGetTriplesWithObject(Uri)
Gets all the Triples with the given Uri as the Object.
Public methodGetTriplesWithObject(INode)
Gets all the Triples with the given Node as the Object.
Public methodGetTriplesWithPredicate(Uri)
Gets all the Triples with the given Uri as the Predicate.
Public methodGetTriplesWithPredicate(INode)
Gets all the Triples with the given Node as the Predicate.
Public methodGetTriplesWithPredicateObject
Selects all Triples with the given Predicate and Object.
Public methodGetTriplesWithSubject(Uri)
Gets all the Triples with the given Uri as the Subject.
Public methodGetTriplesWithSubject(INode)
Gets all the Triples with the given Node as the Subject.
Public methodGetTriplesWithSubjectObject
Selects all Triples with the given Subject and Object.
Public methodGetTriplesWithSubjectPredicate
Selects all Triples with the given Subject and Predicate.
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.
Public methodGetUriNode(Uri)
Returns the UriNode with the given Uri if it exists.
Public methodHasSubGraph(IGraph)
Checks whether this Graph has the given Graph as a sub-graph.
Public methodHasSubGraph(IGraph, DictionaryINode, INode)
Checks whether this Graph has the given Graph as a sub-graph.
Public methodIsSubGraphOf(IGraph)
Checks whether this Graph is a sub-graph of the given Graph.
Public methodIsSubGraphOf(IGraph, DictionaryINode, INode)
Checks whether this Graph is a sub-graph of the given Graph.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge(IGraph)
Merges another Graph into the current Graph.
Public methodMerge(IGraph, Boolean)
Merges another Graph into the current Graph.
Protected methodOnTripleAsserted
Event Handler which handles the Triple Added event from the underlying Triple Collection by raising the Graph's TripleAsserted event.
Protected methodOnTripleRetracted
Event Handler which handles the Triple Removed event from the underlying Triple Collection by raising the Graph's Triple Retracted event.
Protected methodRaiseCleared
Helper method for raising the Cleared event.
Protected methodRaiseClearRequested
Helper method for raising the Clear Requested event and returning whether any of the Event Handlers cancelled the operation.
Protected methodRaiseGraphChanged
Helper method for raising the Changed event.
Protected methodRaiseGraphChanged(TripleEventArgs)
Helper method for raising the Changed event.
Protected methodRaiseMerged
Helper method for raising the Merged event.
Protected methodRaiseMergeRequested
Helper method for raising the Merge Requested event and returning whether any of the Event Handlers cancelled the operation.
Protected methodRaiseTripleAsserted(Triple)
Helper method for raising the Triple Asserted event manually.
Protected methodRaiseTripleAsserted(TripleEventArgs)
Helper method for raising the Triple Asserted event manually.
Protected methodRaiseTripleRetracted(Triple)
Helper method for raising the Triple Retracted event manually.
Protected methodRaiseTripleRetracted(TripleEventArgs)
Helper method for raising the Triple Retracted event manually.
Public methodReadXml
Reads the data for XML deserialization.
Public methodResolveQName
Helper function for Resolving QNames to URIs.
Public methodRetract(IEnumerableTriple)
Retracts a enumeration of Triples from the graph.
Public methodRetract(Triple)
Retracts a Triple from the Graph.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteXml
Writes the data for XML serialization.
Top
Events
  NameDescription
Public eventChanged
Event which is raised when the Graph contents change
Public eventCleared
Event which is raised after the Graph is cleared of its contents
Public eventClearRequested
Event which is raised just before the Graph is cleared of its contents
Public eventMerged
Event which is raised when a Merge operation is completed on the Graph
Public eventMergeRequested
Event which is raised when a Merge operation is requested on the Graph
Public eventTripleAsserted
Event which is raised when a Triple is asserted in the Graph
Public eventTripleRetracted
Event which is raised when a Triple is retracted from the Graph
Top
Fields
  NameDescription
Protected field_baseuri
Base Uri of the Graph.
Protected field_bnodemapper
Blank Node ID Mapper.
Protected field_nsmapper
Namespace Mapper.
Protected field_triples
Collection of Triples in the Graph.
Top
Extension Methods
  NameDescription
Public Extension MethodAddToList(INode, IEnumerableINode)Overloaded.
Adds new items to the end of a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodAddToListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Adds new items to the end of a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodAsDynamic
Dynamically wraps a graph.
(Defined by DynamicExtensions.)
Public Extension MethodAssert
Asserts a new Triple in the Graph.
(Defined by Extensions.)
Public Extension MethodAssertList(IEnumerableINode)Overloaded.
Asserts a list as a RDF collection and returns the node that represents the root of the RDF collection.
(Defined by Extensions.)
Public Extension MethodAssertList(INode, IEnumerableINode)Overloaded.
Asserts a list as a RDF collection using an existing node as the list root.
(Defined by Extensions.)
Public Extension MethodAssertListT(IEnumerableT, FuncT, INode)Overloaded.
Asserts a list as a RDF collection and returns the node that represents the root of the RDF collection.
(Defined by Extensions.)
Public Extension MethodAssertListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Asserts a list as a RDF collection using an existing node as the list root.
(Defined by Extensions.)
Public Extension MethodExecuteQuery(String)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(SparqlParameterizedString)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(SparqlQuery)Overloaded.
Executes a SPARQL Query on a Graph.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, String)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, SparqlParameterizedString)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodExecuteQuery(IRdfHandler, ISparqlResultsHandler, SparqlQuery)Overloaded.
Executes a SPARQL Query on a Graph handling the results using the handlers provided.
(Defined by GraphExtensions.)
Public Extension MethodGetListAsTriples
Gets all the Triples that make up a list (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodGetListItems
Gets all the Nodes which are the items of the list (aka the RDF collection).
(Defined by Extensions.)
Public Extension MethodGetListNodes
Gets all the Nodes which are the intermediate nodes in the list (aka the RDF collection). These represents the nodes used to link the actual items of the list together rather than the actual items of the list.
(Defined by Extensions.)
Public Extension MethodLoadFromEmbeddedResource(String)Overloaded.
Loads RDF data from an Embedded Resource into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromEmbeddedResource(String, IRdfReader)Overloaded.
Loads RDF data from an Embedded Resource into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromFile(String)Overloaded.
Loads RDF data from a file into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromFile(String, IRdfReader)Overloaded.
Loads RDF data from a file into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromString(String)Overloaded.
Loads RDF data from a String into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromString(String, IRdfReader)Overloaded.
Loads RDF data from a String into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromUri(Uri)Overloaded.
Loads RDF data from a URI into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodLoadFromUri(Uri, IRdfReader)Overloaded.
Loads RDF data from a URI into a Graph.
(Defined by GraphExtensions.)
Public Extension MethodRemoveFromList(INode, IEnumerableINode)Overloaded.
Removes the given items from a list (aka a RDF collection), if an item occurs multiple times in the list all occurrences will be removed.
(Defined by Extensions.)
Public Extension MethodRemoveFromListT(INode, IEnumerableT, FuncT, INode)Overloaded.
Removes the given items from a list (aka a RDF collection), if an item occurs multiple times in the list all occurrences will be removed.
(Defined by Extensions.)
Public Extension MethodRetract
Retracts a Triple from the Graph.
(Defined by Extensions.)
Public Extension MethodRetractList
Retracts a List (aka a RDF collection).
(Defined by Extensions.)
Public Extension MethodSaveToFile(String)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToFile(String, IRdfWriter)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToFile(String, IStoreWriter)Overloaded.
Saves a Graph to a File.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(TextWriter, IRdfWriter)Overloaded.
Saves a Graph to a stream.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(TextWriter, IStoreWriter)Overloaded.
Saves a Graph to a stream.
(Defined by GraphExtensions.)
Public Extension MethodSaveToStream(String, TextWriter)Overloaded.
Save a graph to a stream, determining the type of writer to use by the output file name.
(Defined by GraphExtensions.)
Top
See Also