Class SparqlParameterizedString
A SPARQL Parameterized String is a String that can contain parameters in the same fashion as a SQL command string.
Inheritance
System.Object
SparqlParameterizedString
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)
Assembly: dotNetRDF.dll
Syntax
public class SparqlParameterizedString
Constructors
|
Improve this Doc
View Source
SparqlParameterizedString()
Creates a new empty parameterized String.
Declaration
public SparqlParameterizedString()
|
Improve this Doc
View Source
SparqlParameterizedString(String)
Creates a new parameterized String.
Declaration
public SparqlParameterizedString(string command)
Parameters
| Type |
Name |
Description |
| System.String |
command |
Command Text. |
Properties
|
Improve this Doc
View Source
BaseUri
Gets/Sets the Base URI which will be used to prepend BASE declarations to the command.
Declaration
public Uri BaseUri { get; set; }
Property Value
| Type |
Description |
| System.Uri |
|
|
Improve this Doc
View Source
CommandText
Gets/Sets the parameterized Command Text.
Declaration
public virtual string CommandText { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Namespaces
Gets/Sets the Namespace Map that is used to prepend PREFIX declarations to the command.
Declaration
public INamespaceMapper Namespaces { get; set; }
Property Value
|
Improve this Doc
View Source
Parameters
Gets an enumeration of the Parameters for which Values have been set.
Declaration
public IEnumerable<KeyValuePair<string, INode>> Parameters { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, INode>> |
|
|
Improve this Doc
View Source
QueryProcessor
Gets/Sets the Query processor which is used when you call the
ExecuteQuery() method.
Declaration
public ISparqlQueryProcessor QueryProcessor { get; set; }
Property Value
|
Improve this Doc
View Source
UpdateProcessor
Gets/Sets the Query processor which is used when you call the
ExecuteUpdate() method.
Declaration
public ISparqlUpdateProcessor UpdateProcessor { get; set; }
Property Value
|
Improve this Doc
View Source
Variables
Gets an enumeration of the Variables for which Values have been set.
Declaration
public IEnumerable<KeyValuePair<string, INode>> Variables { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, INode>> |
|
Methods
|
Improve this Doc
View Source
Append(String)
Appends the given text to the existing command text, any prefixes in the command are moved to the parent query.
Declaration
public void Append(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
Text. |
|
Improve this Doc
View Source
Append(SparqlParameterizedString)
Appends the given text to the existing command text, any prefixes in the sub-query are moved to the parent query but any parameter/variable assignments will be lost.
Declaration
public void Append(SparqlParameterizedString text)
Parameters
|
Improve this Doc
View Source
AppendSubQuery(SparqlParameterizedString)
Appends the given query as a sub-query to the existing command text, any prefixes in the sub-query are moved to the parent query but any parameter/variable assignments will be lost.
Declaration
public void AppendSubQuery(SparqlParameterizedString query)
Parameters
|
Improve this Doc
View Source
AppendSubQuery(SparqlQuery)
Appends the given query as a sub-query to the existing command text, any prefixes in the sub-query are moved to the parent query.
Declaration
public void AppendSubQuery(SparqlQuery query)
Parameters
|
Improve this Doc
View Source
Clear()
Clears all set Parameters and Variables.
Declaration
public virtual void Clear()
|
Improve this Doc
View Source
ClearParameters()
Clears all set Parameters.
Declaration
public virtual void ClearParameters()
|
Improve this Doc
View Source
ClearVariables()
Clears all set Variables.
Declaration
public virtual void ClearVariables()
|
Improve this Doc
View Source
ExecuteQuery()
Executes this command as a query.
Declaration
public SparqlResultSet ExecuteQuery()
Returns
|
Improve this Doc
View Source
ExecuteQuery(IRdfHandler, ISparqlResultsHandler)
Executes this command as a query.
Declaration
public void ExecuteQuery(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler)
Parameters
|
Improve this Doc
View Source
ExecuteUpdate()
Executes this command as an update.
Declaration
public void ExecuteUpdate()
|
Improve this Doc
View Source
SetBlankNode(String)
Sets the Parameter to be a new anonymous Blank Node.
Declaration
public void SetBlankNode(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
|
Improve this Doc
View Source
SetBlankNode(String, String)
Sets the Parameter to be a Blank Node with the given ID.
Declaration
public void SetBlankNode(string name, string value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.String |
value |
Node ID. |
|
Improve this Doc
View Source
SetLiteral(String, Boolean)
Sets the Parameter to a Boolean Literal.
Declaration
public void SetLiteral(string name, bool value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Boolean |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, DateTime)
Sets the Parameter to a Date Time Literal.
Declaration
public void SetLiteral(string name, DateTime value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.DateTime |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, DateTime, Boolean)
Sets the Parameter to a Date Time Literal.
Declaration
public void SetLiteral(string name, DateTime value, bool precise)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.DateTime |
value |
Integer. |
| System.Boolean |
precise |
Whether to preserve precisely i.e. include fractional seconds. |
|
Improve this Doc
View Source
SetLiteral(String, DateTimeOffset)
Sets the Parameter to a Date Time Literal.
Declaration
public void SetLiteral(string name, DateTimeOffset value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.DateTimeOffset |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, DateTimeOffset, Boolean)
Sets the Parameter to a Date Time Literal.
Declaration
public void SetLiteral(string name, DateTimeOffset value, bool precise)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.DateTimeOffset |
value |
Integer. |
| System.Boolean |
precise |
Whether to preserve precisely i.e. include fractional seconds. |
|
Improve this Doc
View Source
SetLiteral(String, Decimal)
Sets the Parameter to a Decimal Literal.
Declaration
public void SetLiteral(string name, decimal value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Decimal |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, Double)
Sets the Parameter to a Double Literal.
Declaration
public void SetLiteral(string name, double value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Double |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, Int16)
Sets the Parameter to an Integer Literal.
Declaration
public void SetLiteral(string name, short value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Int16 |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, Int32)
Sets the Parameter to an Integer Literal.
Declaration
public void SetLiteral(string name, int value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Int32 |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, Int64)
Sets the Parameter to an Integer Literal.
Declaration
public void SetLiteral(string name, long value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Int64 |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, Single)
Sets the Parameter to a Float Literal.
Declaration
public void SetLiteral(string name, float value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Single |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, String)
Sets the Parameter to an Untyped Literal.
Declaration
public void SetLiteral(string name, string value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.String |
value |
Integer. |
|
Improve this Doc
View Source
SetLiteral(String, String, String)
Sets the Parameter to a Literal with a Language Specifier.
Declaration
public void SetLiteral(string name, string value, string lang)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.String |
value |
Integer. |
| System.String |
lang |
Language Specifier. |
|
Improve this Doc
View Source
SetLiteral(String, String, Uri)
Sets the Parameter to a Typed Literal.
Declaration
public void SetLiteral(string name, string value, Uri datatype)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.String |
value |
Integer. |
| System.Uri |
datatype |
Datatype URI. |
|
Improve this Doc
View Source
SetLiteral(String, TimeSpan)
Sets the Parameter to a Duration Literal.
Declaration
public void SetLiteral(string name, TimeSpan value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.TimeSpan |
value |
Integer. |
|
Improve this Doc
View Source
SetParameter(String, INode)
Sets the Value of a Parameter.
Declaration
public void SetParameter(string name, INode value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter Name. |
| INode |
value |
Value. |
|
Improve this Doc
View Source
SetUri(String, Uri)
Sets the Parameter to a URI.
Declaration
public void SetUri(string name, Uri value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter. |
| System.Uri |
value |
URI. |
|
Improve this Doc
View Source
SetVariable(String, INode)
Sets the Value of a Variable.
Declaration
public virtual void SetVariable(string name, INode value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Variable Name. |
| INode |
value |
Value. |
|
Improve this Doc
View Source
ToString()
Returns the actual Query/Update String with parameter and variable values inserted.
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
UnsetParameter(String)
Removes a previously set value for a Parameter.
Declaration
public void UnsetParameter(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Parameter Name. |
|
Improve this Doc
View Source
UnsetVariable(String)
Removes a previously set value for a Variable.
Declaration
public void UnsetVariable(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
Variable Name. |
Extension Methods