{
String filename = "data.ttl" ;
// This is the heart of N-triples printing ... outoput is heavily buffered
// so the FilterSinkRDF called flush at the end of parsing.
Sink<Triple> output = new SinkTripleOutput(System.out, null, SyntaxLabels.createNodeToLabel()) ;
StreamRDF filtered = new FilterSinkRDF(output, FOAF.name, FOAF.knows) ;
// Call the parsing process.
RDFDataMgr.parse(filtered, filename) ;
}