private void populateConstraintReportIndividual() { Constraints constraints = this.report.getConstraints(); LOGGER.debug("Populating constraints: {}",constraints); reportInd().addValue(vocabularyTerm(RDF.TYPE), externalIndividual(ldp4jTerm("ConstraintReport"))); reportInd().addValue(ldp4jTerm("failureId"), literal(this.report.id().failureId())); reportInd().addValue(ldp4jTerm("failureDate"), literal(this.report.getDate())); reportInd().addValue(ldp4jTerm("failureRequest"), requestInd()); IndividualTranslator translator = new IndividualTranslator(); ShapeIndividualCache shapeCache=new ShapeIndividualCache(); Queue<Shape> pendingShapes=Lists.newLinkedList(constraints.shapes()); while(!pendingShapes.isEmpty()) { Shape shape=pendingShapes.poll(); if(!shapeCache.isPopulated(shape)) { shapeCache.populate(shape); Set<Shape> foundShapes = populateShapeDefinition(shape, shapeCache, translator); pendingShapes.addAll(foundShapes); } } for(URI type:constraints.types()) { Individual<?,?> typeInd=externalIndividual(type); typeInd.addValue(shaclTerm("typeShape"), shapeCache.individual(constraints.typeShape(type))); } for(Individual<?, ?> node:constraints.nodes(dataset)) { Individual<?, ?> individual = translator.translate(node); individual.addValue(shaclTerm("nodeShape"), shapeCache.individual(constraints.nodeShape(node))); } }