• User Guide
  • API Documentation
  • Tools
  • Developer Guide
  • Support
  • API Documentation
  • VDS.RDF.Query
  • SparqlParameterizedString
Show / Hide Table of Contents
  • System.Web.UI
    • HtmlTextWriter
    • HtmlTextWriterAttribute
    • HtmlTextWriterStyle
    • HtmlTextWriterTag
  • VDS.RDF
    • AbstractIndexedTripleCollection
    • AsyncError
    • BaseBlankNode
    • BaseDemandGraphCollection
    • BaseEndpoint
    • BaseGraph
    • BaseGraphCollection
    • BaseGraphLiteralNode
    • BaseLiteralNode
    • BaseNode
    • BaseTripleCollection
    • BaseTripleComparer
    • BaseTripleNode
    • BaseTripleStore
    • BaseUriNode
    • BaseVariableNode
    • BasicTripleContext
    • BlankNode
    • BlankNodeMapper
    • BlankNodeOutputMapper
    • CachingUriFactory
    • CancellableGraphEventArgs
    • CancellableGraphEventHandler
    • ComparisonHelper
    • DiskDemandGraphCollection
    • DiskDemandTripleStore
    • EqualityHelper
    • Extensions
    • FastNodeComparer
    • FastVirtualNodeComparer
    • FileGraphPersistenceWrapper
    • FullTripleComparer
    • Graph
    • GraphCallback
    • GraphCollection
    • GraphDiff
    • GraphDiffReport
    • GraphDiffReportExtensions
    • GraphEventArgs
    • GraphEventHandler
    • GraphExtensions
    • GraphFactory
    • GraphLiteralNode
    • GraphMatcher
    • GraphPersistenceAction
    • GraphPersistenceActionType
    • GraphPersistenceWrapper
    • GraphSizeComparer
    • GraphWrapperNode
    • HttpMode
    • IBlankNode
    • IGraph
    • IGraphLiteralNode
    • IInferencingTripleStore
    • IInMemoryQueryableStore
    • ILiteralNode
    • INamespaceMapper
    • INativelyQueryableStore
    • INestedNamespaceMapper
    • InferencingTripleStore
    • InMemoryExtensions
    • INode
    • INodeFactory
    • IObjectParser<T>
    • IRdfHandler
    • IRdfReader
    • IRdfWriter
    • IRefNode
    • ISparqlResultsHandler
    • ISparqlResultsReader
    • ISparqlResultsWriter
    • ISparqlUpdateTripleStore
    • IStoreReader
    • IStoreWriter
    • ITransactionalGraph
    • ITransactionalStore
    • ITripleContext
    • ITripleIndex
    • ITripleNode
    • ITripleStore
    • IUpdateableTripleStore
    • IUriFactory
    • IUriNode
    • IVariableNode
    • IWrappingRdfHandler
    • LiteralEqualityMode
    • LiteralExtensions
    • LiteralNode
    • MimeTypeDefinition
    • MimeTypeSelector
    • MimeTypesHelper
    • NamespaceCallback
    • NamespaceChanged
    • NamespaceMapper
    • NestedNamespaceMapper
    • NodeFactory
    • NodeFactoryOptions
    • NodeListCallback
    • NodeType
    • NonIndexedGraph
    • NonIndexedThreadSafeGraph
    • ObjectComparer
    • ObjectSubjectComparer
    • Options
    • PersistentTripleStore
    • PredicateComparer
    • PredicateObjectComparer
    • QNameMapping
    • QNameOutputMapper
    • QueryableGraph
    • QueryCallback
    • RdfException
    • RdfHandlerCallback
    • RdfReaderWarning
    • RdfWriterWarning
    • SimpleTripleStore
    • SparqlResultsCallback
    • SparqlResultsHandlerCallback
    • SparqlWarning
    • StoreGraphPersistenceWrapper
    • StoreReaderWarning
    • StoreWriterWarning
    • StringExtensions
    • SubjectComparer
    • SubjectObjectComparer
    • SubjectPredicateComparer
    • SubTreeIndexedTripleCollection
    • ThreadSafeGraph
    • ThreadSafeGraphCollection
    • ThreadSafeQNameOutputMapper
    • ThreadSafeTripleCollection
    • ThreadSafeTripleStore
    • Tools
    • TreeIndexedTripleCollection
    • Triple
    • TripleCollection
    • TripleEqualityComparer
    • TripleEventArgs
    • TripleEventHandler
    • TripleIndexType
    • TripleNode
    • TriplePersistenceAction
    • TripleRefs
    • TripleStore
    • TripleStoreCallback
    • TripleStoreEventArgs
    • TripleStoreEventHandler
    • TripleStoreExtensions
    • TripleStorePersistenceAction
    • UnionGraph
    • UnionTripleCollection
    • UnregisteredRdfWriterTypeException
    • UpdateCallback
    • UriComparer
    • UriFactory
    • UriNode
    • VariableContext
    • VariableContextType
    • VariableNode
    • WebDemandGraphCollection
    • WebDemandTripleStore
    • WrapperGraph
    • WrapperGraphCollection
    • WrapperNode
    • WrapperTripleCollection
    • WrapperTripleStore
  • VDS.RDF.Configuration
    • CollectionFactory
    • ConfigurationLoader
    • ConfigurationManagerSettingsProvider
    • ConfigurationSerializationContext
    • CredentialsFactory
    • DatasetFactory
    • DotNetRdfConfigurationException
    • ExpressionFactoryFactory
    • FullTextObjectFactory
    • GraphFactory
    • IConfigurationExtension
    • IConfigurationLoader
    • IConfigurationSerializable
    • InferencingStoreFactory
    • IObjectFactory
    • IPathResolver
    • ISettingsProvider
    • ObjectFactoryFactory
    • OperatorFactory
    • OptimiserFactory
    • ParserFactory
    • PermissionFactory
    • PropertyFunctionFactoryFactory
    • ProxyFactory
    • QueryProcessorFactory
    • ReasonerFactory
    • SparqlClientFactory
    • SparqlEndpointFactory
    • StorageFactory
    • StoreFactory
    • UpdateProcessorFactory
    • UserGroupFactory
    • WriterFactory
  • VDS.RDF.Configuration.Permissions
    • IPermission
    • Permission
    • PermissionModel
    • PermissionSet
    • UserGroup
  • VDS.RDF.Data.DataTables
    • DataTableHandler
    • GraphExtensions
    • SparqlResultSetExtensions
  • VDS.RDF.Dynamic
    • DynamicExtensions
    • DynamicGraph
    • DynamicNode
    • DynamicObjectCollection
    • DynamicObjectCollection<T>
    • DynamicSparqlResult
    • DynamicSparqlResultSet
    • DynamicSubjectCollection
    • DynamicSubjectCollection<T>
  • VDS.RDF.JsonLd
    • DefaultDocumentLoader
    • IBlankNodeGenerator
    • INodeMapGenerator
    • IRemoteContextProvider
    • JsonLdContext
    • JsonLdErrorCode
    • JsonLdLoaderOptions
    • JsonLdProcessor
    • JsonLdProcessorException
    • JsonLdProcessorOptions
    • JsonLdProcessorWarning
    • JsonLdRemoteContext
    • JsonLdTermDefinition
    • RemoteContextProvider
    • RemoteDocument
  • VDS.RDF.JsonLd.Processors
    • BlankNodeGenerator
    • NodeMapGenerator
  • VDS.RDF.JsonLd.Syntax
    • JsonLdContainer
    • JsonLdEmbed
    • JsonLdKeywords
    • JsonLdProcessingMode
    • JsonLdRdfDirectionMode
    • JsonLdSyntax
    • JsonLdVocabulary
    • LanguageDirection
  • VDS.RDF.Nodes
    • BooleanNode
    • ByteNode
    • DateNode
    • DateTimeNode
    • DecimalNode
    • DoubleNode
    • FloatNode
    • IValuedNode
    • LongNode
    • NumericNode
    • SignedByteNode
    • StringNode
    • TimeSpanNode
    • UnsignedLongNode
    • ValuedNodeExtensions
  • VDS.RDF.Ontology
    • Individual
    • Ontology
    • OntologyClass
    • OntologyGraph
    • OntologyHelper
    • OntologyProperty
    • OntologyResource
    • RdfOntologyException
    • ReasonerGraph
  • VDS.RDF.Parsing
    • BaseGZipDatasetParser
    • BaseGZipParser
    • BaseGZipResultsParser
    • BaseSparqlResultsReader
    • BlockingTextReader
    • BufferedTextReader
    • DataUriLoader
    • EmbeddedResourceLoader
    • FileLoader
    • GZippedJsonLdParser
    • GZippedNotation3Parser
    • GZippedNQuadsParser
    • GZippedNTriplesParser
    • GZippedRdfAParser
    • GZippedRdfJsonParser
    • GZippedRdfXmlParser
    • GZippedSparqlCsvParser
    • GZippedSparqlJsonParser
    • GZippedSparqlTsvParser
    • GZippedSparqlXmlParser
    • GZippedTriGParser
    • GZippedTriXParser
    • GZippedTurtleParser
    • IRdfAVocabulary
    • IriSpecsHelper
    • ITokenisingParser
    • ITraceableParser
    • ITraceableTokeniser
    • IUriLoaderCache
    • JsonLdParser
    • LanguageTag
    • Loader
    • NonBlockingTextReader
    • Notation3Parser
    • NQuadsParser
    • NQuadsSyntax
    • NTriplesParser
    • NTriplesSyntax
    • ParserHelper
    • ParsingTextReader
    • PositionInfo
    • RdfAParser
    • RdfAParserBase<THtmlDocument, TElement, TNode, TAttribute>
    • RdfASyntax
    • RdfJsonParser
    • RdfParseException
    • RdfParserSelectionException
    • RdfParsingTerminatedException
    • RdfSpecsHelper
    • RdfThreadedParsingException
    • RdfXmlParser
    • RdfXmlParserMode
    • RdfXmlParseType
    • RdfXmlSpecsHelper
    • SparqlBooleanParser
    • SparqlCsvParser
    • SparqlJsonParser
    • SparqlQueryParser
    • SparqlQuerySyntax
    • SparqlRdfParser
    • SparqlTsvParser
    • SparqlUpdateParser
    • SparqlXmlParser
    • StringParser
    • TermMappings
    • TriGParser
    • TriGSyntax
    • TriXParser
    • TurtleParser
    • TurtleSpecsHelper
    • TurtleSyntax
    • UnicodeSpecsHelper
    • UriLoader
    • XHtmlRdfAVocabulary
    • XmlSpecsHelper
  • VDS.RDF.Parsing.Contexts
    • BaseParserContext
    • BaseResultsParserContext
    • BaseStoreParserContext
    • IEventParserContext<T>
    • IncompleteTriple
    • IncompleteTripleDirection
    • IParserContext
    • IResultsParserContext
    • IStoreParserContext
    • ITokenisingParserContext
    • JsonParserContext
    • Notation3ParserContext
    • RdfAEvaluationContext
    • RdfAParserContext<THtmlDocument>
    • RdfXmlParserContext
    • SparqlJsonParserContext
    • SparqlQueryParserContext
    • SparqlRdfParserContext
    • SparqlUpdateParserContext
    • SparqlXmlParserContext
    • TokenisingParserContext
    • TokenisingResultParserContext
    • TokenisingStoreParserContext
    • TriGParserContext
    • TurtleParserContext
  • VDS.RDF.Parsing.Events
    • BaseEvent
    • BaseEventQueue<T>
    • BaseRdfAEvent
    • BaseRdfXmlEvent
    • EventQueue<T>
    • IEvent
    • IEventGenerator<T>
    • IEventQueue<T>
    • IJitEventGenerator<T>
    • IPreProcessingEventGenerator<TEvent, TContext>
    • IRdfAEvent
    • IRdfXmlEvent
    • IRdfXmlJitEventGenerator
    • IRdfXmlPreProcessingEventGenerator
    • StreamingEventQueue<T>
    • SublistEventQueue<T>
  • VDS.RDF.Parsing.Events.RdfXml
    • AttributeEvent
    • BlankNodeIDEvent
    • DomBasedEventGenerator
    • ElementEvent
    • EndElementEvent
    • LanguageAttributeEvent
    • NamespaceAttributeEvent
    • ParseTypeAttributeEvent
    • PlainLiteralEvent
    • QNameEvent
    • RdfXmlEvent
    • RootEvent
    • StreamingEventGenerator
    • TextEvent
    • TypedLiteralEvent
    • UriReferenceEvent
    • XmlBaseAttributeEvent
  • VDS.RDF.Parsing.Handlers
    • AnyHandler
    • BaseHandler
    • BaseRdfHandler
    • BaseResultsHandler
    • CancellableHandler
    • ChainedHandler
    • CountHandler
    • GraphHandler
    • GraphUriRewriteHandler
    • HandlerExtensions
    • ListStringsHandler
    • ListUrisHandler
    • MergingResultSetHandler
    • MultiHandler
    • MultisetHandler
    • NullHandler
    • PagingHandler
    • ResultCountHandler
    • ResultSetHandler
    • ResultWriteThroughHandler
    • StoreCountHandler
    • StoreHandler
    • StripStringHandler
    • UniqueBlankNodesHandler
    • WriteThroughHandler
    • WriteToStoreHandler
  • VDS.RDF.Parsing.Tokens
    • AbsKeywordToken
    • AddKeywordToken
    • AllKeywordToken
    • AllToken
    • AndToken
    • AscKeywordToken
    • AsKeywordToken
    • AskKeywordToken
    • AssignmentToken
    • AsynchronousBufferedTokenQueue
    • ATToken
    • AvgKeywordToken
    • BaseDirectiveToken
    • BaseToken
    • BaseTokeniser
    • BaseTokenQueue
    • BindingsKeywordToken
    • BindKeywordToken
    • BitwiseOrToken
    • BlankNodeCollectionToken
    • BlankNodeToken
    • BlankNodeWithIDToken
    • BNodeKeywordToken
    • BOFToken
    • BoundKeywordToken
    • BufferedTokenQueue
    • CallKeywordToken
    • CeilKeywordToken
    • ClearKeywordToken
    • CoalesceKeywordToken
    • CommaToken
    • CommentToken
    • ConcatKeywordToken
    • ConstructKeywordToken
    • CopyKeywordToken
    • CountKeywordToken
    • CreateKeywordToken
    • CsvTokeniser
    • CustomKeywordDefinitionToken
    • CustomKeywordToken
    • DataKeywordToken
    • DataTypeKeywordToken
    • DataTypeToken
    • DayKeywordToken
    • DefaultKeywordToken
    • DeleteKeywordToken
    • DescKeywordToken
    • DescribeKeywordToken
    • DistinctKeywordToken
    • DivideToken
    • DotToken
    • DropKeywordToken
    • EncodeForUriKeywordToken
    • EndAnnotationToken
    • EndQuoteToken
    • EOFToken
    • EOLToken
    • EqualityToken
    • ExclamationToken
    • ExistsKeywordToken
    • FilterKeywordToken
    • FloorKeywordToken
    • ForAllQuantifierToken
    • ForSomeQuantifierToken
    • FromKeywordToken
    • FromNamedKeywordToken
    • GraphKeywordToken
    • GraphLiteralToken
    • GreaterThanOrEqualToToken
    • GreaterThanToken
    • GroupByKeywordToken
    • GroupConcatKeywordToken
    • HashToken
    • HatHatToken
    • HatToken
    • HavingKeywordToken
    • HoursKeywordToken
    • IfKeywordToken
    • ImpliedByToken
    • ImpliesToken
    • InKeywordToken
    • InsertKeywordToken
    • IntoKeywordToken
    • IriKeywordToken
    • IsBlankKeywordToken
    • IsIriKeywordToken
    • IsLiteralKeywordToken
    • IsNumericKeywordToken
    • IsTripleKeywordToken
    • IsUriKeywordToken
    • IToken
    • ITokeniser
    • ITokenQueue
    • KeywordAToken
    • KeywordDirectiveToken
    • KeywordIsToken
    • KeywordOfToken
    • LangKeywordToken
    • LangMatchesKeywordToken
    • LanguageSpecifierToken
    • LCaseKeywordToken
    • LeftBracketToken
    • LeftCurlyBracketToken
    • LeftSquareBracketToken
    • LengthKeywordToken
    • LessThanOrEqualToToken
    • LessThanToken
    • LetKeywordToken
    • LimitKeywordToken
    • LiteralToken
    • LiteralWithDataTypeToken
    • LiteralWithLanguageSpecifierToken
    • LoadKeywordToken
    • LongLiteralToken
    • MaxKeywordToken
    • MD5KeywordToken
    • MedianKeywordToken
    • MinKeywordToken
    • MinusKeywordToken
    • MinusToken
    • MinutesKeywordToken
    • ModeKeywordToken
    • MonthKeywordToken
    • MoveKeywordToken
    • MultiplyToken
    • NamedKeywordToken
    • NegationToken
    • NonTokenisedTokenQueue
    • Notation3Tokeniser
    • NotEqualsToken
    • NotExistsKeywordToken
    • NotInKeywordToken
    • NowKeywordToken
    • NTriplesTokeniser
    • NumericMaxKeywordToken
    • NumericMinKeywordToken
    • ObjectKeywordToken
    • OffsetKeywordToken
    • OptionalKeywordToken
    • OrderByKeywordToken
    • OrToken
    • PathToken
    • PlainLiteralToken
    • PlusToken
    • PredicateKeywordToken
    • PrefixDirectiveToken
    • PrefixToken
    • QNameToken
    • QuestionToken
    • QuotedTripleToken
    • RandKeywordToken
    • ReducedKeywordToken
    • RegexKeywordToken
    • ReplaceKeywordToken
    • RightBracketToken
    • RightCurlyBracketToken
    • RightSquareBracketToken
    • RoundKeywordToken
    • SameTermKeywordToken
    • SampleKeywordToken
    • SecondsKeywordToken
    • SelectKeywordToken
    • SemicolonToken
    • SeparatorKeywordToken
    • ServiceKeywordToken
    • Sha1KeywordToken
    • Sha224KeywordToken
    • Sha256KeywordToken
    • Sha384KeywordToken
    • Sha512KeywordToken
    • SilentKeywordToken
    • SparqlTokeniser
    • StartAnnotationToken
    • StartQuoteToken
    • StrAfterKeywordToken
    • StrBeforeKeywordToken
    • StrContainsKeywordToken
    • StrDtKeywordToken
    • StrEndsKeywordToken
    • StrKeywordToken
    • StrLangKeywordToken
    • StrLenKeywordToken
    • StrStartsKeywordToken
    • StrUUIDKeywordToken
    • SubjectKeywordToken
    • SubStrKeywordToken
    • SumKeywordToken
    • TabToken
    • TimezoneKeywordToken
    • Token
    • TokeniserEscapeMode
    • TokenQueue
    • TokenQueueMode
    • ToKeywordToken
    • TriGTokeniser
    • TripleKeywordToken
    • TsvTokeniser
    • TurtleTokeniser
    • TZKeywordToken
    • UCaseKeywordToken
    • UndefKeywordToken
    • UnderscoreToken
    • UnionKeywordToken
    • UnsaidKeywordToken
    • UriKeywordToken
    • UriToken
    • UsingKeywordToken
    • UUIDKeywordToken
    • ValuesKeywordToken
    • VariableToken
    • WhereKeywordToken
    • WithKeywordToken
    • YearKeywordToken
  • VDS.RDF.Parsing.Validation
    • ISyntaxValidationResults
    • ISyntaxValidator
    • RdfDatasetSyntaxValidator
    • RdfStrictSyntaxValidator
    • RdfSyntaxValidator
    • SparqlQueryValidator
    • SparqlResultsValidator
    • SparqlUpdateValidator
    • SyntaxValidationResults
  • VDS.RDF.Query
    • BaseSparqlView
    • BindingGroup
    • ExplainQueryProcessor
    • ExplanationLevel
    • FederatedSparqlQueryClient
    • FederatedSparqlRemoteEndpoint
    • FullTextHelper
    • GenericQueryProcessor
    • IPatternEvaluationContext
    • IProcessable
    • ISparqlAggregateProcessor<TResult, TContext, TBinding>
    • ISparqlAlgebraVisitor<T>
    • ISparqlExpressionProcessor<TResult, TContext, TBinding>
    • ISparqlExpressionVisitor<T>
    • ISparqlNodeComparer
    • ISparqlQueryAlgebraProcessor<TResult, TContext>
    • ISparqlQueryClient
    • ISparqlQueryProcessor
    • ISparqlResult
    • IVisitable
    • LeviathanLeftJoinBinder
    • LeviathanQueryOptions
    • LeviathanQueryProcessor
    • LeviathanResultBinder
    • NativeSparqlView
    • NumericTypesHelper
    • QueryProcessorBase
    • RdfQueryException
    • RdfQueryTimeoutException
    • RdfReasoningException
    • RemoteQueryProcessor
    • ResultsHandlerExtensions
    • SimpleQueryProcessor
    • SparqlEvaluationContext
    • SparqlNodeComparer
    • SparqlOrderingComparer
    • SparqlParameterizedString
    • SparqlQuery
    • SparqlQueryClient
    • SparqlQueryType
    • SparqlRemoteEndpoint
    • SparqlRemoteEndpoint.AsyncQueryWithResultGraph
    • SparqlRemoteEndpoint.AsyncQueryWithResultSet
    • SparqlResult
    • SparqlResultBinder
    • SparqlResultSet
    • SparqlResultsType
    • SparqlSpecialQueryType
    • SparqlSpecsHelper
    • SparqlVariable
    • SparqlView
  • VDS.RDF.Query.Aggregates
    • BaseAggregate
    • ISparqlAggregate
  • VDS.RDF.Query.Aggregates.Leviathan
    • AllAggregate
    • AnyAggregate
    • MedianAggregate
    • ModeAggregate
    • NoneAggregate
    • NumericMaxAggregate
    • NumericMinAggregate
  • VDS.RDF.Query.Aggregates.Sparql
    • AverageAggregate
    • CountAggregate
    • CountAllAggregate
    • CountAllDistinctAggregate
    • CountDistinctAggregate
    • GroupConcatAggregate
    • MaxAggregate
    • MinAggregate
    • SampleAggregate
    • SumAggregate
  • VDS.RDF.Query.Aggregates.XPath
    • StringJoinAggregate
  • VDS.RDF.Query.Algebra
    • AlgebraExtensions
    • Ask
    • AskAnyTriples
    • AskBgp
    • AskUnion
    • BaseArbitraryLengthPathOperator
    • BaseMultiset
    • BasePathOperator
    • BaseSet
    • Bgp
    • Bindings
    • Distinct
    • ExistsJoin
    • Extend
    • Filter
    • FilteredProduct
    • FullTextQuery
    • Graph
    • GroupBy
    • GroupMultiset
    • Having
    • IAbstractJoin
    • IBgp
    • IdentityFilter
    • IdentityMultiset
    • IExistsJoin
    • IFilter
    • IJoin
    • ILeftJoin
    • ILeviathanAlgebraExtension
    • IMinus
    • IPathOperator
    • ISet
    • ISparqlAlgebra
    • ITerminalOperator
    • IUnaryOperator
    • IUnion
    • Join
    • LazyBgp
    • LazyUnion
    • LeftJoin
    • Minus
    • Multiset
    • NegatedPropertySet
    • NullMultiset
    • NullOperator
    • OneOrMorePath
    • OrderBy
    • ParallelJoin
    • ParallelUnion
    • PartitionedMultiset
    • PropertyFunction
    • PropertyPath
    • Reduced
    • SameTermFilter
    • Select
    • SelectDistinctGraphs
    • Service
    • Set
    • SetDistinctnessComparer
    • SetExtensions
    • SingleValueRestrictionFilter
    • Slice
    • SubQuery
    • Table
    • Union
    • VariableRestrictionFilter
    • ZeroLengthPath
    • ZeroOrMorePath
  • VDS.RDF.Query.Builder
    • GraphPatternBuilder
    • GraphPatternType
    • IAggregateBuilder
    • IAssignmentVariableNamePart<T>
    • IBindingTupleBuilder
    • IDescribeBuilder
    • IDescribeGraphPatternBuilder
    • IDistinctAggregateBuilder
    • IExpressionBuilder
    • IfElsePart
    • IfThenPart
    • IGraphPatternBuilder
    • IInlineDataBuilder
    • INonAggregateExpressionBuilder
    • IPatternItemFactory
    • IQueryBuilder
    • ISelectBuilder
    • ITriplePatternBuilder
    • ITriplePatternBuilderInternal
    • QueryBuilder
    • QueryBuilderExtensions
    • SparqlCastBuilder
    • TriplePatternBuilder
    • TriplePatternObjectPart
    • TriplePatternPredicatePart
  • VDS.RDF.Query.Builder.Expressions
    • AggregateExpression
    • BlankNodeExpression
    • BooleanExpression
    • IriExpression
    • LiteralExpression
    • NumericExpression
    • NumericExpression<T>
    • PrimaryExpression<TExpression>
    • RdfTermExpression
    • SparqlExpression
    • TypedLiteralExpression<T>
    • VariableExpression
  • VDS.RDF.Query.Construct
    • ConstructContext
  • VDS.RDF.Query.Datasets
    • BaseDataset
    • BaseDemandDataset
    • BaseImmutableDataset
    • BaseImmutableQuadDataset
    • BaseQuadDataset
    • BaseTransactionalDataset
    • BaseTransactionalQuadDataset
    • DatasetGraphCollection
    • FullTextIndexedDataset
    • InMemoryDataset
    • InMemoryQuadDataset
    • ISparqlDataset
    • IThreadSafeDataset
    • QuadDatasetTripleCollection
    • WebDemandDataset
    • WrapperDataset
  • VDS.RDF.Query.Describe
    • ISparqlDescribe
    • SparqlDescriber
  • VDS.RDF.Query.Expressions
    • ArqFunctionFactory
    • BaseBinaryExpression
    • BaseUnaryExpression
    • FullTextFunctionFactory
    • IExpressionTransformer
    • ISparqlCustomExpressionFactory
    • ISparqlExpression
    • LeviathanFunctionFactory
    • PrimaryExpressionSubstituter
    • SparqlBuiltInFunctionFactory
    • SparqlExpressionFactory
    • SparqlExpressionType
    • SparqlNumericType
    • XPathFunctionFactory
  • VDS.RDF.Query.Expressions.Arithmetic
    • AdditionExpression
    • DivisionExpression
    • MinusExpression
    • MultiplicationExpression
    • SubtractionExpression
  • VDS.RDF.Query.Expressions.Comparison
    • EqualsExpression
    • GreaterThanExpression
    • GreaterThanOrEqualToExpression
    • LessThanExpression
    • LessThanOrEqualToExpression
    • NotEqualsExpression
  • VDS.RDF.Query.Expressions.Conditional
    • AndExpression
    • NotExpression
    • OrExpression
  • VDS.RDF.Query.Expressions.Functions
    • FullTextMatchFunction
    • UnknownFunction
  • VDS.RDF.Query.Expressions.Functions.Arq
    • BNodeFunction
    • EFunction
    • LocalNameFunction
    • MaxFunction
    • MinFunction
    • NamespaceFunction
    • NowFunction
    • PiFunction
    • Sha1Function
    • StringJoinFunction
    • SubstringFunction
  • VDS.RDF.Query.Expressions.Functions.Leviathan.Hash
    • MD5HashFunction
    • Sha256HashFunction
  • VDS.RDF.Query.Expressions.Functions.Leviathan.Numeric
    • CartesianFunction
    • CubeFunction
    • EFunction
    • FactorialFunction
    • LeviathanNaturalLogFunction
    • LogFunction
    • PowerFunction
    • PythagoreanDistanceFunction
    • RandomFunction
    • ReciprocalFunction
    • RootFunction
    • SquareFunction
    • SquareRootFunction
    • TenFunction
  • VDS.RDF.Query.Expressions.Functions.Leviathan.Numeric.Trigonometry
    • BaseTrigonometricFunction
    • CosecantFunction
    • CosineFunction
    • CotangentFunction
    • DegreesToRadiansFunction
    • RadiansToDegreesFunction
    • SecantFunction
    • SineFunction
    • TangentFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql
    • CallFunction
    • CoalesceFunction
    • IfElseFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.Boolean
    • BoundFunction
    • ExistsFunction
    • IsBlankFunction
    • IsIriFunction
    • IsLiteralFunction
    • IsNumericFunction
    • IsTripleFunction
    • IsUriFunction
    • LangMatchesFunction
    • RegexFunction
    • SameTermFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.Constructor
    • BNodeFunction
    • IriFunction
    • StrDtFunction
    • StrLangFunction
    • TripleFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.DateTime
    • DayFunction
    • HoursFunction
    • MinutesFunction
    • MonthFunction
    • NowFunction
    • SecondsFunction
    • TimezoneFunction
    • TZFunction
    • YearFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.Hash
    • BaseHashFunction
    • MD5HashFunction
    • Sha1HashFunction
    • Sha256HashFunction
    • Sha384HashFunction
    • Sha512HashFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.Numeric
    • AbsFunction
    • CeilFunction
    • FloorFunction
    • RandFunction
    • RoundFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.Set
    • BaseSetFunction
    • InFunction
    • NotInFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.String
    • BaseBinaryStringFunction
    • BaseUUIDFunction
    • ConcatFunction
    • ContainsFunction
    • DataType11Function
    • DataTypeFunction
    • EncodeForUriFunction
    • LangFunction
    • LCaseFunction
    • ReplaceFunction
    • StrAfterFunction
    • StrBeforeFunction
    • StrEndsFunction
    • StrFunction
    • StrLenFunction
    • StrStartsFunction
    • StrUUIDFunction
    • SubStrFunction
    • UCaseFunction
    • UUIDFunction
  • VDS.RDF.Query.Expressions.Functions.Sparql.TripleNode
    • ObjectFunction
    • PredicateFunction
    • SubjectFunction
  • VDS.RDF.Query.Expressions.Functions.XPath
    • BooleanFunction
  • VDS.RDF.Query.Expressions.Functions.XPath.Cast
    • BaseCast
    • BooleanCast
    • DateTimeCast
    • DecimalCast
    • DoubleCast
    • FloatCast
    • IntegerCast
    • StringCast
  • VDS.RDF.Query.Expressions.Functions.XPath.DateTime
    • BaseUnaryDateTimeFunction
    • DayFromDateTimeFunction
    • HoursFromDateTimeFunction
    • MinutesFromDateTimeFunction
    • MonthFromDateTimeFunction
    • SecondsFromDateTimeFunction
    • TimezoneFromDateTimeFunction
    • YearFromDateTimeFunction
  • VDS.RDF.Query.Expressions.Functions.XPath.Numeric
    • AbsFunction
    • CeilingFunction
    • FloorFunction
    • RoundFunction
    • RoundHalfToEvenFunction
  • VDS.RDF.Query.Expressions.Functions.XPath.String
    • BaseBinaryStringFunction
    • BaseUnaryStringFunction
    • CompareFunction
    • ConcatFunction
    • ContainsFunction
    • EncodeForUriFunction
    • EndsWithFunction
    • EscapeHtmlUriFunction
    • LowerCaseFunction
    • NormalizeSpaceFunction
    • NormalizeUnicodeFunction
    • ReplaceFunction
    • StartsWithFunction
    • StringLengthFunction
    • SubstringAfterFunction
    • SubstringBeforeFunction
    • SubstringFunction
    • UpperCaseFunction
  • VDS.RDF.Query.Expressions.Primary
    • AggregateTerm
    • AllModifier
    • ConstantTerm
    • DistinctModifier
    • GraphPatternTerm
    • TripleNodeTerm
    • VariableTerm
  • VDS.RDF.Query.Filters
    • BaseUnaryFilter
    • BoundFilter
    • ChainFilter
    • ISparqlFilter
    • UnaryExpressionFilter
  • VDS.RDF.Query.FullText
    • FullTextIndexException
    • FullTextQueryException
    • NamespaceDoc
  • VDS.RDF.Query.FullText.Indexing
    • BaseFullTextIndexer
    • BaseSimpleFullTextIndexer
    • IFullTextIndexer
    • IndexingMode
    • NamespaceDoc
  • VDS.RDF.Query.FullText.Indexing.Lucene
    • BaseSimpleLuceneIndexer
    • LuceneObjectsIndexer
    • LucenePredicatesIndexer
    • LuceneSubjectsIndexer
    • NamespaceDoc
  • VDS.RDF.Query.FullText.Schema
    • BaseIndexSchema
    • DefaultIndexSchema
    • IFullTextIndexSchema
    • NamespaceDoc
  • VDS.RDF.Query.FullText.Search
    • FullTextSearchResult
    • IFullTextSearchProvider
    • IFullTextSearchResult
    • NamespaceDoc
  • VDS.RDF.Query.FullText.Search.Lucene
    • BaseLuceneSearchProvider
    • LuceneSearchProvider
    • NamespaceDoc
  • VDS.RDF.Query.Grouping
    • BaseGroupBy
    • GroupByExpression
    • GroupByVariable
    • ISparqlGroupBy
  • VDS.RDF.Query.Inference
    • IInferenceEngine
    • IOwlReasoner
    • IQueryableOwlReasoner
    • OwlHelper
    • OwlHelper.OwlExtractMode
    • OwlReasonerWrapper
    • RdfsReasoner
    • SimpleN3RulesReasoner
    • SkosReasoner
    • StaticOwlReasonerWrapper
    • StaticRdfsReasoner
    • StaticSkosReasoner
  • VDS.RDF.Query.Operators
    • BaseOperator
    • ISparqlOperator
    • SparqlOperators
    • SparqlOperatorType
  • VDS.RDF.Query.Operators.DateTime
    • BaseDateTimeOperator
    • BaseTimeSpanOperator
    • DateTimeAddition
    • DateTimeSubtraction
    • TimeSpanAddition
    • TimeSpanSubtraction
  • VDS.RDF.Query.Operators.Numeric
    • AdditionOperator
    • BaseNumericOperator
    • DivisionOperator
    • MultiplicationOperator
    • SubtractionOperator
  • VDS.RDF.Query.Optimisation
    • AskBgpOptimiser
    • BaseAlgebraOptimiser
    • BaseQueryOptimiser
    • DefaultOptimiser
    • FilteredProductOptimiser
    • FullTextOptimiser
    • IAlgebraOptimiser
    • IdentityFilterOptimiser
    • ImplicitJoinOptimiser
    • IQueryOptimiser
    • LazyBgpOptimiser
    • LeviathanOptimiser
    • NoReorderComparer
    • NoReorderOptimiser
    • OrderByDistinctOptimiser
    • ParallelEvaluationOptimiser
    • PropertyFunctionOptimiser
    • SimpleVirtualAlgebraOptimiser
    • SparqlOptimiser
    • StrictAlgebraOptimiser
    • VariableSubstitutionTransformer
    • VirtualAlgebraOptimiser<TNodeID, TGraphID>
    • WeightedOptimiser
  • VDS.RDF.Query.Ordering
    • BaseOrderBy
    • ISparqlOrderBy
    • OrderByExpression
    • OrderByVariable
  • VDS.RDF.Query.Paths
    • AlternativePath
    • BaseBinaryPath
    • BaseUnaryPath
    • Cardinality
    • FixedCardinality
    • InversePath
    • ISparqlPath
    • NegatedSet
    • NOrMore
    • NToM
    • OneOrMore
    • PathEvaluationContext
    • PathTransformContext
    • PotentialPath
    • Property
    • SequencePath
    • ZeroOrMore
    • ZeroOrOne
    • ZeroToN
  • VDS.RDF.Query.Patterns
    • BaseTriplePattern
    • BindingsPattern
    • BindingTuple
    • BindPattern
    • BlankNodePattern
    • FilterPattern
    • FixedBlankNodePattern
    • GraphPattern
    • IAssignmentPattern
    • IConstructTriplePattern
    • IFilterPattern
    • IMatchTriplePattern
    • IPropertyFunctionPattern
    • IPropertyPathPattern
    • ISubQueryPattern
    • ITriplePattern
    • LetPattern
    • NodeMatchPattern
    • PatternItem
    • PropertyFunctionPattern
    • PropertyPathPattern
    • QuotedTriplePattern
    • SubQueryPattern
    • TriplePattern
    • TriplePatternType
    • TriplePatternTypeComparer
    • VariablePattern
  • VDS.RDF.Query.PropertyFunctions
    • FullTextMatchPropertyFunction
    • FullTextPropertyFunctionFactory
    • ILeviathanPropertyFunction
    • IPropertyFunctionFactory
    • ISparqlPropertyFunction
    • PropertyFunctionFactory
    • PropertyFunctionHelper
    • PropertyFunctionInfo
  • VDS.RDF.Query.Spin
    • SpinWrappedDataset
    • SpinWrappedGraph
  • VDS.RDF.Query.Spin.Core
    • Aggregations
  • VDS.RDF.Query.Spin.Inference
    • InferenceExtensions
  • VDS.RDF.Query.Spin.LibraryOntology
    • RDFx
  • VDS.RDF.Query.Spin.Statistics
    • ISPINStatisticsListener
  • VDS.RDF.Shacl
    • Path
    • ShapesGraph
    • Vocabulary
  • VDS.RDF.Shacl.Validation
    • Report
    • Result
    • ResultCollection
  • VDS.RDF.Skos
    • RdfSkosException
    • SkosCollection
    • SkosConcept
    • SkosConceptScheme
    • SkosGraph
    • SkosHelper
    • SkosMember
    • SkosOrderedCollection
    • SkosResource
  • VDS.RDF.Storage
    • AllegroGraphConnector
    • AsyncStorageCallback
    • AsyncStorageCallbackArgs
    • AsyncStorageOperation
    • BaseAsyncHttpConnector
    • BaseAsyncSafeConnector
    • BaseHttpConnector
    • BaseSesameHttpProtocolConnector
    • BaseStardogConnector
    • BatchTriple
    • DatasetFileManager
    • FourStoreConnector
    • FusekiConnector
    • GraphContent
    • IAsyncQueryableStorage
    • IAsyncStorageProvider
    • IAsyncTransactionalStorage
    • IAsyncUpdateableStorage
    • InMemoryManager
    • IOBehaviour
    • IQueryableStorage
    • IReasoningQueryableStorage
    • IStorageCapabilities
    • IStorageProvider
    • ITransactionalStorage
    • IUpdateableStorage
    • ParsingSparqlConnector
    • QueryableReadOnlyConnector
    • RdfStorageException
    • ReadOnlyConnector
    • ReadWriteSparqlConnector
    • SesameHttpProtocolConnector
    • SesameHttpProtocolVersion5Connector
    • SesameHttpProtocolVersion6Connector
    • SparqlConnector
    • SparqlConnectorLoadMethod
    • SparqlHttpProtocolConnector
    • StardogConnector
    • StardogReasoningMode
    • StardogV1Connector
    • StardogV2Connector
    • StardogV3Connector
    • StorageHelper
  • VDS.RDF.Storage.Management
    • AllegroGraphServer
    • BaseStardogServer
    • BaseStardogServer.DatabaseOptions
    • IAsyncStorageServer
    • IStorageServer
    • SesameServer
    • StardogServer
    • StardogV1Server
    • StardogV2Server
    • StardogV3Server
  • VDS.RDF.Storage.Management.Provisioning
    • IStoreTemplate
    • StoreTemplate
  • VDS.RDF.Storage.Management.Provisioning.Sesame
    • BaseSesameTemplate
    • SesameHttpTemplate
    • SesameMemTemplate
    • SesameNativeIndexMode
    • SesameNativeTemplate
  • VDS.RDF.Storage.Management.Provisioning.Stardog
    • BaseStardogTemplate
    • StardogDiskTemplate
    • StardogMemTemplate
  • VDS.RDF.Storage.Virtualisation
    • BaseVirtualBlankNode<TNodeID, TGraphID>
    • BaseVirtualGraphLiteralNode<TNodeID, TGraphID>
    • BaseVirtualLiteralNode<TNodeID, TGraphID>
    • BaseVirtualNode<TNodeID, TGraphID>
    • BaseVirtualUriNode<TNodeID, TGraphID>
    • BaseVirtualVariableNode<TNodeID, TGraphID>
    • ICanCopy
    • IVirtualIdComparable
    • IVirtualNode<TNodeID, TGraphID>
    • IVirtualRdfProvider<TNodeID, TGraphID>
    • SimpleVirtualBlankNode
    • SimpleVirtualGraphLiteralNode
    • SimpleVirtualLiteralNode
    • SimpleVirtualNodeCache<TNodeID>
    • SimpleVirtualUriNode
    • SimpleVirtualVariableNode
    • StoreVirtualGraphPersistenceWrapper<TNodeID, TGraphID>
    • VirtualNodeCache<TNodeID, TKey>
  • VDS.RDF.Update
    • ExplainUpdateProcessor
    • GenericUpdateProcessor
    • ISparqlUpdateProcessor
    • LeviathanUpdateOptions
    • LeviathanUpdateProcessor
    • RemoteUpdateProcessor
    • SimpleUpdateProcessor
    • SparqlRemoteUpdateEndpoint
    • SparqlUpdateClient
    • SparqlUpdateCommand
    • SparqlUpdateCommandSet
    • SparqlUpdateCommandType
    • SparqlUpdateEvaluationContext
    • SparqlUpdateException
    • SparqlUpdateMalformedException
    • SparqlUpdatePermissionException
    • SparqlUpdateSpecsHelper
    • SparqlUpdateTimeoutException
  • VDS.RDF.Update.Commands
    • AddCommand
    • BaseModificationCommand
    • BaseTransferCommand
    • ClearCommand
    • ClearMode
    • CopyCommand
    • CreateCommand
    • DeleteCommand
    • DeleteDataCommand
    • DropCommand
    • InsertCommand
    • InsertDataCommand
    • LoadCommand
    • ModifyCommand
    • MoveCommand
  • VDS.RDF.Update.Protocol
    • SparqlHttpProtocolException
    • SparqlHttpProtocolUriInvalidException
    • SparqlHttpProtocolUriResolutionException
  • VDS.RDF.Utils.Describe
    • BaseDescribeAlgorithm
    • ConciseBoundedDescription
    • IDescribeAlgorithm
    • LabelledDescription
    • MinimalSpanningGraph
    • NamedGraphDescription
    • SimpleSubjectDescription
    • SimpleSubjectObjectDescription
    • SymmetricConciseBoundedDescription
  • VDS.RDF.Writing
    • BaseGZipDatasetWriter
    • BaseGZipResultsWriter
    • BaseGZipWriter
    • BaseHtmlWriter
    • BaseRdfWriter
    • BaseStoreWriter
    • CollectionSearchMode
    • CompressingTurtleWriter
    • CsvStoreWriter
    • CsvWriter
    • GraphMLSpecsHelper
    • GraphMLWriter
    • GraphVizGenerator
    • GraphVizWriter
    • GZippedJsonLdWriter
    • GZippedNotation3Writer
    • GZippedNQuadsWriter
    • GZippedNTriplesWriter
    • GZippedRdfAWriter
    • GZippedRdfJsonWriter
    • GZippedRdfXmlWriter
    • GZippedSparqlCsvWriter
    • GZippedSparqlJsonWriter
    • GZippedSparqlTsvWriter
    • GZippedSparqlXmlWriter
    • GZippedTriGWriter
    • GZippedTriXWriter
    • GZippedTurtleWriter
    • HtmlSchemaWriter
    • HtmlWriter
    • IAttributeWriter
    • ICollapseLiteralsWriter
    • ICompressingWriter
    • IDtdWriter
    • IFormatterBasedWriter
    • IHighSpeedWriter
    • IHtmlWriter
    • IMultiThreadedWriter
    • INamespaceWriter
    • IPrettyPrintingWriter
    • IRdfStarCapableWriter
    • JsonLdWriter
    • JsonLdWriterOptions
    • NodeFormat
    • Notation3Writer
    • NQuadsWriter
    • NTriplesWriter
    • OutputRdfCollection
    • PrettyRdfXmlWriter
    • RdfJsonWriter
    • RdfOutputException
    • RdfThreadedOutputException
    • RdfWriterSelectionException
    • RdfXmlWriter
    • SingleGraphWriter
    • SparqlCsvWriter
    • SparqlHtmlWriter
    • SparqlJsonWriter
    • SparqlRdfWriter
    • SparqlTsvWriter
    • SparqlXmlWriter
    • SparqlXsltWriter
    • StringWriter
    • TriGWriter
    • TripleSegment
    • TriXWriter
    • TsvStoreWriter
    • TsvWriter
    • TurtleWriter
    • WriterCompressionLevel
    • WriterErrorMessages
    • WriterHelper
  • VDS.RDF.Writing.Contexts
    • BaseStoreWriterContext
    • BaseWriterContext
    • CompressingTurtleWriterContext
    • HtmlWriterContext
    • IAnnotationCompressingWriterContext
    • ICollectionCompressingWriterContext
    • ICompressingWriterContext
    • IStoreWriterContext
    • IWriterContext
    • NTriplesWriterContext
    • RdfXmlWriterContext
    • ThreadedStoreWriterContext
    • TriGWriterContext
    • TurtleWriterContext
  • VDS.RDF.Writing.Formatting
    • BaseFormatter
    • CsvFormatter
    • DeliminatedLineFormatter
    • HtmlFormatter
    • IBaseUriFormatter
    • ICharFormatter
    • IGraphFormatter
    • INamespaceFormatter
    • INodeFormatter
    • IQuadFormatter
    • IQueryFormatter
    • IResultFormatter
    • IResultSetFormatter
    • ITripleFormatter
    • IUriFormatter
    • Notation3Formatter
    • NQuads11Formatter
    • NQuadsFormatter
    • NTriples11Formatter
    • NTriplesFormatter
    • QNameFormatter
    • RdfXmlFormatter
    • SparqlFormatter
    • SparqlXmlFormatter
    • TsvFormatter
    • TurtleFormatter
    • TurtleW3CFormatter
    • UncompressedNotation3Formatter
    • UncompressedTurtleFormatter
    • UncompressedTurtleStarFormatter

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
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public class SparqlParameterizedString
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

