Class PagingHandler
A RDF Handler which wraps another handler passing only the chunk of triples falling within a given limit and offset to the underlying Handler.
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 PagingHandler : BaseRdfHandler, IWrappingRdfHandler, IRdfHandler, INodeFactory
Remarks
This handler does not guarantee that you will receive exactly the chunk specified by the limit and offset for two reasons:.
- It does not perform any sort of data de-duplication so it is possible that if this handler receives duplicate triples and the underlying handler performs de-duplication then you may see less triples than you expect in your final output since although the underlying handler will receive at most the specified chunk size of triples it may not retain them all
- If there are fewer triples than the chunk size or if the chunk exceeds the bounds of the data then you will only receive the triples that fall within the chunk (if any)
Constructors
| Improve this Doc View SourcePagingHandler(IRdfHandler, Int32)
Creates a new Paging Handler.
Declaration
public PagingHandler(IRdfHandler handler, int limit)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | Inner Handler to use. |
System.Int32 | limit | Limit. |
PagingHandler(IRdfHandler, Int32, Int32)
Creates a new Paging Handler.
Declaration
public PagingHandler(IRdfHandler handler, int limit, int offset)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | Inner Handler to use. |
System.Int32 | limit | Limit. |
System.Int32 | offset | Offset. |
Remarks
If you just want to use an offset and not apply a limit then set limit to be less than zero.
Properties
| Improve this Doc View SourceAcceptsAll
Gets whether the Handler will accept all Triples based on its Limit setting.
Declaration
public override bool AcceptsAll { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceInnerHandlers
Gets the Inner Handler wrapped by this Handler.
Declaration
public IEnumerable<IRdfHandler> InnerHandlers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IRdfHandler> |
Methods
| Improve this Doc View SourceEndRdfInternal(Boolean)
Ends RDF Handler.
Declaration
protected override void EndRdfInternal(bool ok)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ok | Indicated whether parsing completed without error. |
Overrides
| Improve this Doc View SourceHandleBaseUriInternal(Uri)
Handles Base URI Declarations by allowing the inner handler to handle it.
Declaration
protected override bool HandleBaseUriInternal(Uri baseUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | baseUri | Base URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceHandleNamespaceInternal(String, Uri)
Handles Namespace Declarations by allowing the inner handler to handle it.
Declaration
protected override bool HandleNamespaceInternal(string prefix, Uri namespaceUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Namespace Prefix. |
System.Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceHandleTripleInternal(Triple)
Handles a Triple by passing it to the Inner Handler only if the Offset has been passed and the Limit has yet to be reached.
Declaration
protected override bool HandleTripleInternal(Triple t)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | Triple. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Terminates handling immediately upon the reaching of the limit.
|
Improve this Doc
View Source
StartRdfInternal()
Starts RDF Handler.
Declaration
protected override void StartRdfInternal()