Show / Hide Table of Contents

Class VirtuosoConnector

A connector for accessing the native Virtuoso Quad Store.

Inheritance
System.Object
BaseAsyncSafeConnector
VirtuosoConnectorBase
VirtuosoConnector
Implements
IAsyncStorageProvider
ITransactionalStorage
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 VirtuosoConnector : VirtuosoConnectorBase, IAsyncStorageProvider, ITransactionalStorage, 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.

This class supports user-controlled transactions via to ITransactionalStorage interface. Calls to methods outside of a user-controlled transaction will take place in their own transaction which will be auto-committed on success if required.

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(Uri, IEnumerable<Triple>, IEnumerable<Triple>) 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.

The bulk update operations on a graph: SaveGraph(IGraph), and DeleteGraph(Uri) will autocommit their updates regardless of the use of Begin(), Commit() or Rollback(). This is default Virtuoso behaviour which enables these methods to handle updates on large graphs.

Constructors

| Improve this Doc View Source

VirtuosoConnector(String)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoConnector(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

VirtuosoConnector(String, Int32, String, String, String, Int32)

Creates a Manager for a Virtuoso Native Quad Store.

Declaration
public VirtuosoConnector(string server, int port, string db, string user, string password, int timeout = 0)
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

VirtuosoConnector(String, String, String, Int32)

Creates a Manager for a Virtuoso Native Quad Store.

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

Database Name.

System.String user

Username.

System.String password

Password.

System.Int32 timeout

Connection Timeout in Seconds.

Methods

| Improve this Doc View Source

Begin()

Begins a transaction.

Declaration
public void Begin()
| Improve this Doc View Source

Commit()

Commits a transaction.

Declaration
public void Commit()
| Improve this Doc View Source

Dispose()

Disposes of the Store.

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

LoadGraph(IGraph, String)

Loads a Graph from the 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)
Remarks

If the Graph being loaded into is Empty then it's Base Uri should become the Uri of the Graph being loaded, otherwise it should be merged into the existing non-empty Graph whose Base Uri should be unaffected.

Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.

| Improve this Doc View Source

LoadGraph(IGraph, Uri)

Declaration
public override void LoadGraph(IGraph g, Uri graphUri)
Parameters
Type Name Description
IGraph g
Uri graphUri
| Improve this Doc View Source

LoadGraph(IRdfHandler, String)

Loads a Graph from the Store.

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

Handler to load with.

System.String graphUri

URI of the Graph to load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, String)
Remarks

Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.

| Improve this Doc View Source

Rollback()

Rolls back a transaction.

Declaration
public void Rollback()
| Improve this Doc View Source

SaveGraph(IGraph)

Saves a Graph to the Store.

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

Graph to save.

Overrides
BaseAsyncSafeConnector.SaveGraph(IGraph)
Remarks

This implementation of this method uses Virtuoso's row auto-commit feature to allow loading large graphs. This means that the graph will be committed to the Virtuoso server, regardless of the use of Begin() and Commit() or Rollback() to control the transaction.

| Improve this Doc View Source

ToString()

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

Update(String)

Processes a SPARQL Update command against the underlying Store.

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

SPARQL Update.

Overrides
VirtuosoConnectorBase.Update(String)

Implements

IAsyncStorageProvider
ITransactionalStorage
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
System.IDisposable
IConfigurationSerializable

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.ToSafeString(Object)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • VirtuosoConnector(String)
    • VirtuosoConnector(String, Int32, String, String, String, Int32)
    • VirtuosoConnector(String, String, String, Int32)
  • Methods
    • Begin()
    • Commit()
    • Dispose()
    • LoadGraph(IGraph, String)
    • LoadGraph(IGraph, Uri)
    • LoadGraph(IRdfHandler, String)
    • Rollback()
    • SaveGraph(IGraph)
    • ToString()
    • Update(String)
  • Implements
  • Extension Methods
Back to top Generated by DocFX