Show / Hide Table of Contents

Class VirtuosoManager

A Manager for accessing the Native Virtuoso Quad Store.

Inheritance
System.Object
BaseAsyncSafeConnector
VirtuosoConnectorBase
VirtuosoManager
Implements
IAsyncStorageProvider
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
System.IDisposable
IConfigurationSerializable
Inherited Members
VirtuosoConnectorBase.DefaultPort
VirtuosoConnectorBase.DefaultDB
VirtuosoConnectorBase.IsReady
VirtuosoConnectorBase.IsReadOnly
VirtuosoConnectorBase.IOBehaviour
VirtuosoConnectorBase.UpdateSupported
VirtuosoConnectorBase.DeleteSupported
VirtuosoConnectorBase.ListGraphsSupported
VirtuosoConnectorBase.HasOpenConnection
VirtuosoConnectorBase.HasActiveTransaction
VirtuosoConnectorBase._dbServer
VirtuosoConnectorBase._dbName
VirtuosoConnectorBase._dbUser
VirtuosoConnectorBase._dbPassword
VirtuosoConnectorBase._dbPort
VirtuosoConnectorBase._dbTimeout
VirtuosoConnectorBase._db
VirtuosoConnectorBase._dbTransaction
VirtuosoConnectorBase._keepOpen
VirtuosoConnectorBase._customConnectionString
VirtuosoConnectorBase._formatter
VirtuosoConnectorBase.LoadGraph(IRdfHandler, Uri)
VirtuosoConnectorBase.Open(Boolean, IsolationLevel)
VirtuosoConnectorBase.Close(Boolean, Boolean)
VirtuosoConnectorBase.SaveGraphInternal(IGraph)
VirtuosoConnectorBase.ExecuteNonQuery(String)
VirtuosoConnectorBase.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
VirtuosoConnectorBase.UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>)
VirtuosoConnectorBase.UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
VirtuosoConnectorBase.DeleteGraph(Uri)
VirtuosoConnectorBase.DeleteGraph(String)
VirtuosoConnectorBase.ListGraphs()
VirtuosoConnectorBase.ListGraphNames()
VirtuosoConnectorBase.SerializeConfiguration(ConfigurationSerializationContext)
VirtuosoConnectorBase.Query(String)
VirtuosoConnectorBase.Query(IRdfHandler, ISparqlResultsHandler, String)
VirtuosoConnectorBase.LoadNode(INodeFactory, Object)
VirtuosoConnectorBase.UnmarshalName(IRefNode)
VirtuosoConnectorBase.UnmarshalUri(Uri)
BaseAsyncSafeConnector.ParentServer
BaseAsyncSafeConnector.AsyncParentServer
BaseAsyncSafeConnector.UriFactory
BaseAsyncSafeConnector.LoadGraph(IGraph, Uri)
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, Uri)
BaseAsyncSafeConnector.UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
BaseAsyncSafeConnector.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
BaseAsyncSafeConnector.UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>)
BaseAsyncSafeConnector.DeleteGraph(Uri)
BaseAsyncSafeConnector.LoadGraph(IGraph, Uri, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.LoadGraph(IGraph, String, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, Uri, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, String, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.LoadGraphAsync(IGraph, String, CancellationToken)
BaseAsyncSafeConnector.LoadGraphAsync(IRdfHandler, String, CancellationToken)
BaseAsyncSafeConnector.SaveGraph(IGraph, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.SaveGraphAsync(IGraph, CancellationToken)
BaseAsyncSafeConnector.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.UpdateGraphAsync(String, IEnumerable<Triple>, IEnumerable<Triple>, CancellationToken)
BaseAsyncSafeConnector.DeleteGraph(Uri, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.DeleteGraph(String, AsyncStorageCallback, Object)
BaseAsyncSafeConnector.DeleteGraphAsync(String, CancellationToken)
BaseAsyncSafeConnector.ListGraphs(AsyncStorageCallback, Object)
BaseAsyncSafeConnector.ListGraphsAsync(CancellationToken)
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.Data.Virtuoso.dll
Syntax
public class VirtuosoManager : VirtuosoConnectorBase, IAsyncStorageProvider, IUpdateableStorage, IQueryableStorage, IStorageProvider, IStorageCapabilities, IConfigurationSerializable
Remarks

This class implements IStorageProvider allowing it to be used with any of the general classes that support this interface as well as the Virtuoso specific classes.

Although this class takes a Database Name to ensure compatibility with any Virtuoso installation (i.e. this allows for the Native Quad Store to be in a non-standard database) generally you should always specify DB as the Database Name parameter.

Virtuoso automatically assigns IDs to Blank Nodes input into it, these IDs are not based on the actual Blank Node ID so inputting a Blank Node with the same ID multiple times will result in multiple Nodes being created in Virtuoso. This means that data containing Blank Nodes which is stored to Virtuoso and then retrieved will have different Blank Node IDs to those input. In addition there is no guarantee that when you save a Graph containing Blank Nodes into Virtuoso that retrieving it will give the same Blank Node IDs even if the Graph being saved was originally retrieved from Virtuoso. Finally please see the remarks on the UpdateGraph() method which deal with how insertion and deletion of triples containing blank nodes into existing graphs operates.

You can use a null Uri or an empty String as a Uri to indicate that operations should affect the Default Graph. Where the argument is only a Graph a null Name property indicates that the Graph affects the Default Graph.

Constructors

| Improve this Doc View Source

VirtuosoManager(String)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoManager(string connectionString)
Parameters
Type Name Description
System.String connectionString

Connection String.

Remarks

Allows the end user to specify a customized connection string.

| Improve this Doc View Source

VirtuosoManager(String, Int32, String, String, String)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoManager(string server, int port, string db, string user, string password)
Parameters
Type Name Description
System.String server

Server.

System.Int32 port

Port.

System.String db

Database Name.

System.String user

Username.

System.String password

Password.

| Improve this Doc View Source

VirtuosoManager(String, Int32, String, String, String, Int32)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoManager(string server, int port, string db, string user, string password, int timeout)
Parameters
Type Name Description
System.String server

Server.

System.Int32 port

Port.

System.String db

Database Name.

System.String user

Username.

System.String password

Password.

System.Int32 timeout

Connection Timeout in Seconds.

Remarks

Timeouts less than equal to zero are ignored and treated as using the default timeout which is dictated by the underlying Virtuoso ADO.Net provider.

| Improve this Doc View Source

VirtuosoManager(String, String, String)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoManager(string db, string user, string password)
Parameters
Type Name Description
System.String db

Database Name.

System.String user

Username.

System.String password

Password.

Remarks

Assumes the Server is on the localhost and the port is the default installation port of 1111.

| Improve this Doc View Source

VirtuosoManager(String, String, String, Int32)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoManager(string db, string user, string password, int timeout)
Parameters
Type Name Description
System.String db

Database Name.

System.String user

Username.

System.String password

Password.

System.Int32 timeout

Connection Timeout in Seconds.

Remarks

Assumes the Server is on the localhost and the port is the default installation port of 1111.

Methods

| Improve this Doc View Source

Dispose()

Disposes of the Manager.

Declaration
public override void Dispose()
Overrides
BaseAsyncSafeConnector.Dispose()
| Improve this Doc View Source

LoadGraph(IGraph, String)

Loads a Graph from the Quad Store.

Declaration
public override void LoadGraph(IGraph g, string graphUri)
Parameters
Type Name Description
IGraph g

Graph to load into.

System.String graphUri

URI of the Graph to Load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IGraph, String)
| Improve this Doc View Source

LoadGraph(IGraph, Uri)

Loads a Graph from the Quad Store.

Declaration
public override void LoadGraph(IGraph g, Uri graphUri)
Parameters
Type Name Description
IGraph g

Graph to load into.

Uri graphUri

URI of the Graph to Load.

| Improve this Doc View Source

LoadGraph(IRdfHandler, String)

Loads a Graph from the Quad Store.

Declaration
public override void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler.

System.String graphUri

URI of the Graph to Load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, String)
| Improve this Doc View Source

SaveGraph(IGraph)

Saves a Graph into the Quad Store (Warning: Completely replaces any existing Graph with the same URI).

Declaration
public override void SaveGraph(IGraph g)
Parameters
Type Name Description
IGraph g

Graph to save.

Overrides
BaseAsyncSafeConnector.SaveGraph(IGraph)
Remarks

Completely replaces any previously saved Graph with the same Graph URI.

| Improve this Doc View Source

ToString()

Gets a String which gives details of the Connection.

Declaration
public override string ToString()
Returns
Type Description
System.String
| Improve this Doc View Source

Update(String)

Executes a SPARQL Update on the native Quad Store.

Declaration
public override void Update(string sparqlUpdate)
Parameters
Type Name Description
System.String sparqlUpdate

SPARQL Update to execute.

Overrides
VirtuosoConnectorBase.Update(String)
Remarks

This method will first attempt to parse the update into a SparqlUpdateCommandSet object. If this succeeds then each command in the command set will be issued to Virtuoso.

If the parsing fails then the update will be executed anyway using Virtuoso's SPASQL (SPARQL + SQL) syntax. Parsing can fail because Virtuoso supports various SPARQL extensions which the library does not support and primarily supports SPARUL updates (the precusor to SPARQL 1.1 Update).

Exceptions
Type Condition
SparqlUpdateException

Thrown if an error occurs in making the update.

Implements

IAsyncStorageProvider
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
System.IDisposable
IConfigurationSerializable

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.ToSafeString(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX