RDFSharp.Query.RDFVariable.ToString C# (CSharp) Method

ToString() public method

Gives the string representation of the variable
public ToString ( ) : String
return String
        public override String ToString()
        {
            return this.VariableName;
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Adds the given column of bindings to the SPARQL values
        /// </summary>
        public RDFValues AddColumn(RDFVariable variable, List <RDFPatternMember> bindings)
        {
            if (variable != null)
            {
                //Initialize bindings of the given variable
                if (!this.Bindings.ContainsKey(variable.ToString()))
                {
                    this.Bindings.Add(variable.ToString(), new List <RDFPatternMember>());
                }

                //Populate bindings of the given variable
                //(null indicates the special UNDEF binding)
                if (bindings?.Any() ?? false)
                {
                    bindings.ForEach(b => this.Bindings[variable.ToString()].Add((b is RDFResource || b is RDFLiteral) ? b : null));
                }
                else
                {
                    this.Bindings[variable.ToString()].Add(null);
                }

                //Mark the SPARQL values as evaluable
                this.IsEvaluable = true;
            }
            return(this);
        }
All Usage Examples Of RDFSharp.Query.RDFVariable::ToString