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

Method getRelations

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

Finds relations based on their type. @param type the type of relation being sought. @return the list of all relations in this RelationSet that have the required type.

(String type)

Source from the content-addressed store, hash-verified

267 * have the required type.
268 */
269 public Collection<Relation> getRelations(String type) {
270 List<Relation> res = new ArrayList<Relation>();
271 BitSet rels = indexByType.get(type);
272 if(rels != null) {
273 for(int relPos = 0; relPos <= maxID; relPos++) {
274 if(rels.get(relPos)) res.add(indexById.get(relPos));
275 }
276 }
277 return res;
278 }
279
280 public Relation get(Integer id) {
281 return indexById.get(id);

Callers 1

getReferencingMethod · 0.95

Calls 4

getMaximumArityMethod · 0.95
intersectionMethod · 0.95
getMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected