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