C# Class VDS.RDF.Storage.BlazegraphConnector

Class for connecting to a Blazegraph Store
Inheritance: BaseAsyncHttpConnector, IAsyncQueryableTimeoutStorage, IQueryableTimeoutStorage, IConfigurationSerializable, IAsyncTransactionalStorage, ITransactionalStorage
Exibir arquivo Open project: skywalkery/blazegraph-dotnetrdf0

Protected Properties

Property Type Description
_activeTrans string
_baseUri string
_writer VDS.RDF.Writing.TriGWriter
transLock object

Public Methods

Method Description
Begin ( ) : void

Begins a new Transaction

A single transaction

Begin ( AsyncStorageCallback callback, object state ) : void

Begins a transaction asynchronously

BlazegraphConnector ( string baseUri ) : System

Creates a new Connection to a Blazegraph store with default namespace

BlazegraphConnector ( string baseUri, string ns ) : System

Creates a new Connection to a Blazegraph store

Commit ( ) : void

Commits the active Transaction

Transactions are scoped to Managed Threads

Commit ( AsyncStorageCallback callback, object state ) : void

Commits a transaction asynchronously

DeleteGraph ( Uri graphUri ) : void

Deletes a Graph from the Blazegraph store

DeleteGraph ( string graphUri ) : void

Deletes a Graph from the Blazegraph store

DeleteGraph ( string graphUri, AsyncStorageCallback callback, object state ) : void

Deletes a Graph from the Store

Dispose ( ) : void
ListGraphs ( ) : IEnumerable

Gets the list of Graphs in the Blazegraph store

LoadGraph ( IGraph g, Uri graphUri ) : void

Loads a Graph from the Store

If an empty/null URI is specified then the Default Graph of the Store will be loaded

LoadGraph ( IGraph g, string graphUri ) : void

Loads a Graph from the Store

If an empty/null Uri is specified then the Default Graph of the Store will be loaded

LoadGraph ( IRdfHandler handler, Uri graphUri ) : void

Loads a Graph from the Store

If an empty/null URI is specified then the Default Graph of the Store will be loaded

LoadGraph ( IRdfHandler handler, string graphUri ) : void

Loads a Graph from the Store

If an empty/null URI is specified then the Default Graph of the Store will be loaded

LoadGraph ( IRdfHandler handler, string graphUri, AsyncStorageCallback callback, object state ) : void

Loads a Graph from the Store asynchronously

Query ( String sparqlQuery ) : object

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use

Query ( string sparqlQuery, long timeoutMilliseconds ) : object

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use

Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery ) : void

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided

Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state ) : void

Queries the store asynchronously

Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state, long timeoutMilliseconds ) : void

Queries the store asynchronously

Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, long timeoutMilliseconds ) : void

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided

Query ( string sparqlQuery, AsyncStorageCallback callback, object state ) : void

Queries the store asynchronously

Query ( string sparqlQuery, AsyncStorageCallback callback, object state, long timeoutMilliseconds ) : void

Queries the store asynchronously

Rollback ( ) : void

Rolls back the active Transaction

Transactions are scoped to Managed Threads

Rollback ( AsyncStorageCallback callback, object state ) : void

Rolls back a transaction asynchronously

SaveGraph ( IGraph g ) : void

Saves a Graph into the Store (see remarks for notes on merge/overwrite behaviour)

If the Graph has no URI then the contents will be appended to the Store's Default Graph. If the Graph has a URI then existing Graph associated with that URI will be replaced. To append to a named Graph use the UpdateGraph() method instead

SaveGraph ( IGraph g, AsyncStorageCallback callback, object state ) : void

Saves a Graph to the Store asynchronously

SerializeConfiguration ( VDS.RDF.Configuration.ConfigurationSerializationContext context ) : void

Serializes the connection's configuration

ToString ( ) : string

Gets a String which gives details of the Connection

UpdateGraph ( Uri graphUri, IEnumerable additions, IEnumerable removals ) : void

Updates a Graph in the Blazegraph Store

UpdateGraph ( string graphUri, IEnumerable additions, IEnumerable removals ) : void

Updates a Graph in the Blazegraph store

