code: public Map<Shape, Set<ShapeTarget>> getExplicitShapeTargets(Collection<Shape> shapes) {
          Map<Shape, Set<ShapeTarget>> targets = new HashMap<>();
          shapes.forEach( s -> {
              Set<ShapeTarget> trgs = BatchShapeTargetReader.create().read(s.getElement());
              if (!trgs.isEmpty()) {
                  targets.put(s, trgs);
              }
          });
          return  targets;
      }
docs: /*
  public Set<TestCase> generateTestCasesOld() {
  ImmutableSet.Builder<TestCase> builder = ImmutableSet.builder();
  
  getShapes().forEach( shape -> // for every shape
  shape.getTargets().forEach(target ->  // for every target (skip if none)
  shape.getPropertyConstraintGroups().forEach( ppg ->
  ppg.getPropertyConstraints().forEach( ppc -> {
  String filter = ppg.getPropertyFilter();
  if (!ppc.usesValidatorFunction()) {filter = "";}
  builder.add(
  TestCaseWithTarget.builder()
  .target(target)
  .filterSpqrql(filter)
  .testCase(ppc.getTestCase(ppg.isInverse()))
  .build());
  } ))));
  
  return builder.build();
  }