Constructors

| Improve this Doc View Source

SparqlParameterizedString()

Creates a new empty parameterized String.

Declaration
public SparqlParameterizedString()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SparqlParameterizedString(string)

Creates a new parameterized String.

Declaration
public SparqlParameterizedString(string command)
Parameters
Type Name Description
string command

Command Text.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

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
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

CommandText

Gets/Sets the parameterized Command Text.

Declaration
public virtual string CommandText { get; set; }
Property Value
Type Description
string
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Description
INamespaceMapper
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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<T><KeyValuePair<string, INode>>
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Description
ISparqlQueryProcessor
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Description
ISparqlUpdateProcessor
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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<T><KeyValuePair<string, INode>>
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

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
string text

Text.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Name Description
SparqlParameterizedString text

Text.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Name Description
SparqlParameterizedString query

Query.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
Type Name Description
SparqlQuery query

Query.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

Clear()

Clears all set Parameters and Variables.

Declaration
public virtual void Clear()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

ClearParameters()

Clears all set Parameters.

Declaration
public virtual void ClearParameters()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

ClearVariables()

Clears all set Variables.

Declaration
public virtual void ClearVariables()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

ExecuteQuery()

Executes this command as a query.

Declaration
public SparqlResultSet ExecuteQuery()
Returns
Type Description
SparqlResultSet
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

