public void write(Statement st) throws IOException { stmtCount++; if (validate) { if (!st.isSubjectAnon()) { validateUri(st.getSubjectUri()); } validateUri(st.getPredicateUri()); if (!st.isObjectAnon() && !st.isLiteral()) validateUri(st.getObjectUri()); } st.write(os, escapeUnicode); }
public void writeLiteral(String s, String p, Object o) throws IOException { if (validate) { if (strictValidator != null) { strictValidator.validateLiteral(s, p, o); } validateUri(s); validateUri(p); } stmtCount++; NtWriter.writeLiteral(os, s, p, o, escapeUnicode); }
public void writeLiteral(Object s, Object p, Object o) throws IOException { if (validate) { if (strictValidator != null) { strictValidator.validateLiteral(s, p, o); } validateUri(s.toString()); validateUri(p.toString()); validateLiteral(o); } stmtCount++; NtWriter.writeLiteral(os, s.toString(), p.toString(), o, escapeUnicode); }
public void writeStatement(String s, String p, String o) throws IOException { if (validate) { if (strictValidator != null) { strictValidator.validateStatement(s, p, o); } validateUri(s); validateUri(p); validateUri(o); } stmtCount++; writeResource(s); os.write(' '); writeResource(p); os.write(' '); writeResource(o); os.write(' '); os.write('.'); os.write('\n'); }