Search in sources :

Example 1 with DotEdge

use of de.prob.animator.domainobjects.DotEdge in project prob2 by bendisposto.

the class AbstractDotDiagramCmd method extractTransitions.

protected void extractTransitions(final ListPrologTerm trans) {
    for (PrologTerm pt : trans) {
        if (pt instanceof CompoundPrologTerm) {
            CompoundPrologTerm cpt = (CompoundPrologTerm) pt;
            String id = Transition.getIdFromPrologTerm(cpt.getArgument(1));
            String src = Transition.getIdFromPrologTerm(cpt.getArgument(2));
            String dest = Transition.getIdFromPrologTerm(cpt.getArgument(3));
            String label = cpt.getArgument(4).toString();
            String style = cpt.getArgument(5).getFunctor();
            String color = cpt.getArgument(6).getFunctor();
            DotEdge e = new DotEdge(id, src, dest, label, style, color);
            edges.put(id, e);
        }
    }
}
Also used : DotEdge(de.prob.animator.domainobjects.DotEdge) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm)

Aggregations

DotEdge (de.prob.animator.domainobjects.DotEdge)1 CompoundPrologTerm (de.prob.prolog.term.CompoundPrologTerm)1 ListPrologTerm (de.prob.prolog.term.ListPrologTerm)1 PrologTerm (de.prob.prolog.term.PrologTerm)1