Show / Hide Table of Contents

Class BaseGraph

Abstract Base Implementation of the IGraph interface.
Inheritance
System.Object
BaseGraph
Graph
Implements
IGraph
INodeFactory
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRDF.dll
Syntax
[Serializable]
public abstract class BaseGraph : IGraph, INodeFactory, IDisposable, IXmlSerializable, ISerializable

Constructors

| Improve this Doc View Source

BaseGraph()

Creates a new Base Graph which uses the default TreeIndexedTripleCollection as the Triple Collection.
Declaration
protected BaseGraph()
| Improve this Doc View Source

BaseGraph(SerializationInfo, StreamingContext)

Creates a Graph from the given Serialization Information.
Declaration
protected BaseGraph(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info Serialization Information.
System.Runtime.Serialization.StreamingContext context Streaming Context.
| Improve this Doc View Source

BaseGraph(BaseTripleCollection)

Creates a new Base Graph using the given Triple Collection.
Declaration
protected BaseGraph(BaseTripleCollection tripleCollection)
Parameters
Type Name Description
BaseTripleCollection tripleCollection Triple Collection to use.

Fields

| Improve this Doc View Source

_baseuri

Base Uri of the Graph.
Declaration
protected Uri _baseuri
Field Value
Type Description
System.Uri
| Improve this Doc View Source

_bnodemapper

Blank Node ID Mapper.
Declaration
protected BlankNodeMapper _bnodemapper
Field Value
Type Description
BlankNodeMapper
| Improve this Doc View Source

_nsmapper

Namespace Mapper.
Declaration
protected NamespaceMapper _nsmapper
Field Value
Type Description
NamespaceMapper
| Improve this Doc View Source

_triples

Collection of Triples in the Graph.
Declaration
protected BaseTripleCollection _triples
Field Value
Type Description
BaseTripleCollection

Properties

| Improve this Doc View Source

AllNodes

Gets the unique Subject, Predicate and Object nodes of the Graph.
Declaration
public virtual IEnumerable<INode> AllNodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>
| Improve this Doc View Source

BaseUri

Gets the current Base Uri for the Graph.
Declaration
public virtual Uri BaseUri { get; set; }
Property Value
Type Description
System.Uri
Remarks
This value may be changed during Graph population depending on whether the Concrete syntax allows the Base Uri to be changed and how the Parser handles this.
| Improve this Doc View Source

IsEmpty

Gets whether a Graph is Empty ie. Contains No Triples or Nodes.
Declaration
public virtual bool IsEmpty { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

NamespaceMap

Gets the Namespace Mapper for this Graph which contains all in use Namespace Prefixes and their URIs.
Declaration
public virtual INamespaceMapper NamespaceMap { get; }
Property Value
Type Description
INamespaceMapper
| Improve this Doc View Source

Nodes

Gets the unique Subject and Object nodes of the Graph.
Declaration
public virtual IEnumerable<INode> Nodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>
Remarks
This property returns only nodes that appear in the Subject or Object position in triples. To retrieve a list of all INode instances in a graph including those in Predicate position in a triple, use the AllNodes property.
| Improve this Doc View Source

Triples

Gets the set of Triples described in this Graph.
Declaration
public virtual BaseTripleCollection Triples { get; }
Property Value
Type Description
BaseTripleCollection

Methods

| Improve this Doc View Source

Assert(IEnumerable<Triple>)

Asserts a List of Triples in the graph.
Declaration
public abstract bool Assert(IEnumerable<Triple> ts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Triple> ts List of Triples in the form of an IEnumerable.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Assert(Triple)

Asserts a Triple in the Graph.
Declaration
public abstract bool Assert(Triple t)
Parameters
Type Name Description
Triple t The Triple to add to the Graph.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

AttachEventHandlers(BaseTripleCollection)

Helper method for attaching the necessary event Handlers to a Triple Collection.
Declaration
protected void AttachEventHandlers(BaseTripleCollection tripleCollection)
Parameters
Type Name Description
BaseTripleCollection tripleCollection Triple Collection.
Remarks
May be useful if you replace the Triple Collection after instantiation e.g. as done in SparqlView's.
| Improve this Doc View Source

Clear()

Clears all Triples from the Graph.
Declaration
public virtual void Clear()
Remarks

The Graph will raise the ClearRequested event at the start of the Clear operation which allows for aborting the operation if the operation is cancelled by an event handler. On completing the Clear the Cleared event will be raised.

| Improve this Doc View Source

ContainsTriple(Triple)

Gets whether a given Triple exists in this Graph.
Declaration
public virtual bool ContainsTriple(Triple t)
Parameters
Type Name Description
Triple t Triple to test.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CreateBlankNode()

Creates a New Blank Node with an auto-generated Blank Node ID.
Declaration
public virtual IBlankNode CreateBlankNode()
Returns
Type Description
IBlankNode
| Improve this Doc View Source

CreateBlankNode(String)

Creates a New Blank Node with a user-defined Blank Node ID.
Declaration
public virtual IBlankNode CreateBlankNode(string nodeId)
Parameters
Type Name Description
System.String nodeId Node ID to use.
Returns
Type Description
IBlankNode
| Improve this Doc View Source

CreateGraphLiteralNode()

Creates a new Graph Literal Node with its value being an Empty Subgraph.
Declaration
public virtual IGraphLiteralNode CreateGraphLiteralNode()
Returns
Type Description
IGraphLiteralNode
| Improve this Doc View Source

CreateGraphLiteralNode(IGraph)

Creates a new Graph Literal Node with its value being the given Subgraph.
Declaration
public virtual IGraphLiteralNode CreateGraphLiteralNode(IGraph subgraph)
Parameters
Type Name Description
IGraph subgraph Subgraph this Node represents.
Returns
Type Description
IGraphLiteralNode
| Improve this Doc View Source

CreateLiteralNode(String)

Creates a New Literal Node with the given Value.
Declaration
public virtual ILiteralNode CreateLiteralNode(string literal)
Parameters
Type Name Description
System.String literal String value of the Literal.
Returns
Type Description
ILiteralNode
| Improve this Doc View Source

CreateLiteralNode(String, String)

Creates a New Literal Node with the given Value and Language Specifier.
Declaration
public virtual ILiteralNode CreateLiteralNode(string literal, string langspec)
Parameters
Type Name Description
System.String literal String value of the Literal.
System.String langspec Language Specifier of the Literal.
Returns
Type Description
ILiteralNode
| Improve this Doc View Source

CreateLiteralNode(String, Uri)

Creates a new Literal Node with the given Value and Data Type.
Declaration
public virtual ILiteralNode CreateLiteralNode(string literal, Uri datatype)
Parameters
Type Name Description
System.String literal String value of the Literal.
System.Uri datatype URI of the Data Type.
Returns
Type Description
ILiteralNode
| Improve this Doc View Source

CreateUriNode()

Creates a new URI Node that refers to the Base Uri of the Graph.
Declaration
public virtual IUriNode CreateUriNode()
Returns
Type Description
IUriNode
| Improve this Doc View Source

CreateUriNode(String)

Creates a new URI Node with the given QName.
Declaration
public virtual IUriNode CreateUriNode(string qname)
Parameters
Type Name Description
System.String qname QName for the Node.
Returns
Type Description
IUriNode
Remarks
Internally the Graph will resolve the QName to a full URI, throws an RDF Exception when this is not possible.
| Improve this Doc View Source

CreateUriNode(Uri)

Creates a new URI Node with the given URI.
Declaration
public virtual IUriNode CreateUriNode(Uri uri)
Parameters
Type Name Description
System.Uri uri URI for the Node.
Returns
Type Description
IUriNode
Remarks
Generally we expect to be passed an absolute URI, while relative URIs are permitted the behaviour is less well defined. If there is a Base URI defined for the Graph then relative URIs will be automatically resolved against that Base, if the Base URI is not defined then relative URIs will be left as is. In this case issues may occur when trying to serialize the data or when accurate round tripping is required.
| Improve this Doc View Source

CreateVariableNode(String)

Creates a new Variable Node.
Declaration
public virtual IVariableNode CreateVariableNode(string varname)
Parameters
Type Name Description
System.String varname Variable Name.
Returns
Type Description
IVariableNode
| Improve this Doc View Source

DetachEventHandlers(BaseTripleCollection)

Helper method for detaching the necessary event Handlers from a Triple Collection.
Declaration
protected void DetachEventHandlers(BaseTripleCollection tripleCollection)
Parameters
Type Name Description
BaseTripleCollection tripleCollection Triple Collection.
Remarks
May be useful if you replace the Triple Collection after instantiation e.g. as done in SparqlView's.
| Improve this Doc View Source

Difference(IGraph)

Computes the Difference between this Graph the given Graph.
Declaration
public GraphDiffReport Difference(IGraph g)
Parameters
Type Name Description
IGraph g Graph.
Returns
Type Description
GraphDiffReport
Remarks

Produces a report which shows the changes that must be made to this Graph to produce the given Graph.

| Improve this Doc View Source

Dispose()

Disposes of a Graph.
Declaration
public virtual void Dispose()
| Improve this Doc View Source

Equals(Object)

Determines whether a Graph is equal to another Object.
Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj Object to test.
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)
Remarks

A Graph can only be equal to another Object which is an IGraph.

Graph Equality is determined by a somewhat complex algorithm which is explained in the remarks of the other overload for Equals.

| Improve this Doc View Source

Equals(IGraph, out Dictionary<INode, INode>)

Determines whether this Graph is equal to the given Graph.
Declaration
public virtual bool Equals(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
Type Name Description
IGraph g Graph to test for equality.
System.Collections.Generic.Dictionary<INode, INode> mapping Mapping of Blank Nodes iff the Graphs are equal and contain some Blank Nodes.
Returns
Type Description
System.Boolean
Remarks
See GraphMatcher for documentation of the equality algorithm used.
| Improve this Doc View Source

GetBlankNode(String)

Returns the Blank Node with the given Identifier.
Declaration
public abstract IBlankNode GetBlankNode(string nodeId)
Parameters
Type Name Description
System.String nodeId The Identifier of the Blank Node to select.
Returns
Type Description
IBlankNode Either the Blank Node or null if no Node with the given Identifier exists.
| Improve this Doc View Source

GetLiteralNode(String)

Returns the LiteralNode with the given Value if it exists.
Declaration
public abstract ILiteralNode GetLiteralNode(string literal)
Parameters
Type Name Description
System.String literal The literal value of the Node to select.
Returns
Type Description
ILiteralNode Either the LiteralNode Or null if no Node with the given Value exists.
Remarks
The LiteralNode in the Graph must have no Language or DataType set.
| Improve this Doc View Source

GetLiteralNode(String, String)

Returns the LiteralNode with the given Value in the given Language if it exists.
Declaration
public abstract ILiteralNode GetLiteralNode(string literal, string langspec)
Parameters
Type Name Description
System.String literal The literal value of the Node to select.
System.String langspec The Language Specifier for the Node to select.
Returns
Type Description
ILiteralNode Either the LiteralNode Or null if no Node with the given Value and Language Specifier exists.
| Improve this Doc View Source

GetLiteralNode(String, Uri)

Returns the LiteralNode with the given Value and given Data Type if it exists.
Declaration
public abstract ILiteralNode GetLiteralNode(string literal, Uri datatype)
Parameters
Type Name Description
System.String literal The literal value of the Node to select.
System.Uri datatype The Uri for the Data Type of the Literal to select.
Returns
Type Description
ILiteralNode Either the LiteralNode Or null if no Node with the given Value and Data Type exists.
| Improve this Doc View Source

GetNextBlankNodeID()

Creates a new unused Blank Node ID and returns it.
Declaration
public virtual string GetNextBlankNodeID()
Returns
Type Description
System.String
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Gets the Serialization Information for serializing a Graph.
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info Serialization Information.
System.Runtime.Serialization.StreamingContext context Streaming Context.
| Improve this Doc View Source

GetSchema()

Gets the Schema for XML Serialization.
Declaration
public XmlSchema GetSchema()
Returns
Type Description
System.Xml.Schema.XmlSchema
| Improve this Doc View Source

GetTriples(Uri)

Gets all the Triples involving the given Uri.
Declaration
public abstract IEnumerable<Triple> GetTriples(Uri uri)
Parameters
Type Name Description
System.Uri uri The Uri to find Triples involving.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriples(INode)

Gets all the Triples involving the given Node.
Declaration
public abstract IEnumerable<Triple> GetTriples(INode n)
Parameters
Type Name Description
INode n The Node to find Triples involving.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriplesWithObject(Uri)

Gets all the Triples with the given Uri as the Object.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithObject(Uri u)
Parameters
Type Name Description
System.Uri u The Uri to find Triples with it as the Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriplesWithObject(INode)

Gets all the Triples with the given Node as the Object.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithObject(INode n)
Parameters
Type Name Description
INode n The Node to find Triples with it as the Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

GetTriplesWithPredicate(Uri)

Gets all the Triples with the given Uri as the Predicate.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithPredicate(Uri u)
Parameters
Type Name Description
System.Uri u The Uri to find Triples with it as the Predicate.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriplesWithPredicate(INode)

Gets all the Triples with the given Node as the Predicate.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithPredicate(INode n)
Parameters
Type Name Description
INode n The Node to find Triples with it as the Predicate.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

GetTriplesWithPredicateObject(INode, INode)

Selects all Triples with the given Predicate and Object.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithPredicateObject(INode pred, INode obj)
Parameters
Type Name Description
INode pred Predicate.
INode obj Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

GetTriplesWithSubject(Uri)

Gets all the Triples with the given Uri as the Subject.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithSubject(Uri u)
Parameters
Type Name Description
System.Uri u The Uri to find Triples with it as the Subject.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriplesWithSubject(INode)

Gets all the Triples with the given Node as the Subject.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithSubject(INode n)
Parameters
Type Name Description
INode n The Node to find Triples with it as the Subject.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple> Zero/More Triples.
| Improve this Doc View Source

GetTriplesWithSubjectObject(INode, INode)

Selects all Triples with the given Subject and Object.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithSubjectObject(INode subj, INode obj)
Parameters
Type Name Description
INode subj Subject.
INode obj Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

GetTriplesWithSubjectPredicate(INode, INode)

Selects all Triples with the given Subject and Predicate.
Declaration
public abstract IEnumerable<Triple> GetTriplesWithSubjectPredicate(INode subj, INode pred)
Parameters
Type Name Description
INode subj Subject.
INode pred Predicate.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
| Improve this Doc View Source

GetUriNode(String)

Returns the UriNode with the given QName if it exists.
Declaration
public abstract IUriNode GetUriNode(string qname)
Parameters
Type Name Description
System.String qname The QName of the Node to select.
Returns
Type Description
IUriNode
| Improve this Doc View Source

GetUriNode(Uri)

Returns the UriNode with the given Uri if it exists.
Declaration
public abstract IUriNode GetUriNode(Uri uri)
Parameters
Type Name Description
System.Uri uri The Uri of the Node to select.
Returns
Type Description
IUriNode Either the UriNode Or null if no Node with the given Uri exists.
| Improve this Doc View Source

HasSubGraph(IGraph)

Checks whether this Graph has the given Graph as a sub-graph.
Declaration
public bool HasSubGraph(IGraph g)
Parameters
Type Name Description
IGraph g Graph.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasSubGraph(IGraph, out Dictionary<INode, INode>)

Checks whether this Graph has the given Graph as a sub-graph.
Declaration
public bool HasSubGraph(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
Type Name Description
IGraph g Graph.
System.Collections.Generic.Dictionary<INode, INode> mapping Mapping of Blank Nodes.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSubGraphOf(IGraph)

Checks whether this Graph is a sub-graph of the given Graph.
Declaration
public bool IsSubGraphOf(IGraph g)
Parameters
Type Name Description
IGraph g Graph.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSubGraphOf(IGraph, out Dictionary<INode, INode>)

Checks whether this Graph is a sub-graph of the given Graph.
Declaration
public bool IsSubGraphOf(IGraph g, out Dictionary<INode, INode> mapping)
Parameters
Type Name Description
IGraph g Graph.
System.Collections.Generic.Dictionary<INode, INode> mapping Mapping of Blank Nodes.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Merge(IGraph)

Merges another Graph into the current Graph.
Declaration
public virtual void Merge(IGraph g)
Parameters
Type Name Description
IGraph g Graph to Merge into this Graph.
Remarks
The Graph on which you invoke this method will preserve its Blank Node IDs while the Blank Nodes from the Graph being merged in will be given new IDs as required in the scope of this Graph.
| Improve this Doc View Source

Merge(IGraph, Boolean)

Merges another Graph into the current Graph.
Declaration
public virtual void Merge(IGraph g, bool keepOriginalGraphUri)
Parameters
Type Name Description
IGraph g Graph to Merge into this Graph.
System.Boolean keepOriginalGraphUri Indicates that the Merge should preserve the Graph URIs of Nodes so they refer to the Graph they originated in.
Remarks

The Graph on which you invoke this method will preserve its Blank Node IDs while the Blank Nodes from the Graph being merged in will be given new IDs as required in the scope of this Graph.

The Graph will raise the MergeRequested event before the Merge operation which gives any event handlers the oppurtunity to cancel this event. When the Merge operation is completed the Merged event is raised.

| Improve this Doc View Source

OnTripleAsserted(Object, TripleEventArgs)

Event Handler which handles the TripleAdded event from the underlying Triple Collection by raising the Graph's TripleAsserted event.
Declaration
protected virtual void OnTripleAsserted(object sender, TripleEventArgs args)
Parameters
Type Name Description
System.Object sender Sender.
TripleEventArgs args Triple Event Arguments.
| Improve this Doc View Source

OnTripleRetracted(Object, TripleEventArgs)

Event Handler which handles the TripleRemoved event from the underlying Triple Collection by raising the Graph's TripleRetracted event.
Declaration
protected virtual void OnTripleRetracted(object sender, TripleEventArgs args)
Parameters
Type Name Description
System.Object sender Sender.
TripleEventArgs args Triple Event Arguments.
| Improve this Doc View Source

RaiseCleared()

Helper method for raising the Cleared event.
Declaration
protected void RaiseCleared()
| Improve this Doc View Source

RaiseClearRequested()

Helper method for raising the ClearRequested event and returning whether any of the Event Handlers cancelled the operation.
Declaration
protected bool RaiseClearRequested()
Returns
Type Description
System.Boolean True if the operation can continue, false if it should be aborted.
| Improve this Doc View Source

RaiseGraphChanged()

Helper method for raising the Changed event.
Declaration
protected void RaiseGraphChanged()
| Improve this Doc View Source

RaiseGraphChanged(TripleEventArgs)

Helper method for raising the Changed event.
Declaration
protected void RaiseGraphChanged(TripleEventArgs args)
Parameters
Type Name Description
TripleEventArgs args Triple Event Arguments.
| Improve this Doc View Source

RaiseMerged()

Helper method for raising the Merged event.
Declaration
protected void RaiseMerged()
| Improve this Doc View Source

RaiseMergeRequested()

Helper method for raising the MergeRequested event and returning whether any of the Event Handlers cancelled the operation.
Declaration
protected bool RaiseMergeRequested()
Returns
Type Description
System.Boolean True if the operation can continue, false if it should be aborted.
| Improve this Doc View Source

RaiseTripleAsserted(Triple)

Helper method for raising the TripleAsserted event manually.
Declaration
protected void RaiseTripleAsserted(Triple t)
Parameters
Type Name Description
Triple t Triple.
| Improve this Doc View Source

RaiseTripleAsserted(TripleEventArgs)

Helper method for raising the TripleAsserted event manually.
Declaration
protected void RaiseTripleAsserted(TripleEventArgs args)
Parameters
Type Name Description
TripleEventArgs args Triple Event Arguments.
| Improve this Doc View Source

RaiseTripleRetracted(Triple)

Helper method for raising the TripleRetracted event manually.
Declaration
protected void RaiseTripleRetracted(Triple t)
Parameters
Type Name Description
Triple t Triple.
| Improve this Doc View Source

RaiseTripleRetracted(TripleEventArgs)

Helper method for raising the TripleRetracted event manually.
Declaration
protected void RaiseTripleRetracted(TripleEventArgs args)
Parameters
Type Name Description
TripleEventArgs args
| Improve this Doc View Source

ReadXml(XmlReader)

Reads the data for XML deserialization.
Declaration
public void ReadXml(XmlReader reader)
Parameters
Type Name Description
System.Xml.XmlReader reader XML Reader.
| Improve this Doc View Source

ResolveQName(String)

Helper function for Resolving QNames to URIs.
Declaration
public virtual Uri ResolveQName(string qname)
Parameters
Type Name Description
System.String qname QName to resolve to a Uri.
Returns
Type Description
System.Uri
| Improve this Doc View Source

Retract(IEnumerable<Triple>)

Retracts a enumeration of Triples from the graph.
Declaration
public abstract bool Retract(IEnumerable<Triple> ts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Triple> ts Enumeration of Triples to retract.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Retract(Triple)

Retracts a Triple from the Graph.
Declaration
public abstract bool Retract(Triple t)
Parameters
Type Name Description
Triple t Triple to Retract.
Returns
Type Description
System.Boolean
Remarks
Current implementation may have some defunct Nodes left in the Graph as only the Triple is retracted.
| Improve this Doc View Source

WriteXml(XmlWriter)

Writes the data for XML serialization.
Declaration
public void WriteXml(XmlWriter writer)
Parameters
Type Name Description
System.Xml.XmlWriter writer XML Writer.

Events

| Improve this Doc View Source

Changed

Event which is raised when the Graph contents change
Declaration
public event GraphEventHandler Changed
Event Type
Type Description
GraphEventHandler
| Improve this Doc View Source

Cleared

Event which is raised after the Graph is cleared of its contents
Declaration
public event GraphEventHandler Cleared
Event Type
Type Description
GraphEventHandler
| Improve this Doc View Source

ClearRequested

Event which is raised just before the Graph is cleared of its contents
Declaration
public event CancellableGraphEventHandler ClearRequested
Event Type
Type Description
CancellableGraphEventHandler
| Improve this Doc View Source

Merged

Event which is raised when a Merge operation is completed on the Graph
Declaration
public event GraphEventHandler Merged
Event Type
Type Description
GraphEventHandler
| Improve this Doc View Source

MergeRequested

Event which is raised when a Merge operation is requested on the Graph
Declaration
public event CancellableGraphEventHandler MergeRequested
Event Type
Type Description
CancellableGraphEventHandler
| Improve this Doc View Source

TripleAsserted

Event which is raised when a Triple is asserted in the Graph
Declaration
public event TripleEventHandler TripleAsserted
Event Type
Type Description
TripleEventHandler
| Improve this Doc View Source

TripleRetracted

Event which is raised when a Triple is retracted from the Graph
Declaration
public event TripleEventHandler TripleRetracted
Event Type
Type Description
TripleEventHandler

Implements

IGraph
INodeFactory
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable

Extension Methods

GraphExtensions.ToDataTable(IGraph)
Extensions.AsEnumerable<T>(T)
Extensions.Assert(IGraph, INode, INode, INode)
Extensions.Retract(IGraph, INode, INode, INode)
Extensions.AssertList<T>(IGraph, IEnumerable<T>, Func<T, INode>)
Extensions.AssertList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.AssertList(IGraph, IEnumerable<INode>)
Extensions.AssertList(IGraph, INode, IEnumerable<INode>)
Extensions.GetListAsTriples(IGraph, INode)
Extensions.GetListItems(IGraph, INode)
Extensions.GetListNodes(IGraph, INode)
Extensions.RetractList(IGraph, INode)
Extensions.AddToList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.AddToList(IGraph, INode, IEnumerable<INode>)
Extensions.RemoveFromList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.RemoveFromList(IGraph, INode, IEnumerable<INode>)
GraphExtensions.ExecuteQuery(IGraph, String)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, String)
GraphExtensions.ExecuteQuery(IGraph, SparqlParameterizedString)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlParameterizedString)
GraphExtensions.ExecuteQuery(IGraph, SparqlQuery)
GraphExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlQuery)
GraphExtensions.LoadFromFile(IGraph, String, IRdfReader)
GraphExtensions.LoadFromFile(IGraph, String)
GraphExtensions.LoadFromUri(IGraph, Uri, IRdfReader)
GraphExtensions.LoadFromUri(IGraph, Uri)
GraphExtensions.LoadFromString(IGraph, String, IRdfReader)
GraphExtensions.LoadFromString(IGraph, String)
GraphExtensions.LoadFromEmbeddedResource(IGraph, String)
GraphExtensions.LoadFromEmbeddedResource(IGraph, String, IRdfReader)
GraphExtensions.SaveToFile(IGraph, String, IRdfWriter)
GraphExtensions.SaveToFile(IGraph, String, IStoreWriter)
GraphExtensions.SaveToFile(IGraph, String)
GraphExtensions.SaveToStream(IGraph, TextWriter, IRdfWriter)
GraphExtensions.SaveToStream(IGraph, TextWriter, IStoreWriter)
GraphExtensions.SaveToStream(IGraph, String, TextWriter)
DynamicExtensions.AsDynamic(IGraph, Uri, Uri)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • BaseGraph()
    • BaseGraph(SerializationInfo, StreamingContext)
    • BaseGraph(BaseTripleCollection)
  • Fields
    • _baseuri
    • _bnodemapper
    • _nsmapper
    • _triples
  • Properties
    • AllNodes
    • BaseUri
    • IsEmpty
    • NamespaceMap
    • Nodes
    • Triples
  • Methods
    • Assert(IEnumerable<Triple>)
    • Assert(Triple)
    • AttachEventHandlers(BaseTripleCollection)
    • Clear()
    • ContainsTriple(Triple)
    • CreateBlankNode()
    • CreateBlankNode(String)
    • CreateGraphLiteralNode()
    • CreateGraphLiteralNode(IGraph)
    • CreateLiteralNode(String)
    • CreateLiteralNode(String, String)
    • CreateLiteralNode(String, Uri)
    • CreateUriNode()
    • CreateUriNode(String)
    • CreateUriNode(Uri)
    • CreateVariableNode(String)
    • DetachEventHandlers(BaseTripleCollection)
    • Difference(IGraph)
    • Dispose()
    • Equals(Object)
    • Equals(IGraph, out Dictionary<INode, INode>)
    • GetBlankNode(String)
    • GetLiteralNode(String)
    • GetLiteralNode(String, String)
    • GetLiteralNode(String, Uri)
    • GetNextBlankNodeID()
    • GetObjectData(SerializationInfo, StreamingContext)
    • GetSchema()
    • GetTriples(Uri)
    • GetTriples(INode)
    • GetTriplesWithObject(Uri)
    • GetTriplesWithObject(INode)
    • GetTriplesWithPredicate(Uri)
    • GetTriplesWithPredicate(INode)
    • GetTriplesWithPredicateObject(INode, INode)
    • GetTriplesWithSubject(Uri)
    • GetTriplesWithSubject(INode)
    • GetTriplesWithSubjectObject(INode, INode)
    • GetTriplesWithSubjectPredicate(INode, INode)
    • GetUriNode(String)
    • GetUriNode(Uri)
    • HasSubGraph(IGraph)
    • HasSubGraph(IGraph, out Dictionary<INode, INode>)
    • IsSubGraphOf(IGraph)
    • IsSubGraphOf(IGraph, out Dictionary<INode, INode>)
    • Merge(IGraph)
    • Merge(IGraph, Boolean)
    • OnTripleAsserted(Object, TripleEventArgs)
    • OnTripleRetracted(Object, TripleEventArgs)
    • RaiseCleared()
    • RaiseClearRequested()
    • RaiseGraphChanged()
    • RaiseGraphChanged(TripleEventArgs)
    • RaiseMerged()
    • RaiseMergeRequested()
    • RaiseTripleAsserted(Triple)
    • RaiseTripleAsserted(TripleEventArgs)
    • RaiseTripleRetracted(Triple)
    • RaiseTripleRetracted(TripleEventArgs)
    • ReadXml(XmlReader)
    • ResolveQName(String)
    • Retract(IEnumerable<Triple>)
    • Retract(Triple)
    • WriteXml(XmlWriter)
  • Events
    • Changed
    • Cleared
    • ClearRequested
    • Merged
    • MergeRequested
    • TripleAsserted
    • TripleRetracted
  • Implements
  • Extension Methods
Back to top Generated by DocFX