UpdateGraph ( string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void

Updates a Graph in the Store asychronously

Protected Methods

Method Description
BeginTransaction ( ) : string
CommitTransaction ( string tID ) : void
CreateRequest ( string servicePath, string accept, string method, string>.Dictionary requestParams, bool withNS = true ) : HttpWebRequest

Helper method for creating HTTP Requests to the Store

DeleteGraphAsync ( bool autoCommit, string graphUri, AsyncStorageCallback callback, object state ) : void
RollbackTransaction ( string tID ) : void
SaveGraphAsync ( IGraph g, AsyncStorageCallback callback, object state ) : void
SaveGraphAsync ( bool autoCommit, IGraph g, AsyncStorageCallback callback, object state ) : void
UpdateGraphAsync ( bool autoCommit, string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void
UpdateGraphAsync ( string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void

Method Details

Begin() public method

Begins a new Transaction
A single transaction
public Begin ( ) : void
return void

Begin() public method

Begins a transaction asynchronously
public Begin ( AsyncStorageCallback callback, object state ) : void
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

BeginTransaction() protected method

protected BeginTransaction ( ) : string
return string

BlazegraphConnector() public method

Creates a new Connection to a Blazegraph store with default namespace
public BlazegraphConnector ( string baseUri ) : System
baseUri string
return System

BlazegraphConnector() public method

Creates a new Connection to a Blazegraph store
public BlazegraphConnector ( string baseUri, string ns ) : System
baseUri string
ns string Namespace
return System

Commit() public method

Commits the active Transaction
Transactions are scoped to Managed Threads
Thrown if there is not an active Transaction on the current Thread
public Commit ( ) : void
return void

Commit() public method

Commits a transaction asynchronously
public Commit ( AsyncStorageCallback callback, object state ) : void
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

CommitTransaction() protected method

protected CommitTransaction ( string tID ) : void
tID string
return void

CreateRequest() protected method

Helper method for creating HTTP Requests to the Store
protected CreateRequest ( string servicePath, string accept, string method, string>.Dictionary requestParams, bool withNS = true ) : HttpWebRequest
servicePath string Path to the Service requested
accept string Acceptable Content Types
method string HTTP Method
requestParams string>.Dictionary Querystring Parameters
withNS bool
return System.Net.HttpWebRequest

DeleteGraph() public method

Deletes a Graph from the Blazegraph store
public DeleteGraph ( Uri graphUri ) : void
graphUri System.Uri URI of the Graph to delete
return void

DeleteGraph() public method

Deletes a Graph from the Blazegraph store
public DeleteGraph ( string graphUri ) : void
graphUri string URI of the Graph to delete
return void

DeleteGraph() public method

Deletes a Graph from the Store
public DeleteGraph ( string graphUri, AsyncStorageCallback callback, object state ) : void
graphUri string URI of the Graph to delete
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

DeleteGraphAsync() protected method

protected DeleteGraphAsync ( bool autoCommit, string graphUri, AsyncStorageCallback callback, object state ) : void
autoCommit bool
graphUri string
callback AsyncStorageCallback
state object
return void

Dispose() public method

public Dispose ( ) : void
return void

ListGraphs() public method

Gets the list of Graphs in the Blazegraph store
public ListGraphs ( ) : IEnumerable
return IEnumerable

LoadGraph() public method

Loads a Graph from the Store
If an empty/null URI is specified then the Default Graph of the Store will be loaded
public LoadGraph ( IGraph g, Uri graphUri ) : void
g IGraph Graph to load into
graphUri System.Uri URI of the Graph to load
return void

LoadGraph() public method

Loads a Graph from the Store
If an empty/null Uri is specified then the Default Graph of the Store will be loaded
public LoadGraph ( IGraph g, string graphUri ) : void
g IGraph Graph to load into
graphUri string Uri of the Graph to load
return void

LoadGraph() public method

Loads a Graph from the Store
If an empty/null URI is specified then the Default Graph of the Store will be loaded
public LoadGraph ( IRdfHandler handler, Uri graphUri ) : void
handler IRdfHandler RDF Handler
graphUri System.Uri URI of the Graph to load
return void

LoadGraph() public method

Loads a Graph from the Store
If an empty/null URI is specified then the Default Graph of the Store will be loaded
public LoadGraph ( IRdfHandler handler, string graphUri ) : void
handler IRdfHandler RDF Handler
graphUri string URI of the Graph to load
return void

LoadGraph() public method

Loads a Graph from the Store asynchronously
public LoadGraph ( IRdfHandler handler, string graphUri, AsyncStorageCallback callback, object state ) : void
handler IRdfHandler Handler to load with
graphUri string URI of the Graph to load
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

Query() public method

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use
public Query ( String sparqlQuery ) : object
sparqlQuery String Sparql Query
return object

Query() public method

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use
public Query ( string sparqlQuery, long timeoutMilliseconds ) : object
sparqlQuery string Sparql Query
timeoutMilliseconds long Query timeout in milliseconds
return object

Query() public method

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided
public Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery ) : void
rdfHandler IRdfHandler RDF Handler
resultsHandler ISparqlResultsHandler Results Handler
sparqlQuery string SPARQL Query
return void

Query() public method

Queries the store asynchronously
public Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state ) : void
rdfHandler IRdfHandler RDF Handler
resultsHandler ISparqlResultsHandler Results Handler
sparqlQuery string SPARQL Query
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

Query() public method

Queries the store asynchronously
public Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state, long timeoutMilliseconds ) : void
rdfHandler IRdfHandler RDF Handler
resultsHandler ISparqlResultsHandler Results Handler
sparqlQuery string SPARQL Query
callback AsyncStorageCallback Callback
state object State to pass to the callback
timeoutMilliseconds long Query timeout in milliseconds
return void