ExecuteQuery(IRdfHandler, ISparqlResultsHandler)

Executes this command as a query.

Declaration
public void ExecuteQuery(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler)
Parameters
Type Name Description
IRdfHandler rdfHandler

RDF Handler.

ISparqlResultsHandler resultsHandler

Results Handler.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

ExecuteUpdate()

Executes this command as an update.

Declaration
public void ExecuteUpdate()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

string value

Node ID.

Remarks

Only guarantees that the Blank Node ID will not clash with any other Blank Nodes added by other calls to this method or it's overload which generates anonymous Blank Nodes. If the base query text into which you are inserting parameters contains Blank Nodes then the IDs generated here may clash with those IDs.

| 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
string name

Parameter.

Remarks

Only guarantees that the Blank Node ID will not clash with any other Blank Nodes added by other calls to this method or it's overload which takes an explicit Node ID. If the base query text into which you are inserting parameters contains Blank Nodes then the IDs generated here may clash with those IDs.

| Improve this Doc View Source

SetLiteral(string, bool)

Sets the Parameter to a Boolean Literal.

Declaration
public void SetLiteral(string name, bool value)
Parameters
Type Name Description
string name

Parameter.

System.Boolean value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, DateTime, bool)

Sets the Parameter to a Date Time Literal.

