private void outputTripleOfQuad(Quad quad) { String s = FmtUtils.stringForNode(quad.getSubject(), sCxt); String p = FmtUtils.stringForNode(quad.getPredicate(), sCxt); String o = FmtUtils.stringForNode(quad.getObject(), sCxt); out.print(s); out.print(" "); out.print(p); out.print(" "); out.print(o); }
public static String lang(Node node) { if (!node.isLiteral()) NodeValue.raise( new ExprTypeException("lang: Not a literal: " + FmtUtils.stringForNode(node))); String s = node.getLiteralLanguage(); if (s == null) s = ""; return s; }
public void visit(UpdateCreate update) { out.ensureStartOfLine(); out.print("CREATE"); out.print(" "); if (update.isSilent()) out.print("SILENT "); String s = FmtUtils.stringForNode(update.getGraph(), sCxt); out.print(s); }
public static void output(IndentedWriter out, List<Node> nodeList, SerializationContext naming) { out.print("("); boolean first = true; for (Node node : nodeList) { if (!first) out.print(" "); out.print(FmtUtils.stringForNode(node, naming)); first = false; } out.print(")"); }
@Override public String asSparqlTerm(PrefixLogger pl) { String lang = (language.equals("none") ? "" : language); RDFDatatype dt = datatype.length() == 0 ? null : TypeMapper.getInstance().getSafeTypeByName(datatype); Node n = NodeFactory.createLiteral(spelling, lang, dt); if (datatype.length() > 0) pl.present(datatype); String lf = FmtUtils.stringForNode(n, RDFUtils.noPrefixes); return lf; }
private void outputQuad(Quad quad) { String qs = FmtUtils.stringForQuad(quad, sCxt.getPrefixMapping()); if (quad.getGraph() != null) { String g = FmtUtils.stringForNode(quad.getGraph(), sCxt); out.print(g); out.print(" "); } outputTripleOfQuad(quad); out.println(" ."); }
private void printTargetUpdate2(Target target) { if (target.isDefault()) { out.print("DEFAULT"); } else if (target.isOneNamedGraph()) { // out.print("GRAPH ") ; String s = FmtUtils.stringForNode(target.getGraph(), sCxt); out.print(s); } else { out.print("Target BROKEN / Update2"); throw new ARQException("Malformed Target / Update2"); } }
private void printTarget(Target target) { if (target.isAll()) { out.print("ALL"); } else if (target.isAllNamed()) { out.print("NAMED"); } else if (target.isDefault()) { out.print("DEFAULT"); } else if (target.isOneNamedGraph()) { out.print("GRAPH "); String s = FmtUtils.stringForNode(target.getGraph(), sCxt); out.print(s); } else { out.print("Target BROKEN"); throw new ARQException("Malformed Target"); } }
private void output(Node node) { String $ = FmtUtils.stringForNode(node, sCxt); out.print($); }
public static void output(IndentedWriter out, Node node, SerializationContext naming) { out.print(FmtUtils.stringForNode(node, naming)); }
public static String displayStr(Node n) { return FmtUtils.stringForNode(n); }