Class WriteToStoreHandler
A RDF Handler which writes the Triples being parsed directly to a IStorageProvider in batches provided the manager supports the UpdateGraph() method.
Inherited Members
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRdf.dll
Syntax
public class WriteToStoreHandler : BaseRdfHandler, IRdfHandler, INodeFactory
Constructors
| Improve this Doc View SourceWriteToStoreHandler(IStorageProvider, int)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager, int batchSize)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
int | batchSize | Batch Size. |
WriteToStoreHandler(IStorageProvider, Uri, int)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager, Uri defaultGraphUri, int batchSize)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
System.Uri | defaultGraphUri | Graph URI to write Triples from the default graph to. |
int | batchSize | Batch Size. |
WriteToStoreHandler(IStorageProvider, Uri)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager, Uri defaultGraphUri)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
System.Uri | defaultGraphUri | Graph URI to write Triples from the default graph to. |
WriteToStoreHandler(IStorageProvider)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
Fields
| Improve this Doc View SourceDefaultBatchSize
Default Batch Size for writes.
Declaration
public const int DefaultBatchSize = 1000
Field Value
Type | Description |
---|---|
int |
Properties
| Improve this Doc View SourceAcceptsAll
Gets that the Handler accepts all Triples.
Declaration
public override bool AcceptsAll { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
| Improve this Doc View SourceEndRdfInternal(bool)
Ends RDF Handling by ensuring the queue of Triples to write has been processed.
Declaration
protected override void EndRdfInternal(bool ok)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ok | Indicates whether parsing completed without error. |
Overrides
| Improve this Doc View SourceHandleQuadInternal(Triple, IRefNode)
Handles quads by queuing them for writing and enacting the writing if the Batch Size has been reached/exceeded.
Declaration
protected override bool HandleQuadInternal(Triple t, IRefNode graph)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
IRefNode | graph | The graph containing the triple. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceHandleTripleInternal(Triple)
Handles triples by passing them to HandleQuadInternal(Triple, IRefNode) for queuing, passing null as the target graph name.
Declaration
protected override bool HandleTripleInternal(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple to handle. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceStartRdfInternal()
Starts RDF Handling by ensuring the queue of Triples to write is empty.
Declaration
protected override void StartRdfInternal()