Declaration
public void SetLiteral(string name, DateTime value, bool precise)
Parameters
Type Name Description
string name

Parameter.

System.DateTime value

Integer.

System.Boolean precise

Whether to preserve precisely i.e. include fractional seconds.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

System.DateTime value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, DateTimeOffset, bool)

Sets the Parameter to a Date Time Literal.

Declaration
public void SetLiteral(string name, DateTimeOffset value, bool precise)
Parameters
Type Name Description
string name

Parameter.

System.DateTimeOffset value

Integer.

System.Boolean precise

Whether to preserve precisely i.e. include fractional seconds.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

System.DateTimeOffset value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

decimal value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

double value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, short)

Sets the Parameter to an Integer Literal.

Declaration
public void SetLiteral(string name, short value)
Parameters
Type Name Description
string name

Parameter.

short value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, int)

Sets the Parameter to an Integer Literal.

Declaration
public void SetLiteral(string name, int value)
Parameters
Type Name Description
string name

Parameter.

int value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, long)

Sets the Parameter to an Integer Literal.

Declaration
public void SetLiteral(string name, long value)
Parameters
Type Name Description
string name

Parameter.

long value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, float)

Sets the Parameter to a Float Literal.

Declaration
public void SetLiteral(string name, float value)
Parameters
Type Name Description
string name

