private void checkTriple(Node subject, Node predicate, Node object, long line, long col)
{
if ( subject == null || ( ! subject.isURI() && ! subject.isBlank() ) )
{
errorHandler.error("Subject is not a URI or blank node", line, col) ;
throw new RiotException("Bad subject: "+subject) ;
}
if ( predicate == null || ( ! predicate.isURI() ) )
{
errorHandler.error("Predicate not a URI", line, col) ;
throw new RiotException("Bad predicate: "+predicate) ;
}
if ( object == null || ( ! object.isURI() && ! object.isBlank() && ! object.isLiteral() ) )
{
errorHandler.error("Object is not a URI, blank node or literal", line, col) ;
throw new RiotException("Bad object: "+object) ;
}
}