Exemple #1
0
 internal override string ToString(List <RDFNamespace> prefixes)
 => string.Concat(
     "FILTER ( ",
     RDFQueryPrinter.PrintPatternMember(this.TermToSearch, prefixes),
     " IN (",
     string.Join(", ", this.InTerms.Select(t => RDFQueryPrinter.PrintPatternMember(t, prefixes))),
     ") )");
        internal override string ToString(List <RDFNamespace> prefixes)
        {
            string leftValue  = RDFQueryPrinter.PrintPatternMember(this.LeftMember, prefixes);
            string rightValue = RDFQueryPrinter.PrintPatternMember(this.RightMember, prefixes);

            switch (this.ComparisonFlavor)
            {
            case RDFQueryEnums.RDFComparisonFlavors.LessThan:
                return(string.Concat("FILTER ( ", leftValue, " < ", rightValue, " )"));

            case RDFQueryEnums.RDFComparisonFlavors.LessOrEqualThan:
                return(string.Concat("FILTER ( ", leftValue, " <= ", rightValue, " )"));

            case RDFQueryEnums.RDFComparisonFlavors.EqualTo:
                return(string.Concat("FILTER ( ", leftValue, " = ", rightValue, " )"));

            case RDFQueryEnums.RDFComparisonFlavors.NotEqualTo:
                return(string.Concat("FILTER ( ", leftValue, " != ", rightValue, " )"));

            case RDFQueryEnums.RDFComparisonFlavors.GreaterOrEqualThan:
                return(string.Concat("FILTER ( ", leftValue, " >= ", rightValue, " )"));

            case RDFQueryEnums.RDFComparisonFlavors.GreaterThan:
                return(string.Concat("FILTER ( ", leftValue, " > ", rightValue, " )"));

            default:
                throw new RDFQueryException("Cannot get string representation of unknown '" + this.ComparisonFlavor + "' RDFComparisonFilter.");
            }
        }
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return("FILTER ( SAMETERM(" + this.Variable + ", " + RDFQueryPrinter.PrintPatternMember(this.RDFTerm, prefixes) + ") )");
 }
Exemple #4
0
 internal string ToString(List <RDFNamespace> prefixes)
 => RDFQueryPrinter.PrintPattern(this, prefixes);
 internal override string ToString(List <RDFNamespace> prefixes)
 => string.Concat(
     "FILTER ( DATATYPE(", this.Variable, ") = ",
     RDFQueryPrinter.PrintPatternMember(RDFQueryUtilities.ParseRDFPatternMember(RDFModelUtilities.GetDatatypeFromEnum(this.Datatype)), prefixes), " )");
Exemple #6
0
 /// <summary>
 /// Gives the string representation of the DESCRIBE query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintDescribeQuery(this));
 }
 internal string ToString(List <RDFNamespace> prefixes)
 => RDFQueryPrinter.PrintPatternGroup(this, 0, false, prefixes);
 /// <summary>
 /// Gives the string representation of the CONSTRUCT query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintConstructQuery(this));
 }
Exemple #9
0
 internal string ToString(List <RDFNamespace> prefixes, string spaces)
 => RDFQueryPrinter.PrintValues(this, prefixes, spaces);
Exemple #10
0
 /// <summary>
 /// Gives the string representation of the SELECT query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintSelectQuery(this, 0, false));
 }
Exemple #11
0
 /// <summary>
 /// Gives the string representation of the ASK query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintAskQuery(this));
 }
Exemple #12
0
 /// <summary>
 /// Gives the string representation of the DESCRIBE query
 /// </summary>
 public override string ToString()
 => RDFQueryPrinter.PrintDescribeQuery(this);
Exemple #13
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return(RDFQueryPrinter.PrintValues(this.Values, prefixes, String.Empty));
 }
Exemple #14
0
 /// <summary>
 /// Gives the string representation of the ASK query
 /// </summary>
 public override string ToString()
 => RDFQueryPrinter.PrintAskQuery(this);
Exemple #15
0
 internal String ToString(List <RDFNamespace> prefixes)
 {
     return(RDFQueryPrinter.PrintPatternGroup(this, 0, false, prefixes));
 }
 internal override string ToString(List <RDFNamespace> prefixes)
 => RDFQueryPrinter.PrintValues(this.Values, prefixes, string.Empty);
 /// <summary>
 /// Gives the string representation of the patternGroup
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintPatternGroup(this, 0, false, new List <RDFNamespace>()));
 }
Exemple #18
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return($"FILTER ( {RDFQueryPrinter.PrintPatternMember(this.TermToSearch, prefixes)} IN ({String.Join(", ", this.InTerms.Select(t => RDFQueryPrinter.PrintPatternMember(t, prefixes)))}) )");
 }
Exemple #19
0
 /// <summary>
 /// Gives the string representation of the CONSTRUCT query
 /// </summary>
 public override string ToString()
 => RDFQueryPrinter.PrintConstructQuery(this);
 internal override string ToString(List <RDFNamespace> prefixes)
 => string.Concat("FILTER ( SAMETERM(", this.Variable, ", ", RDFQueryPrinter.PrintPatternMember(this.RDFTerm, prefixes), ") )");
Exemple #21
0
 internal String ToString(List <RDFNamespace> prefixes, String spaces)
 {
     return(RDFQueryPrinter.PrintValues(this, prefixes, spaces));
 }
Exemple #22
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return("FILTER ( DATATYPE(" + this.Variable + ") = " + RDFQueryPrinter.PrintPatternMember(RDFQueryUtilities.ParseRDFPatternMember(RDFModelUtilities.GetDatatypeFromEnum(this.Datatype)), prefixes) + " )");
 }
Exemple #23
0
 internal String ToString(List <RDFNamespace> prefixes)
 {
     return(RDFQueryPrinter.PrintPropertyPath(this, prefixes));
 }
 /// <summary>
 /// Gives the string representation of the path
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintPropertyPath(this, new List <RDFNamespace>()));
 }