public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { return(string.Format(System.Globalization.CultureInfo.InvariantCulture, "BIND ({0} AS {1}).", expression.ToSparqlString(settings), variable.ToSparqlString(settings))); }
public virtual object Clone() { SparqlSettings result = new SparqlSettings(); result.prefixingService = this.prefixingService; result.varPrefix = this.varPrefix; return(result); }
public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { return(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0} {1} {2}.", tripleSubject.ToSparqlString(settings), triplePredicate.ToSparqlString(settings), tripleObject.ToSparqlString(settings))); }
public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } return(settings.FormatVarReference(settings.VarPrefix + id.ToString())); }
public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } return(variable.ToSparqlString(settings)); }
public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } return("_:" + settings.BlankNodePrefix + id.ToString()); }
public abstract string ToSparqlString(SparqlConversion.SparqlSettings settings);
public override string ToString() { var settings = new SparqlConversion.SparqlSettings(); return(ToSparqlString(settings)); }
public override string ToSparqlString(SparqlConversion.SparqlSettings settings) { return("[]"); }
public static string ToSparqlString(this IIriPrefixingService prefixingService, SparqlSettings settings) { if (prefixingService == null) { throw new ArgumentNullException("prefixingService"); } if (settings == null) { throw new ArgumentNullException("settings"); } var prefixes = prefixingService.KnownPrefixes.ToArray(); int prefixColumnWidth = prefixes.Max(p => p.Prefix.Length) + 1; var result = new StringBuilder(); foreach (var prefix in prefixes) { result.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, "PREFIX {0}:{1}<{2}>\n", prefix.Prefix, new String(' ', prefixColumnWidth - prefix.Prefix.Length), prefix.Iri); } return(result.ToString()); }