MCPcopy Create free account
hub / github.com/GateNLP/gate-core / getReferencing

Method getReferencing

src/main/java/gate/relations/RelationSet.java:368–380  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

deleteRelationMethod · 0.95
annotationRemovedMethod · 0.95

Calls 3

getMaximumArityMethod · 0.95
getRelationsMethod · 0.95
addAllMethod · 0.45

Tested by

no test coverage detected