use of de.prob.animator.domainobjects.DotNode in project prob2 by bendisposto.
the class AbstractDotDiagramCmd method extractStates.
protected void extractStates(final ListPrologTerm s) {
for (PrologTerm prologTerm : s) {
if (prologTerm instanceof CompoundPrologTerm) {
CompoundPrologTerm cpt = (CompoundPrologTerm) prologTerm;
String id = Transition.getIdFromPrologTerm(cpt.getArgument(1));
List<String> labels = new ArrayList<>();
ListPrologTerm ls = BindingGenerator.getList(cpt.getArgument(4));
for (PrologTerm pt : ls) {
labels.add(pt.getFunctor());
}
int count = BindingGenerator.getInteger(cpt.getArgument(2)).getValue().intValue();
String color = cpt.getArgument(3).getFunctor();
DotNode n = new DotNode(id, labels, count, color);
nodes.put(id, n);
}
}
}
Aggregations