Class StoreVirtualGraphPersistenceWrapper<TNodeID, TGraphID>
Base class for update operations on virtualized graphs. Implementors have to provide a method to convert standard Nodes to their virtual form according to the IVirtualRdfProvider which is in use.
Inheritance
Inherited Members
Namespace: VDS.RDF.Storage.Virtualisation
Assembly: dotNetRdf.dll
Syntax
public abstract class StoreVirtualGraphPersistenceWrapper<TNodeID, TGraphID> : StoreGraphPersistenceWrapper, ITransactionalGraph, IGraph, INodeFactory, IDisposable, ITripleIndex, IEquatable<IGraph>
Type Parameters
Name | Description |
---|---|
TNodeID | Node ID Type. |
TGraphID | Graph ID Type. |
Constructors
| Edit this page View SourceStoreVirtualGraphPersistenceWrapper(IStorageProvider, IVirtualRdfProvider<TNodeID, TGraphID>, IGraph, bool)
Creates a new Store Graph Persistence Wrapper for Virtualized Nodes.
Declaration
protected StoreVirtualGraphPersistenceWrapper(IStorageProvider manager, IVirtualRdfProvider<TNodeID, TGraphID> provider, IGraph g, bool writeOnly)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Generic IO Manager. |
IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider. |
IGraph | g | Graph with virtualized Nodes to wrap. |
bool | writeOnly | Whether to operate in write-only mode. |
Remarks
Note: In order to operate in write-only mode the IStorageProvider must support triple level updates indicated by it returning true to its UpdateSupported property and the Graph to be wrapped must be an empty Graph.
StoreVirtualGraphPersistenceWrapper(IStorageProvider, IVirtualRdfProvider<TNodeID, TGraphID>, IGraph, Uri, bool)
Creates a new Store Graph Persistence Wrapper for Virtualized Nodes.
Declaration
[Obsolete("Replaced by StoreVirtualGraphPersistenceWrapper(IStorageProvider, IVirtualRdfProvider, IGraph, bool)")]
public StoreVirtualGraphPersistenceWrapper(IStorageProvider manager, IVirtualRdfProvider<TNodeID, TGraphID> provider, IGraph g, Uri graphUri, bool writeOnly)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Generic IO Manager. |
IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider. |
IGraph | g | Graph with virtualized Nodes to wrap. |
Uri | graphUri | Graph URI (the URI the Graph will be persisted as). |
bool | writeOnly | Whether to operate in write-only mode. |
Remarks
Note: In order to operate in write-only mode the IStorageProvider must support triple level updates indicated by it returning true to its UpdateSupported property and the Graph to be wrapped must be an empty Graph.
Fields
| Edit this page View Source_provider
Virtual RDF Provider.
Declaration
protected readonly IVirtualRdfProvider<TNodeID, TGraphID> _provider
Field Value
Type | Description |
---|---|
IVirtualRdfProvider<TNodeID, TGraphID> |
Methods
| Edit this page View SourceAssert(Triple)
Asserts a Triple after virtualization in the Graph.
Declaration
public override bool Assert(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceContainsTriple(Triple)
Gets whether the virtualized form of a given Triple exists in this Graph.
Declaration
public override bool ContainsTriple(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple to test. |
Returns
Type | Description |
---|---|
bool | Triple is known to the Graph. |
Overrides
| Edit this page View SourceCreateVirtual(IVirtualRdfProvider<TNodeID, TGraphID>, INode)
Converts a standard INode to a virtualized node with a pre-materialized value.
Declaration
protected abstract INode CreateVirtual(IVirtualRdfProvider<TNodeID, TGraphID> provider, INode preMaterializedValue)
Parameters
Type | Name | Description |
---|---|---|
IVirtualRdfProvider<TNodeID, TGraphID> | provider | Virtual RDF Provider, the object, e.g. a storage manger, that provides virtualization of nodes. |
INode | preMaterializedValue | Node that has to be converted to it's virtualized form with itself as materialized value. Usually a parsed Literal or Uri. |
Returns
Type | Description |
---|---|
INode |
Retract(Triple)
Retracts a Triple after virtualization from the Graph.
Declaration
public override bool Retract(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceVirtualizeNode(INode)
Virtualizes a Node.
Declaration
protected INode VirtualizeNode(INode n)
Parameters
Type | Name | Description |
---|---|---|
INode | n | Node to be virtualized. |
Returns
Type | Description |
---|---|
INode | The Node in its virtual form. Itself, if it was already virtual. |
VirtualizeTriple(Triple)
Converts subject, predicate and object of a given Triple to their respective virtualized forms.
Declaration
protected Triple VirtualizeTriple(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple to virtualize. |
Returns
Type | Description |
---|---|
Triple | The virtualized Triple. Itself, if it was already virtual. |