Class TriplePatternBuilder
Provides methods for building triple patterns.
Inheritance
System.Object
TriplePatternBuilder
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Builder
Assembly: dotNetRdf.dll
Syntax
public class TriplePatternBuilder : ITriplePatternBuilderInternal, ITriplePatternBuilder
Constructors
| Improve this Doc View SourceTriplePatternBuilder(INamespaceMapper)
Declaration
public TriplePatternBuilder(INamespaceMapper prefixes)
Parameters
Type | Name | Description |
---|---|---|
INamespaceMapper | prefixes |
Properties
| Improve this Doc View SourcePatternItemFactory
Gets the pattern item factory.
Declaration
public IPatternItemFactory PatternItemFactory { get; }
Property Value
Type | Description |
---|---|
IPatternItemFactory |
Patterns
Gets the triple patterns.
Declaration
public ITriplePattern[] Patterns { get; }
Property Value
Type | Description |
---|---|
ITriplePattern[] |
Prefixes
Gets the prefix manager, which allows adding prefixes to the query or graph pattern.
Declaration
public INamespaceMapper Prefixes { get; }
Property Value
Type | Description |
---|---|
INamespaceMapper |
Methods
| Improve this Doc View SourceAddPattern(TriplePattern)
Add TriplePattern to the builder.
Declaration
public void AddPattern(TriplePattern triplePattern)
Parameters
Type | Name | Description |
---|---|---|
TriplePattern | triplePattern |
Subject(string)
Sets a variable as Subject.
Declaration
public TriplePatternPredicatePart Subject(string subjectVariableName)
Parameters
Type | Name | Description |
---|---|---|
string | subjectVariableName |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Subject(Uri)
Sets a System.Uri as Subject.
Declaration
public TriplePatternPredicatePart Subject(Uri subject)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | subject |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Subject(INode)
Depending on the subjectNode
's type, sets a literal, a QName or a blank node as Subject.
Declaration
public TriplePatternPredicatePart Subject(INode subjectNode)
Parameters
Type | Name | Description |
---|---|---|
INode | subjectNode |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Remarks
A relevant prefix/base URI must be added to Prefixes to accept a QName.
Subject(PatternItem)
Sets a PatternItem as Subject.
Declaration
public TriplePatternPredicatePart Subject(PatternItem subject)
Parameters
Type | Name | Description |
---|---|---|
PatternItem | subject |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Subject(SparqlVariable)
Sets a variable as Subject.
Declaration
public TriplePatternPredicatePart Subject(SparqlVariable subjectVariable)
Parameters
Type | Name | Description |
---|---|---|
SparqlVariable | subjectVariable |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Subject<TNode>(string)
Depending on the generic parameter type, sets a literal, a QName or a blank node as Subject.
Declaration
public TriplePatternPredicatePart Subject<TNode>(string subject) where TNode : INode
Parameters
Type | Name | Description |
---|---|---|
string | subject | Either a variable name, a literal, a QName or a blank node identifier. |
Returns
Type | Description |
---|---|
TriplePatternPredicatePart |
Type Parameters
Name | Description |
---|---|
TNode |
Remarks
A relevant prefix/base URI must be added to Prefixes to accept a QName.