Class UnionGraph
A Graph which represents the Union of several Graphs.
Inherited Members
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 SourceUnionGraph(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 SourceNodes
Gets the Nodes of the Graph.
Declaration
public override IEnumerable<INode> Nodes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<INode> |
Overrides
Methods
| Edit this page View SourceAssert(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
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.
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
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.
Clear()
Clears all the Graphs in the Union.
Declaration
public override void Clear()
Overrides
| Edit this page View SourceRetract(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
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.
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
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.