Parameter.

float value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, string, bool)

Sets the Parameter to an Untyped Literal.

Declaration
public void SetLiteral(string name, string value, bool normalizeValue)
Parameters
Type Name Description
string name

Parameter.

string value

The literal value.

System.Boolean normalizeValue

Whether to normalize the string value of value.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, string, string, bool)

Sets the Parameter to a Literal with a Language Specifier.

Declaration
public void SetLiteral(string name, string value, string lang, bool normalizeLiteralValue)
Parameters
Type Name Description
string name

Parameter.

string value

The Literal value.

string lang

The language specifier.

System.Boolean normalizeLiteralValue

Whether to normalize the string value of value.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| Improve this Doc View Source

SetLiteral(string, string, Uri, bool)

Sets the Parameter to a Typed Literal.

Declaration
public void SetLiteral(string name, string value, Uri datatype, bool normalizeLiteralValue)
Parameters
Type Name Description
string name

Parameter.

string value

The literal value.

System.Uri datatype

Datatype URI.

System.Boolean normalizeLiteralValue

Whether to normalize the string value of value.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter.

System.TimeSpan value

Integer.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter Name.

INode value

Value.

Remarks

Can be used in derived classes to set the value of parameters if the derived class defines additional methods for adding values for parameters.

| 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
string name

