Returns a collection of all Relation instances within this set which include the specified Annotation or Relation @param id the ID of the Annotation or Relation to look for @return a set of all Relation instances within this set which
(Integer id)
| 366 | * which include the specified id |
| 367 | */ |
| 368 | public Collection<Relation> getReferencing(Integer id) { |
| 369 | |
| 370 | Set<Relation> relations = new HashSet<Relation>(); |
| 371 | for(int pos = 0; pos < getMaximumArity(); pos++) { |
| 372 | int[] constraint = new int[pos + 1]; |
| 373 | for(int i = 0; i < pos; i++) |
| 374 | constraint[i] = RelationSet.ANY; |
| 375 | constraint[pos] = id; |
| 376 | relations.addAll(getRelations(null, constraint)); |
| 377 | } |
| 378 | |
| 379 | return relations; |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * Calculates the intersection of a set of lists containing relation |
no test coverage detected