1 5 6 package com.hp.hpl.jena.n3; 7 8 import antlr.collections.AST ; 9 10 14 15 public class ChainedN3EventHandler implements N3ParserEventHandler 16 { 17 N3ParserEventHandler here = null ; 18 N3ParserEventHandler next = null ; 19 20 public ChainedN3EventHandler(N3ParserEventHandler car, N3ParserEventHandler cdr) 21 { 22 here = car ; 23 next = cdr ; 24 } 25 26 public void startDocument() { here.startDocument() ; next.startDocument() ; } 27 public void endDocument() { here.endDocument() ; next.startDocument() ; } 28 29 public void error(Exception ex, String message) { System.err.println(message) ; } 30 33 public void startFormula(int line, String context) 34 { 35 here.startFormula(line, context) ; 36 next.startFormula(line, context) ; 37 } 38 39 public void endFormula(int line, String context) 40 { 41 here.endFormula(line, context) ; 42 next.endFormula(line, context) ; 43 } 44 45 public void quad(int line, AST subj, AST prop, AST obj, String context) 46 { 47 here.quad(line, subj, prop, obj, context) ; 48 next.quad(line, subj, prop, obj, context) ; 49 } 50 51 public void directive(int line, AST directive, AST[] args, String context) 52 { 53 here.directive(line, directive, args, context) ; 54 next.directive(line, directive, args, context) ; 55 } 56 } 57 58 84 | Popular Tags |