public static void writeBase(IndentedWriter out, String base) { if (base != null) { out.print("@base "); out.pad(PREFIX_IRI); out.print("<"); out.print(base); out.print(">"); out.print(" ."); out.println(); } }
public static void writePrefixes(IndentedWriter out, PrefixMap prefixMap) { if (prefixMap != null && !prefixMap.isEmpty()) { for (Map.Entry<String, String> e : prefixMap.getMappingCopyStr().entrySet()) { out.print("@prefix "); out.print(e.getKey()); out.print(": "); out.pad(PREFIX_IRI); out.print("<"); out.print(e.getValue()); out.print(">"); out.print(" ."); out.println(); } } }
// return true if annotation was output and it runs to end-of-line private boolean annotate(Annotations sqlNode, int indentationColumn) { if (!outputAnnotations) return false; boolean first = true; for (String s : sqlNode.getNotes()) { if (!first) out.println(); first = false; out.pad(indentationColumn, true); if (commentSQLStyle) { out.print(" -- "); out.print(s); } else { out.print(" /* "); out.print(s); out.print(" */"); } } return !commentSQLStyle || !first; }