Interface IPatternItemFactory
Interface for creating PatternItem instances.
Namespace: VDS.RDF.Query.Builder
Assembly: dotNetRdf.dll
Syntax
public interface IPatternItemFactory
Methods
| Edit this page View SourceCreateBlankNodeMatchPattern(string)
Create a pattern item that matches a specific blank node.
Declaration
PatternItem CreateBlankNodeMatchPattern(string blankNodeIdentifier)
Parameters
Type | Name | Description |
---|---|---|
string | blankNodeIdentifier | The blank node identifier to match. |
Returns
Type | Description |
---|---|
PatternItem |
CreateLiteralNodeMatchPattern(object)
Create a pattern item that matches a literal value.
Declaration
PatternItem CreateLiteralNodeMatchPattern(object literal)
Parameters
Type | Name | Description |
---|---|---|
object | literal | The value to match as a literal. |
Returns
Type | Description |
---|---|
PatternItem |
Remarks
If literal
is a DateTime or DateTimeOffset then the literal pattern will use the appropriate XML Schema-compatible string representation as the literal value. For all other types, the value returned by the ToString method will be used as the literal value.
CreateLiteralNodeMatchPattern(object, string)
Create a pattern item that matches a literal value with an associated language tag.
Declaration
PatternItem CreateLiteralNodeMatchPattern(object literal, string langSpec)
Parameters
Type | Name | Description |
---|---|---|
object | literal | The literal value to match. |
string | langSpec | The language tag to match. |
Returns
Type | Description |
---|---|
PatternItem |
Remarks
If literal
is a DateTime or DateTimeOffset then the literal pattern will use the appropriate XML Schema-compatible string representation as the literal value. For all other types, the value returned by the ToString method will be used as the literal value.
CreateLiteralNodeMatchPattern(object, Uri)
Create a pattern item that matches a literal value with its associated datatype.
Declaration
PatternItem CreateLiteralNodeMatchPattern(object literal, Uri datatype)
Parameters
Type | Name | Description |
---|---|---|
object | literal | The literal value to match. |
Uri | datatype | The literal datatype URI to match. |
Returns
Type | Description |
---|---|
PatternItem |
Remarks
If literal
is a DateTime or DateTimeOffset then the literal pattern will use the appropriate XML Schema-compatible string representation as the literal value. For all other types, the value returned by the ToString method will be used as the literal value.
CreateNodeMatchPattern(string, INamespaceMapper)
Create a URI node pattern.
Declaration
PatternItem CreateNodeMatchPattern(string qName, INamespaceMapper namespaceMapper)
Parameters
Type | Name | Description |
---|---|---|
string | qName | The CURIE representation of the URI. |
INamespaceMapper | namespaceMapper | The mapper to use when resolving the prefix part of the CURIE. |
Returns
Type | Description |
---|---|
PatternItem |
CreateNodeMatchPattern(Uri)
Create a URI node pattern.
Declaration
PatternItem CreateNodeMatchPattern(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The URI for the pattern item. |
Returns
Type | Description |
---|---|
PatternItem |
CreateNodeMatchPattern(INode)
Create a pattern item that matches the specified node.
Declaration
PatternItem CreateNodeMatchPattern(INode node)
Parameters
Type | Name | Description |
---|---|---|
INode | node | The node to match. |
Returns
Type | Description |
---|---|
PatternItem |
CreatePatternItem(Type, string, INamespaceMapper)
Create a pattern item that matches a node of a specific type.
Declaration
PatternItem CreatePatternItem(Type nodeType, string patternString, INamespaceMapper namespaceMapper)
Parameters
Type | Name | Description |
---|---|---|
Type | nodeType | The type of node to match. Must be one of IBlankNode, ILiteralNode, IUriNode or IVariableNode. |
string | patternString | The string value of the pattern item. |
INamespaceMapper | namespaceMapper | The namespace mapper to use when resolving any prefixes in |
Returns
Type | Description |
---|---|
PatternItem |
Remarks
It is recommended to use one of the CreateXxxNodeMatchPattern methods in preference to this method.
CreateVariablePattern(string)
Create a variable pattern item.
Declaration
PatternItem CreateVariablePattern(string variableName)
Parameters
Type | Name | Description |
---|---|---|
string | variableName | The name of the variable. |
Returns
Type | Description |
---|---|
PatternItem |