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, ICommentRdfHandler, IRdfHandler, INodeFactory
Constructors
| Edit this page View SourceWriteToStoreHandler(IStorageProvider)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
WriteToStoreHandler(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)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager, Uri defaultGraphUri)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
Uri | defaultGraphUri | Graph URI to write Triples from the default graph to. |
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. |
Uri | defaultGraphUri | Graph URI to write Triples from the default graph to. |
int | batchSize | Batch Size. |
Fields
| Edit this page View SourceDefaultBatchSize
Default Batch Size for writes.
Declaration
public const int DefaultBatchSize = 1000
Field Value
Type | Description |
---|---|
int |
Properties
| Edit this page View SourceAcceptsAll
Gets that the Handler accepts all Triples.
Declaration
public override bool AcceptsAll { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
| Edit this page 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 |
---|---|---|
bool | ok | Indicates whether parsing completed without error. |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page View SourceStartRdfInternal()
Starts RDF Handling by ensuring the queue of Triples to write is empty.
Declaration
protected override void StartRdfInternal()