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