Class UnionGraph
A Graph which represents the Union of several Graphs.
Implements
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
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 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. |
System.Collections.Generic.IEnumerable<IGraph> | graphs | Other Graphs in the Union. |
Properties
| Improve this Doc View SourceNodes
Gets the Nodes of the Graph.
Declaration
public override IEnumerable<INode> Nodes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<INode> |
Overrides
Methods
| Improve this Doc View SourceAssert(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
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
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
| Improve this Doc View SourceRetract(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
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
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
System.IDisposable
System.Xml.Serialization.IXmlSerializable
System.Runtime.Serialization.ISerializable