Query() public method

Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided
public Query ( IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, long timeoutMilliseconds ) : void
rdfHandler IRdfHandler RDF Handler
resultsHandler ISparqlResultsHandler Results Handler
sparqlQuery string SPARQL Query
timeoutMilliseconds long Query timeout in milliseconds
return void

Query() public method

Queries the store asynchronously
public Query ( string sparqlQuery, AsyncStorageCallback callback, object state ) : void
sparqlQuery string SPARQL Query
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

Query() public method

Queries the store asynchronously
public Query ( string sparqlQuery, AsyncStorageCallback callback, object state, long timeoutMilliseconds ) : void
sparqlQuery string SPARQL Query
callback AsyncStorageCallback Callback
state object State to pass to the callback
timeoutMilliseconds long Query timeout in milliseconds
return void

Rollback() public method

Rolls back the active Transaction
Transactions are scoped to Managed Threads
Thrown if there is not an active Transaction on the current Thread
public Rollback ( ) : void
return void

Rollback() public method

Rolls back a transaction asynchronously
public Rollback ( AsyncStorageCallback callback, object state ) : void
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

RollbackTransaction() protected method

protected RollbackTransaction ( string tID ) : void
tID string
return void

SaveGraph() public method

Saves a Graph into the Store (see remarks for notes on merge/overwrite behaviour)

If the Graph has no URI then the contents will be appended to the Store's Default Graph. If the Graph has a URI then existing Graph associated with that URI will be replaced. To append to a named Graph use the UpdateGraph() method instead

public SaveGraph ( IGraph g ) : void
g IGraph Graph to save
return void

SaveGraph() public method

Saves a Graph to the Store asynchronously
public SaveGraph ( IGraph g, AsyncStorageCallback callback, object state ) : void
g IGraph Graph to save
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

SaveGraphAsync() protected method

protected SaveGraphAsync ( IGraph g, AsyncStorageCallback callback, object state ) : void
g IGraph
callback AsyncStorageCallback
state object
return void

SaveGraphAsync() protected method

protected SaveGraphAsync ( bool autoCommit, IGraph g, AsyncStorageCallback callback, object state ) : void
autoCommit bool
g IGraph
callback AsyncStorageCallback
state object
return void

SerializeConfiguration() public method

Serializes the connection's configuration
public SerializeConfiguration ( VDS.RDF.Configuration.ConfigurationSerializationContext context ) : void
context VDS.RDF.Configuration.ConfigurationSerializationContext Configuration Serialization Context
return void

ToString() public method

Gets a String which gives details of the Connection
public ToString ( ) : string
return string

UpdateGraph() public method

Updates a Graph in the Blazegraph Store
public UpdateGraph ( Uri graphUri, IEnumerable additions, IEnumerable removals ) : void
graphUri System.Uri Uri of the Graph to update
additions IEnumerable Triples to be added
removals IEnumerable Triples to be removed
return void

UpdateGraph() public method

Updates a Graph in the Blazegraph store
public UpdateGraph ( string graphUri, IEnumerable additions, IEnumerable removals ) : void
graphUri string Uri of the Graph to update
additions IEnumerable Triples to be added
removals IEnumerable Triples to be removed
return void

UpdateGraph() public method

Updates a Graph in the Store asychronously
public UpdateGraph ( string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void
graphUri string URI of the Graph to update
additions IEnumerable Triples to be added
removals IEnumerable Triples to be removed
callback AsyncStorageCallback Callback
state object State to pass to the callback
return void

UpdateGraphAsync() protected method

protected UpdateGraphAsync ( bool autoCommit, string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void
autoCommit bool
graphUri string
additions IEnumerable
removals IEnumerable
callback AsyncStorageCallback
state object
return void

UpdateGraphAsync() protected method

protected UpdateGraphAsync ( string graphUri, IEnumerable additions, IEnumerable removals, AsyncStorageCallback callback, object state ) : void
graphUri string
additions IEnumerable
removals IEnumerable
callback AsyncStorageCallback
state object
return void

Property Details

_activeTrans protected_oe property

protected string _activeTrans
return string

_baseUri protected_oe property

protected string _baseUri
return string

_writer protected_oe property

protected TriGWriter,VDS.RDF.Writing _writer
return VDS.RDF.Writing.TriGWriter

transLock protected_oe property

protected object transLock
return object