Checker { public boolean check(Node node, long line, long col) { if ( node.isURI() ) return checkIRI(node, line, col) ; else if ( node.isBlank() ) return checkBlank(node, line, col) ; else if ( node.isLiteral() ) return checkLiteral(node, line, col) ; else if ( node.isVariable() ) return checkVar(node, line, col) ; handler.warning("Not a recognized node: ", line, col) ; return false ; } Checker();  Checker(ErrorHandler handler); ErrorHandler getHandler(); void setHandler(ErrorHandler handler); boolean check(Node node, long line, long col); boolean check(Triple triple, long line, long col); boolean checkTriple(Node subject, Node predicate, Node object, long line, long col); final boolean checkVar(Node node, long line, long col); final boolean checkLiteral(Node node, long line, long col); final boolean checkBlank(Node node, long line, long col); final boolean checkIRI(Node node, long line, long col); final boolean checkIRI(IRI iri, long line, long col); final NodeChecker getCheckLiterals(); final void setCheckLiterals(NodeChecker checkLiterals); final NodeChecker getCheckURIs(); final void setCheckURIs(NodeChecker checkURIs); final NodeChecker getCheckBlankNodes(); final void setCheckBlankNodes(NodeChecker checkBlankNodes); final NodeChecker getCheckVars(); final void setCheckVars(NodeChecker checkVars);  }
@Test public void checker01() { check("''") ; }
@Test public void checker02() { check("''@en") ; }
@Test public void checker03() { check("<http://example/x>") ; }
@Test(expected=ExError.class) public void checker04() { check("<x>") ; }
@Test public void checker05() { check("<urn:abc>") ; }
@Test public void checker06() { check("<urn:abc:>") ; }
@Test public void checker07() { check("<urn:abc:y>") ; }
@Test (expected=ExWarning.class) public void checker10() { check("''^^xsd:dateTime") ; }
@Test public void checker11() { check("' 2010-05-19T01:01:01.01+01:00'^^xsd:dateTime") ; }
@Test public void checker12() { check("'\\n2010-05-19T01:01:01.01+01:00\\t\\r '^^xsd:dateTime") ; }
@Test public void checker13() { check("' 123'^^xsd:integer") ; }
@Test (expected=ExWarning.class) public void checker14() { check("'12 3'^^xsd:integer") ; }
@Test public void checker15() { check("'\\n123'^^xsd:integer") ; }
@Test public void checker16() { check("'123.0 '^^xsd:float") ; }
@Test public void checker17() { check("'123.0\\n'^^xsd:double") ; }
@Test(expected=ExWarning.class) public void checker20() { check("'XYZ'^^xsd:integer") ; }
@Test(expected=ExWarning.class) public void checker21() { check("'XYZ'@abcdefghijklmn") ; }
@Test(expected=ExWarning.class) public void checker30() { check("<http://base/[]iri>") ; }
@Test public void checker40() { check("\"<x></x>\"^^rdf:XMLLiteral") ; }
@Test(expected=ExWarning.class) public void checker41() { check("\"<x>\"^^rdf:XMLLiteral") ; }
@Test(expected=ExWarning.class) public void checker42() { check("\"<x><y></x></y>\"^^rdf:XMLLiteral") ; }
@Test(expected=ExWarning.class) public void checker43() { check("\"<x/>\"^^rdf:XMLLiteral") ; }
@Test public void checker44() { check("'''<x xmlns=\"http://example/ns#\" attr=\"foo\"></x>'''^^rdf:XMLLiteral" ) ; }
@Test(expected=ExWarning.class) public void checker45() { check("'''<x attr=\"foo\" xmlns=\"http://example/ns#\"></x>'''^^rdf:XMLLiteral") ; }