• User Guide
  • API Documentation
  • Developer Guide
  • Support
  • API Documentation
Show / Hide Table of Contents

Class UnionGraph

A Graph which represents the Union of several Graphs.

Inheritance
object
BaseGraph
Graph
UnionGraph
Implements
IGraph
INodeFactory
IDisposable
ITripleIndex
IEquatable<IGraph>
IEquatable<Graph>
Inherited Members
Graph.Equals(Graph)
Graph.GetUriNode(Uri)
Graph.GetUriNode(string)
Graph.GetLiteralNode(string)
Graph.GetLiteralNode(string, string)
Graph.GetLiteralNode(string, Uri)
Graph.GetBlankNode(string)
Graph.GetTripleNode(Triple)
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)
Graph.GetQuoted(INode)
Graph.GetQuotedWithObject(INode)
Graph.GetQuotedWithPredicate(INode)
Graph.GetQuotedWithSubject(INode)
Graph.GetQuotedWithSubjectPredicate(INode, INode)
Graph.GetQuotedWithSubjectObject(INode, INode)
Graph.GetQuotedWithPredicateObject(INode, INode)
BaseGraph._triples
BaseGraph.NodeFactory
BaseGraph.UriFactory
BaseGraph._name
BaseGraph._bnodemapper
BaseGraph.Triples
BaseGraph.QuotedTriples
BaseGraph.AllNodes
BaseGraph.QuotedNodes
BaseGraph.AllQuotedNodes
BaseGraph.NamespaceMap
BaseGraph.BaseUri
BaseGraph.Name
BaseGraph.IsEmpty
BaseGraph.NormalizeLiteralValues
BaseGraph.LanguageTagValidation
BaseGraph.CreateBlankNode()
BaseGraph.CreateBlankNode(string)
BaseGraph.CreateGraphLiteralNode()
BaseGraph.CreateGraphLiteralNode(IGraph)
BaseGraph.CreateLiteralNode(string, Uri)
BaseGraph.CreateLiteralNode(string)
BaseGraph.CreateLiteralNode(string, string)
BaseGraph.CreateUriNode(Uri)
BaseGraph.CreateUriNode(string)
BaseGraph.CreateUriNode()
BaseGraph.CreateVariableNode(string)
BaseGraph.CreateTripleNode(Triple)
BaseGraph.ContainsTriple(Triple)
BaseGraph.ContainsQuotedTriple(Triple)
BaseGraph.GetQuoted(Uri)
BaseGraph.GetQuotedWithObject(Uri)
BaseGraph.GetQuotedWithPredicate(Uri)
BaseGraph.GetQuotedWithSubject(Uri)
BaseGraph.Merge(IGraph)
BaseGraph.Merge(IGraph, bool)
BaseGraph.Unstar()
BaseGraph.Equals(IGraph)
BaseGraph.Equals(IGraph, out Dictionary<INode, INode>)
BaseGraph.IsSubGraphOf(IGraph)
BaseGraph.IsSubGraphOf(IGraph, out Dictionary<INode, INode>)
BaseGraph.HasSubGraph(IGraph)
BaseGraph.HasSubGraph(IGraph, out 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()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public class UnionGraph : Graph, IGraph, INodeFactory, IDisposable, ITripleIndex, IEquatable<IGraph>, IEquatable<Graph>
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

| Edit this page 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.

IEnumerable<IGraph> graphs

Other Graphs in the Union.

Properties

| Edit this page View Source

Nodes

Gets the Nodes of the Graph.

Declaration
public override IEnumerable<INode> Nodes { get; }
Property Value
Type Description
IEnumerable<INode>
Overrides
BaseGraph.Nodes

Methods

| Edit this page View Source

Assert(IEnumerable<Triple>)

Asserts some Triples in the Graph.

Declaration
public override bool Assert(IEnumerable<Triple> ts)
Parameters
Type Name Description
IEnumerable<Triple> ts

Triples.

Returns
Type Description
bool
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.

| Edit this page 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
bool
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.

| Edit this page View Source

Clear()

Clears all the Graphs in the Union.

Declaration
public override void Clear()
Overrides
BaseGraph.Clear()
| Edit this page View Source

Retract(IEnumerable<Triple>)

Retracts some Triples from the Graph.

Declaration
public override bool Retract(IEnumerable<Triple> ts)
Parameters
Type Name Description
IEnumerable<Triple> ts

Triples.

Returns
Type Description
bool
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.

| Edit this page 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
bool
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
IDisposable
ITripleIndex
IEquatable<T>
IEquatable<T>

Extension Methods

Extensions.ToSafeString(object)
GraphExtensions.ToDataTable(IGraph)
DynamicExtensions.AsDynamic(IGraph, Uri, Uri)
Extensions.AddToList(IGraph, INode, IEnumerable<INode>)
Extensions.AddToList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.Assert(IGraph, INode, INode, INode)
Extensions.AssertList(IGraph, IEnumerable<INode>)
Extensions.AssertList(IGraph, INode, IEnumerable<INode>)
Extensions.AssertList<T>(IGraph, IEnumerable<T>, Func<T, INode>)
Extensions.AssertList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.GetListAsTriples(IGraph, INode)
Extensions.GetListItems(IGraph, INode)
Extensions.GetListNodes(IGraph, INode)
Extensions.RemoveFromList(IGraph, INode, IEnumerable<INode>)
Extensions.RemoveFromList<T>(IGraph, INode, IEnumerable<T>, Func<T, INode>)
Extensions.Retract(IGraph, INode, INode, INode)
Extensions.RetractList(IGraph, INode)
GraphExtensions.GetETag(IGraph)
GraphExtensions.LoadFromEmbeddedResource(IGraph, string)
GraphExtensions.LoadFromEmbeddedResource(IGraph, string, IRdfReader)
GraphExtensions.LoadFromFile(IGraph, string)
GraphExtensions.LoadFromFile(IGraph, string, IRdfReader)
GraphExtensions.LoadFromString(IGraph, string)
GraphExtensions.LoadFromString(IGraph, string, IRdfReader)
GraphExtensions.LoadFromUri(IGraph, Uri, IRdfReader, Loader)
GraphExtensions.LoadFromUri(IGraph, Uri, Loader)
GraphExtensions.SaveToFile(IGraph, string)
GraphExtensions.SaveToFile(IGraph, string, IRdfWriter)
GraphExtensions.SaveToFile(IGraph, string, IStoreWriter)
GraphExtensions.SaveToStream(IGraph, TextWriter, IRdfWriter)
GraphExtensions.SaveToStream(IGraph, TextWriter, IStoreWriter)
GraphExtensions.SaveToStream(IGraph, string, TextWriter)
InMemoryExtensions.ExecuteQuery(IGraph, string)
InMemoryExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, string)
InMemoryExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlParameterizedString)
InMemoryExtensions.ExecuteQuery(IGraph, IRdfHandler, ISparqlResultsHandler, SparqlQuery)
InMemoryExtensions.ExecuteQuery(IGraph, SparqlParameterizedString)
InMemoryExtensions.ExecuteQuery(IGraph, SparqlQuery)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • 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