Class RdfAPatternCopyingHandler
A handler which captures RDFa Pattern resources and rdfa:copy properties during processing and emits pattern copies at the end of processing.
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class RdfAPatternCopyingHandler : IWrappingRdfHandler, IRdfHandler, INodeFactory
  Remarks
This streaming implementation will only capture pattern triples that are emitted after declaration of the rdfa:Pattern type for the pattern resource is encountered or after an rdfa:copy triple with the pattern as its object is encountered.
Constructors
| Edit this page View SourceRdfAPatternCopyingHandler(IRdfHandler)
Create a new RDFa Pattern Copying handler that wraps the specified inner handler.
Declaration
public RdfAPatternCopyingHandler(IRdfHandler inner)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IRdfHandler | inner | The inner handler to receive all events emitted by this handler.  | 
      
Properties
| Edit this page View SourceAcceptsAll
Gets whether the Handler will always handle all data (i.e. won't terminate parsing early).
Declaration
public bool AcceptsAll { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
BaseUri
Get or set the base URI used to resolve relative URI references.
Declaration
public Uri BaseUri { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Uri | 
InnerHandlers
Gets the Inner Handlers used by this Handler.
Declaration
public IEnumerable<IRdfHandler> InnerHandlers { get; }
  Property Value
| Type | Description | 
|---|---|
| IEnumerable<IRdfHandler> | 
LanguageTagValidation
Get or set the type of validation to apply to language tags when creating language-tagged literal nodes.
Declaration
public LanguageTagValidationMode LanguageTagValidation { get; set; }
  Property Value
| Type | Description | 
|---|---|
| LanguageTagValidationMode | 
NamespaceMap
Get the namespace map for this node factory.
Declaration
public INamespaceMapper NamespaceMap { get; }
  Property Value
| Type | Description | 
|---|---|
| INamespaceMapper | 
NormalizeLiteralValues
Get or set the flag that controls whether the value strings of literal nodes should be normalized on creation.
Declaration
public bool NormalizeLiteralValues { get; set; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
UriFactory
Get or set the factory to use when creating URIs.
Declaration
public IUriFactory UriFactory { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IUriFactory | 
Methods
| Edit this page View SourceCreateBlankNode()
Creates a Blank Node with a new automatically generated ID.
Declaration
public IBlankNode CreateBlankNode()
  Returns
| Type | Description | 
|---|---|
| IBlankNode | 
CreateBlankNode(string)
Creates a Blank Node with the given Node ID.
Declaration
public IBlankNode CreateBlankNode(string nodeId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | nodeId | Node ID.  | 
      
Returns
| Type | Description | 
|---|---|
| IBlankNode | 
CreateGraphLiteralNode()
Creates a Graph Literal Node which represents the empty Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode()
  Returns
| Type | Description | 
|---|---|
| IGraphLiteralNode | 
CreateGraphLiteralNode(IGraph)
Creates a Graph Literal Node which represents the given Subgraph.
Declaration
public IGraphLiteralNode CreateGraphLiteralNode(IGraph subgraph)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IGraph | subgraph | Subgraph.  | 
      
Returns
| Type | Description | 
|---|---|
| IGraphLiteralNode | 
CreateLiteralNode(string)
Creates a Literal Node with the given Value.
Declaration
public ILiteralNode CreateLiteralNode(string literal)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | literal | Value of the Literal.  | 
      
Returns
| Type | Description | 
|---|---|
| ILiteralNode | 
CreateLiteralNode(string, string)
Creates a Literal Node with the given Value and Language.
Declaration
public ILiteralNode CreateLiteralNode(string literal, string langSpec)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | literal | Value of the Literal.  | 
      
| string | langSpec | Language Specifier for the Literal.  | 
      
Returns
| Type | Description | 
|---|---|
| ILiteralNode | 
CreateLiteralNode(string, Uri)
Creates a Literal Node with the given Value and Data Type.
Declaration
public ILiteralNode CreateLiteralNode(string literal, Uri datatype)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | literal | Value of the Literal.  | 
      
| Uri | datatype | Data Type URI of the Literal.  | 
      
Returns
| Type | Description | 
|---|---|
| ILiteralNode | 
CreateTripleNode(Triple)
Creates a node that quotes the given triple.
Declaration
public ITripleNode CreateTripleNode(Triple triple)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Triple | triple | The triple to be the quoted value of the created node.  | 
      
Returns
| Type | Description | 
|---|---|
| ITripleNode | 
CreateUriNode()
Creates a URI Node that corresponds to the current Base URI of the node factory.
Declaration
public IUriNode CreateUriNode()
  Returns
| Type | Description | 
|---|---|
| IUriNode | 
CreateUriNode(string)
Creates a URI Node for the given QName using the Graphs NamespaceMap to resolve the QName.
Declaration
public IUriNode CreateUriNode(string qName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | qName | QName.  | 
      
Returns
| Type | Description | 
|---|---|
| IUriNode | 
CreateUriNode(Uri)
Creates a URI Node for the given URI.
Declaration
public IUriNode CreateUriNode(Uri uri)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Uri | uri | URI.  | 
      
Returns
| Type | Description | 
|---|---|
| IUriNode | 
CreateVariableNode(string)
Creates a Variable Node for the given Variable Name.
Declaration
public IVariableNode CreateVariableNode(string varName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | varName | 
Returns
| Type | Description | 
|---|---|
| IVariableNode | 
EndRdf(bool)
End the Handling of RDF.
Declaration
public void EndRdf(bool ok)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | ok | Whether parsing finished without error.  | 
      
GetNextBlankNodeID()
Creates a new unused Blank Node ID and returns it.
Declaration
public string GetNextBlankNodeID()
  Returns
| Type | Description | 
|---|---|
| string | 
HandleBaseUri(Uri)
Handles a Base URI Definition.
Declaration
public bool HandleBaseUri(Uri baseUri)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Uri | baseUri | Base URI.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | Should return true if parsing should continue or false if it should be aborted.  | 
      
HandleNamespace(string, Uri)
Handles a Namespace Definition.
Declaration
public bool HandleNamespace(string prefix, Uri namespaceUri)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | prefix | Namespace Prefix.  | 
      
| Uri | namespaceUri | Namespace URI.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | Should return true if parsing should continue or false if it should be aborted.  | 
      
HandleQuad(Triple, IRefNode)
Handles a Quad (Triple + Graph).
Declaration
public bool HandleQuad(Triple t, IRefNode graph)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Triple | t | Triple.  | 
      
| IRefNode | graph | The name of the graph containing the triple.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | Should return true if parsing should continue or false if it should be aborted.  | 
      
HandleTriple(Triple)
Handles a Triple.
Declaration
public bool HandleTriple(Triple t)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Triple | t | Triple.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | Should return true if parsing should continue or false if it should be aborted.  | 
      
ResolveQName(string)
Resolve a QName to a URI using this factory's NamespaceMap and BaseUri.
Declaration
public Uri ResolveQName(string qName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | qName | 
Returns
| Type | Description | 
|---|---|
| Uri | 
StartRdf()
Start the Handling of RDF.
Declaration
public void StartRdf()
  Exceptions
| Type | Condition | 
|---|---|
| RdfParseException | May be thrown if the Handler is already in use and the implementation is not thread-safe.  |