/** * Automatically set a valid <code>WebLabRI</code> to the created <code>PieceOfKnowledge</code> using the <code>ResultSet</code> in parameter to generate an * unique id. Created <code>PoK</code> will be added to <code>resultSet</code>. * * @param resultSet * the <code>ResultSet</code> that will contains the created <code>PieceOfKnowledge</code> * @return a new <code>PieceOfKnowledge</code> with a valid <code>WebLabRI</code> and added to <code>resultSet</code> */ public static PieceOfKnowledge createAndLinkPoK(final ResultSet resultSet) { final PieceOfKnowledge pok = new PieceOfKnowledge(); try { pok.setUri(PoKFactory.getUniqueWelLabRIFrom(resultSet)); resultSet.setPok(pok); } catch (final WebLabRISyntaxException wlrise) { throw new WebLabResourceCreationException(WebLabResourceCreationException.EXCEPTION + "PieceOfKnowledge", wlrise); } return pok; }