Ejemplo n.º 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.");
            }
        }
Ejemplo n.º 3
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return("FILTER ( SAMETERM(" + this.Variable + ", " + RDFQueryPrinter.PrintPatternMember(this.RDFTerm, prefixes) + ") )");
 }
Ejemplo n.º 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), " )");
Ejemplo n.º 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);
Ejemplo n.º 8
0
 /// <summary>
 /// Gives the string representation of the CONSTRUCT query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintConstructQuery(this));
 }
Ejemplo n.º 9
0
 internal string ToString(List <RDFNamespace> prefixes, string spaces)
 => RDFQueryPrinter.PrintValues(this, prefixes, spaces);
Ejemplo n.º 10
0
 /// <summary>
 /// Gives the string representation of the SELECT query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintSelectQuery(this, 0, false));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Gives the string representation of the ASK query
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintAskQuery(this));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Gives the string representation of the DESCRIBE query
 /// </summary>
 public override string ToString()
 => RDFQueryPrinter.PrintDescribeQuery(this);
Ejemplo n.º 13
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return(RDFQueryPrinter.PrintValues(this.Values, prefixes, String.Empty));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Gives the string representation of the ASK query
 /// </summary>
 public override string ToString()
 => RDFQueryPrinter.PrintAskQuery(this);
Ejemplo n.º 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);
Ejemplo n.º 17
0
 /// <summary>
 /// Gives the string representation of the patternGroup
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintPatternGroup(this, 0, false, new List <RDFNamespace>()));
 }
Ejemplo n.º 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)))}) )");
 }
Ejemplo n.º 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), ") )");
Ejemplo n.º 21
0
 internal String ToString(List <RDFNamespace> prefixes, String spaces)
 {
     return(RDFQueryPrinter.PrintValues(this, prefixes, spaces));
 }
Ejemplo n.º 22
0
 internal override String ToString(List <RDFNamespace> prefixes)
 {
     return("FILTER ( DATATYPE(" + this.Variable + ") = " + RDFQueryPrinter.PrintPatternMember(RDFQueryUtilities.ParseRDFPatternMember(RDFModelUtilities.GetDatatypeFromEnum(this.Datatype)), prefixes) + " )");
 }
Ejemplo n.º 23
0
 internal String ToString(List <RDFNamespace> prefixes)
 {
     return(RDFQueryPrinter.PrintPropertyPath(this, prefixes));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Gives the string representation of the path
 /// </summary>
 public override String ToString()
 {
     return(RDFQueryPrinter.PrintPropertyPath(this, new List <RDFNamespace>()));
 }