• User Guide
  • How-To Guides
  • Developer Guide
  • API Documentation
  • FAQs
  • Support
  • API Documentation
Show / Hide Table of Contents

Class UnionGraph

A Graph which represents the Union of several Graphs.
Inheritance
System.Object
BaseGraph
Graph
UnionGraph
Implements
IGraph
INodeFactory
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable
Inherited Members
Graph.GetUriNode(Uri)
Graph.GetUriNode(String)
Graph.GetLiteralNode(String)
Graph.GetLiteralNode(String, String)
Graph.GetLiteralNode(String, Uri)
Graph.GetBlankNode(String)
Graph.GetTriples(INode)
Graph.GetTriples(Uri)
Graph.GetTriplesWithSubject(INode)
Graph.GetTriplesWithSubject(Uri)
Graph.GetTriplesWithPredicate(INode)
Graph.GetTriplesWithPredicate(Uri)
Graph.GetTriplesWithObject(INode)
Graph.GetTriplesWithObject(Uri)
Graph.GetTriplesWithSubjectPredicate(INode, INode)
Graph.GetTriplesWithSubjectObject(INode, INode)
Graph.GetTriplesWithPredicateObject(INode, INode)
BaseGraph._triples
BaseGraph._nsmapper
BaseGraph._baseuri
BaseGraph._bnodemapper
BaseGraph.Triples
BaseGraph.AllNodes
BaseGraph.NamespaceMap
BaseGraph.BaseUri
BaseGraph.IsEmpty
BaseGraph.CreateBlankNode()
BaseGraph.CreateBlankNode(String)
BaseGraph.CreateLiteralNode(String)
BaseGraph.CreateLiteralNode(String, String)
BaseGraph.CreateLiteralNode(String, Uri)
BaseGraph.CreateUriNode()
BaseGraph.CreateUriNode(Uri)
BaseGraph.CreateUriNode(String)
BaseGraph.CreateVariableNode(String)
BaseGraph.CreateGraphLiteralNode()
BaseGraph.CreateGraphLiteralNode(IGraph)
BaseGraph.ContainsTriple(Triple)
BaseGraph.Merge(IGraph)
BaseGraph.Merge(IGraph, Boolean)
BaseGraph.Equals(Object)
BaseGraph.Equals(IGraph, Dictionary<INode, INode>)
BaseGraph.IsSubGraphOf(IGraph)
BaseGraph.IsSubGraphOf(IGraph, Dictionary<INode, INode>)
BaseGraph.HasSubGraph(IGraph)
BaseGraph.HasSubGraph(IGraph, Dictionary<INode, INode>)
BaseGraph.Difference(IGraph)
BaseGraph.ResolveQName(String)
BaseGraph.GetNextBlankNodeID()
BaseGraph.TripleAsserted
BaseGraph.TripleRetracted
BaseGraph.Changed
BaseGraph.ClearRequested
BaseGraph.Cleared
BaseGraph.MergeRequested
BaseGraph.Merged
BaseGraph.OnTripleAsserted(Object, TripleEventArgs)
BaseGraph.RaiseTripleAsserted(TripleEventArgs)
BaseGraph.RaiseTripleAsserted(Triple)
BaseGraph.OnTripleRetracted(Object, TripleEventArgs)
BaseGraph.RaiseTripleRetracted(TripleEventArgs)
BaseGraph.RaiseTripleRetracted(Triple)
BaseGraph.RaiseGraphChanged(TripleEventArgs)
BaseGraph.RaiseGraphChanged()
BaseGraph.RaiseClearRequested()
BaseGraph.RaiseCleared()
BaseGraph.RaiseMergeRequested()
BaseGraph.RaiseMerged()
BaseGraph.AttachEventHandlers(BaseTripleCollection)
BaseGraph.DetachEventHandlers(BaseTripleCollection)
BaseGraph.Dispose()
BaseGraph.GetObjectData(SerializationInfo, StreamingContext)
BaseGraph.GetSchema()
BaseGraph.ReadXml(XmlReader)
BaseGraph.WriteXml(XmlWriter)
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
public class UnionGraph : Graph, IGraph, INodeFactory, IDisposable, IXmlSerializable, ISerializable
Remarks

