}
private static Triple triple(NodeTable nodeTable, NodeId s, NodeId p, NodeId o)
{
if ( ! NodeId.isConcrete(s) )
throw new InternalErrorException("Invalid id for subject: "+fmt(s,p,o)) ;
if ( ! NodeId.isConcrete(p) )
throw new InternalErrorException("Invalid id for predicate: "+fmt(s,p,o)) ;
if ( ! NodeId.isConcrete(o) )
throw new InternalErrorException("Invalid id for object: "+fmt(s,p,o)) ;
Node sNode = nodeTable.getNodeForNodeId(s) ;
if ( sNode == null )
throw new InternalErrorException("Invalid id node for subject (null node): "+fmt(s,p,o)) ;
Node pNode = nodeTable.getNodeForNodeId(p) ;
if ( pNode == null )
{
nodeTable.getNodeForNodeId(p) ;
throw new InternalErrorException("Invalid id node for predicate (null node): "+fmt(s,p,o)) ;
}
Node oNode = nodeTable.getNodeForNodeId(o) ;
if ( oNode == null )
throw new InternalErrorException("Invalid id node for object (null node): "+fmt(s,p,o)) ;
return new Triple(sNode, pNode, oNode) ;
}