for (int k=0; k<sbmlTree.getSelectionCount(); ++k){
DefaultMutableTreeNode node = (DefaultMutableTreeNode) paths[k].getLastPathComponent();
Object obj = node.getUserObject();
if (obj instanceof NamedSBase){
NamedSBase namedSBase = (NamedSBase) node.getUserObject();
Class<? extends NamedSBase> currentClass = namedSBase.getClass();
if ( currentClass.equals(Reaction.class) ||
currentClass.equals(Species.class) ||
currentClass.equals(QualitativeSpecies.class) ||
currentClass.equals(Transition.class)
){
String id = namedSBase.getId();
selectedIds.add(id);
}
}
}
return selectedIds;