Parameter.

System.Uri value

URI.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Variable Name.

INode value

Value.

Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string
Overrides
object.ToString()
Remarks

This is intended for use in applications which may want to dynamically build SPARQL queries/updates where user input may comprise individual values in the triples patterns and the applications want to avoid SPARQL injection attacks which change the meaning of the query/update.

It works broadly in the same way as a SqlCommand would in that you specify a string with paramters specified in the form @name and then use various set methods to set the actual values that should be used. The values are only substituted for parameters when you actually call the ToString() method to get the final string representation of the command. E.g.

SparqlParameterizedString queryString = new SparqlParameterizedString();
queryString.CommandText = @"SELECT * WHERE
{
    ?s a @type .
}";
queryString.SetUri("type", new Uri("http://example.org/myType"));
Console.WriteLine(queryString.ToString());

Would result in the following being printed to the Console:

SELECT * WHERE
{
    ?s a <http://example.org/myType>
}

Calling a Set method to set a parameter that has already been set changes that value and the new value will be used next time you call ToString() - this may be useful if you plan to execute a series of queries/updates using a series of values since you need not instantiate a completely new parameterized string each time.

This class was added to a library based on a suggestion by Alexander Sidorov and ideas from slides from Slideshare by Almedia et al.

PERFORMANCE TIPS: if building the command text incrementally, avoid using CommandText += and use the AppendSubQuery or Append methods instead.

