public void visit(From from) {
this.append(from.toString());
}
public void visit(TriplePattern pattern) {
RDFTerm s = pattern.getSubject();
RDFTerm p = pattern.getPredicate();
RDFTerm o = pattern.getObject();
String triple = s + " " + p + " " + o;
if (pattern.isOptional()) {
triple = "OPTIONAL { " + triple + " }";
}
this.append(" " + triple + " . ");