Class WriteToStoreHandler
A RDF Handler which writes the Triples being parsed directly to a IStorageProvider in batches provided the manager supports the UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>) method.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRDF.dll
Syntax
public class WriteToStoreHandler : BaseRdfHandler, IRdfHandler, INodeFactory
Constructors
| Improve this Doc 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, Int32)
Creates a new Write to Store Handler.
Declaration
public WriteToStoreHandler(IStorageProvider manager, int batchSize)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager to write to. |
System.Int32 | 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, Uri, Int32)
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. |
System.Int32 | batchSize | Batch Size. |
Fields
| Improve this Doc View SourceDefaultBatchSize
Default Batch Size for writes.
Declaration
public const int DefaultBatchSize = 1000
Field Value
Type | Description |
---|---|
System.Int32 |
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(Boolean)
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 SourceHandleTripleInternal(Triple)
Handles Triples by queuing them for writing and enacting the writing if the Batch Size has been reached/exceeded.
Declaration
protected override bool HandleTripleInternal(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
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()