Examples of Initial


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

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

    private static void updateState(final State state, final Map<String, TransitionTarget> targets)
            throws ModelException {
        List<EnterableState> children = state.getChildren();
        if (state.isComposite()) {
            //initialize next / initial
            Initial ini = state.getInitial();
            if (ini == null) {
                state.setFirst(children.get(0).getId());
                ini = state.getInitial();
            }
            SimpleTransition initialTransition = ini.getTransition();
            updateTransition(initialTransition, targets);
            Set<TransitionTarget> 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

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

        // Pull in the parts of the external document as needed
        if (fragment == null) {
            // All targets pulled in since its not a src fragment
            if (ts instanceof State) {
                State s = (State) ts;
                Initial ini = new Initial();
                SimpleTransition t = new SimpleTransition();
                t.setNext(externalSCXML.getInitial());
                ini.setTransition(t);
                s.setInitial(ini);
                for (EnterableState child : externalSCXML.getChildren()) {
                    s.addChild(child);
                }
                s.setDatamodel(externalSCXML.getDatamodel());
View Full Code Here

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

     */
    private static void readInitial(final XMLStreamReader reader, final Configuration configuration,
                                    final State state)
            throws XMLStreamException, ModelException {

        Initial initial = new Initial();

        loop : while (reader.hasNext()) {
            String name, nsURI;
            switch (reader.next()) {
                case XMLStreamConstants.START_ELEMENT:
                    pushNamespaces(reader, configuration);
                    nsURI = reader.getNamespaceURI();
                    name = reader.getLocalName();
                    if (XMLNS_SCXML.equals(nsURI)) {
                        if (ELEM_TRANSITION.equals(name)) {
                            initial.setTransition(readSimpleTransition(reader, configuration));
                        } else {
                            reportIgnoredElement(reader, configuration, ELEM_INITIAL, nsURI, name);
                        }
                    } else {
                        reportIgnoredElement(reader, configuration, ELEM_INITIAL, nsURI, name);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.