The Union is entirely virtual, the Graphs and their Triples are not actually physically merged together.

All Assert and Retract operations are directed only to the Default Graph while a Clear() operation will clear all Graphs in the Union.

Constructors

| Improve this Doc View Source

UnionGraph(IGraph, IEnumerable<IGraph>)

Creates a new Union Graph which is the Union of all the given Graphs with a specific Default Graph.
Declaration
public UnionGraph(IGraph defaultGraph, IEnumerable<IGraph> graphs)
Parameters
Type Name Description
IGraph defaultGraph Default Graph of the Union.
System.Collections.Generic.IEnumerable<IGraph> graphs Other Graphs in the Union.

Properties

| Improve this Doc View Source

Nodes

Gets the Nodes of the Graph.
Declaration
public override IEnumerable<INode> Nodes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<INode>
Overrides
BaseGraph.Nodes

Methods

| Improve this Doc View Source

Assert(IEnumerable<Triple>)

Asserts some Triples in the Graph.
Declaration
public override bool Assert(IEnumerable<Triple> ts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Triple> ts Triples.
Returns
Type Description
System.Boolean
Overrides
Graph.Assert(IEnumerable<Triple>)
Remarks
Assert and Retract operations are directed to the Default Graph of the Union. We have to override the method to do this as although the UnionTripleCollection will direct asserts/retracts to Triple Collection of the default Graph we cannot guarantee that the Graph will be able to carry out any assertion/retraction logic (e.g. persistence) it might have implemented if the Assert/Retract bypasses the Assert/Retract method of the Default Graph.
| Improve this Doc View Source

Assert(Triple)

Asserts s Triple in the Graph.
Declaration
public override bool Assert(Triple t)
Parameters
Type Name Description
Triple t Triple.
Returns
Type Description
System.Boolean
Overrides
Graph.Assert(Triple)
Remarks
Assert and Retract operations are directed to the Default Graph of the Union. We have to override the method to do this as although the UnionTripleCollection will direct asserts/retracts to Triple Collection of the default Graph we cannot guarantee that the Graph will be able to carry out any assertion/retraction logic (e.g. persistence) it might have implemented if the Assert/Retract bypasses the Assert/Retract method of the Default Graph.
| Improve this Doc View Source

Clear()

Clears all the Graphs in the Union.
Declaration
public override void Clear()
Overrides
BaseGraph.Clear()
| Improve this Doc View Source

Retract(IEnumerable<Triple>)

Retracts some Triples from the Graph.
Declaration
public override bool Retract(IEnumerable<Triple> ts)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Triple> ts Triples.
Returns
Type Description
System.Boolean
Overrides
Graph.Retract(IEnumerable<Triple>)
Remarks
Assert and Retract operations are directed to the Default Graph of the Union. We have to override the method to do this as although the UnionTripleCollection will direct asserts/retracts to Triple Collection of the default Graph we cannot guarantee that the Graph will be able to carry out any assertion/retraction logic (e.g. persistence) it might have implemented if the Assert/Retract bypasses the Assert/Retract method of the Default Graph.
| Improve this Doc View Source

Retract(Triple)

Retracts a Triple from the Graph.
Declaration
public override bool Retract(Triple t)
Parameters
Type Name Description
Triple t Triple.
Returns
Type Description
System.Boolean
Overrides
Graph.Retract(Triple)
Remarks
Assert and Retract operations are directed to the Default Graph of the Union. We have to override the method to do this as although the UnionTripleCollection will direct asserts/retracts to Triple Collection of the default Graph we cannot guarantee that the Graph will be able to carry out any assertion/retraction logic (e.g. persistence) it might have implemented if the Assert/Retract bypasses the Assert/Retract method of the Default Graph.

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
    • UnionGraph(IGraph, IEnumerable<IGraph>)
  • Properties
    • Nodes
  • Methods
    • Assert(IEnumerable<Triple>)
    • Assert(Triple)
    • Clear()
    • Retract(IEnumerable<Triple>)
    • Retract(Triple)
  • Implements
  • Extension Methods
Back to top Generated by DocFX