code: public static SameAsTargets extract(Mapping mapping) {
          Optional<RDFAtomPredicate> triplePredicate = mapping.getRDFAtomPredicates().stream()
                  .filter(p -> p instanceof TriplePredicate)
                  .findFirst();
  
          return triplePredicate
                  .map(p -> {
                      ImmutableSet<Constant> iriTemplates = extractSameAsIRITemplates(mapping, p);
                      return extractSameAsTargets(iriTemplates, mapping, p);
                  })
                  .orElseGet(() -> new SameAsTargets(ImmutableSet.of(), ImmutableSet.of()));
      }
docs: TODO: Generalise it to quads and so on