| 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
string name

Parameter Name.

Remarks

There is generally no reason to do this since you can just set a parameters value to change it.

| 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
string name

Variable Name.

Remarks

May be useful if you have a skeleton query/update into which you sometimes substitute values for variables but don't always do so.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • SparqlParameterizedString()
    • SparqlParameterizedString(string)
  • Properties
    • BaseUri
    • CommandText
    • Namespaces
    • Parameters
    • QueryProcessor
    • UpdateProcessor
    • Variables
  • Methods
    • Append(string)
    • Append(SparqlParameterizedString)
    • AppendSubQuery(SparqlParameterizedString)
    • AppendSubQuery(SparqlQuery)
    • Clear()
    • ClearParameters()
    • ClearVariables()
    • ExecuteQuery()
    • ExecuteQuery(IRdfHandler, ISparqlResultsHandler)
    • ExecuteUpdate()
    • SetBlankNode(string, string)
    • SetBlankNode(string)
    • SetLiteral(string, bool)
    • SetLiteral(string, DateTime, bool)
    • SetLiteral(string, DateTime)
    • SetLiteral(string, DateTimeOffset, bool)
    • SetLiteral(string, DateTimeOffset)
    • SetLiteral(string, decimal)
    • SetLiteral(string, double)
    • SetLiteral(string, short)
    • SetLiteral(string, int)
    • SetLiteral(string, long)
    • SetLiteral(string, float)
    • SetLiteral(string, string, bool)
    • SetLiteral(string, string, string, bool)
    • SetLiteral(string, string, Uri, bool)
    • SetLiteral(string, TimeSpan)
    • SetParameter(string, INode)
    • SetUri(string, Uri)
    • SetVariable(string, INode)
    • ToString()
    • UnsetParameter(string)
    • UnsetVariable(string)
  • Extension Methods
Back to top Generated by DocFX