Skip to content

Commit

Permalink
add id label map for only-in-taxon
Browse files Browse the repository at this point in the history
* related to issue geneontology/amigo#56
  • Loading branch information
Heiko Dietze committed Dec 3, 2015
1 parent 1ccd50f commit 1d2cd29
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,18 @@ public Set<String> getOnlyInTaxonLabels(OWLObject x, List<String> sargs) {
return Collections.emptySet();
}

public Map<String, String> getOnlyInTaxonLabelMap(OWLObject x, List<String> sargs) {
Set<OWLClass> classes = getOnlyInTaxonSvfClasses(x);
if (classes.isEmpty() == false) {
Map<String, String> labelMap = new HashMap<String, String>();
for(OWLClass cls : classes) {
labelMap.put(getIdentifier(cls), getLabelOrDisplayId(cls));
}
return labelMap;
}
return Collections.emptyMap();
}

private Set<OWLClass> getOnlyInTaxonSvfClasses(OWLObject x) {
if (x != null && x instanceof OWLClass) {
OWLClass c = (OWLClass) x;
Expand Down

0 comments on commit 1d2cd29

Please sign in to comment.