Package org.apache.commons.scxml.model

Examples of org.apache.commons.scxml.model.Initial


        boolean f = s.isFinal();
        if (f) {
            b.append(" final=\"true\"");
        }
        b.append(">\n");
        Initial ini = s.getInitial();
        if (ini != null) {
            serializeInitial(b, ini, indent + INDENT);
        }
        List h = s.getHistory();
        if (h != null) {
View Full Code Here


      * @throws ModelException If the object model is flawed
      */
    private static void updateState(final State s, final Map targets)
    throws ModelException {
        //initialize next / inital
        Initial ini = s.getInitial();
        Map c = s.getChildren();
        List initialStates = null;
        if (!c.isEmpty()) {
            if (ini == null) {
                logAndThrowModelError(ERR_STATE_NO_INIT,
                    new Object[] {getStateName(s)});
            }
            Transition initialTransition = ini.getTransition();
            updateTransition(initialTransition, targets);
            initialStates = initialTransition.getTargets();
            // we have to allow for an indirect descendant initial (targets)
            //check that initialState is a descendant of s
            if (initialStates.size() == 0) {
View Full Code Here

                return;
            }
            State s = (State) digester.peek();
            if (fragment == null) {
                // All targets pulled in since its not a src fragment
                Initial ini = new Initial();
                Transition t = new Transition();
                t.setNext(externalSCXML.getInitialstate());
                ini.setTransition(t);
                s.setInitial(ini);
                Map children = externalSCXML.getChildren();
                Iterator childIter = children.values().iterator();
                while (childIter.hasNext()) {
                    s.addChild((TransitionTarget) childIter.next());
View Full Code Here

                return;
            }
            State s = (State) digester.peek();
            if (fragment == null) {
                // All targets pulled in since its not a src fragment
                Initial ini = new Initial();
                Transition t = new Transition();
                t.setNext(externalSCXML.getInitialstate());
                ini.setTransition(t);
                s.setInitial(ini);
                Map children = externalSCXML.getChildren();
                Iterator childIter = children.values().iterator();
                while (childIter.hasNext()) {
                    s.addChild((TransitionTarget) childIter.next());
View Full Code Here

      * @throws ModelException If the object model is flawed
      */
    private static void updateState(final State s, final Map targets)
    throws ModelException {
        //initialize next / inital
        Initial ini = s.getInitial();
        Map c = s.getChildren();
        List initialStates = null;
        if (!c.isEmpty()) {
            if (ini == null) {
                logAndThrowModelError(ERR_STATE_NO_INIT,
                    new Object[] {getStateName(s)});
            }
            Transition initialTransition = ini.getTransition();
            updateTransition(initialTransition, targets);
            initialStates = initialTransition.getTargets();
            // we have to allow for an indirect descendant initial (targets)
            //check that initialState is a descendant of s
            if (initialStates.size() == 0) {
View Full Code Here

                    TriggerEvent.CHANGE_EVENT);
            internalEvents.add(te);
            // actions in initial transition (if any) and .done events
            if (tt instanceof State) {
                State ts = (State) tt;
                Initial ini = ts.getInitial();
                if (ts.isComposite() && ini != null) {
                    try {
                        for (Iterator iniIter = ini.getTransition().
                                getActions().iterator(); iniIter.hasNext();) {
                            ((Action) iniIter.next()).execute(evtDispatcher,
                                errRep, scInstance, appLog, internalEvents);
                        }
                    } catch (SCXMLExpressionException e) {
View Full Code Here

        boolean f = s.isFinal();
        if (f) {
            b.append(" final=\"true\"");
        }
        b.append(">\n");
        Initial ini = s.getInitial();
        if (ini != null) {
            serializeInitial(b, ini, indent + INDENT);
        }
        List h = s.getHistory();
        if (h != null) {
View Full Code Here

                return;
            }
            State s = (State) digester.peek();
            if (fragment == null) {
                // All targets pulled in since its not a src fragment
                Initial ini = new Initial();
                Transition t = new Transition();
                t.setNext(externalSCXML.getInitial());
                ini.setTransition(t);
                s.setInitial(ini);
                Map children = externalSCXML.getChildren();
                Iterator childIter = children.values().iterator();
                while (childIter.hasNext()) {
                    s.addChild((TransitionTarget) childIter.next());
View Full Code Here

                return;
            }
            State s = (State) digester.peek();
            if (fragment == null) {
                // All targets pulled in since its not a src fragment
                Initial ini = new Initial();
                Transition t = new Transition();
                t.setNext(externalSCXML.getInitial());
                ini.setTransition(t);
                s.setInitial(ini);
                Map children = externalSCXML.getChildren();
                Iterator childIter = children.values().iterator();
                while (childIter.hasNext()) {
                    s.addChild((TransitionTarget) childIter.next());
View Full Code Here

                    states.add(st); //leaf
                } else if (st.isOrthogonal()) {
                    wrkSet.addLast(st.getParallel()); //parallel
                } else {
                    // composite state
                    Initial ini = st.getInitial();
                    if (ini == null) {
                        errRep.onError(ErrorConstants.NO_INITIAL,
                            "Initial pseudostate is missing!", st);
                    } else {
                        // If we are here, transition target must be a State
                        // or History
                        Transition initialTransition = ini.getTransition();
                        if (initialTransition == null) {
                            errRep.onError(ErrorConstants.ILLEGAL_INITIAL,
                                "Initial transition is null!", st);
                        } else {
                            TransitionTarget init = initialTransition.
View Full Code Here

TOP

Related Classes of org.apache.commons.scxml.model.Initial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.