Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml.io
Class SCXMLSerializer

    java.lang.Object
      org.apache.commons.scxml.io.SCXMLSerializer

public class SCXMLSerializer
extends Object

Utility class for serializing the Commons SCXML Java object model. Class uses the visitor pattern to trace through the object heirarchy. Used primarily for testing, debugging and visual verification.

Method Summary
`static String` | `getBodyContent(ExternalContent externalContent)` Return serialized body of `ExternalContent`.
`static String` | `serialize(SCXML scxml)` Serialize this SCXML object (primarily for debugging).
`static boolean` | `serializeActions(StringBuffer b, List l, String indent)` Serialize this List of actions.
`static void` | `serializeDatamodel(StringBuffer b, Datamodel dm, String indent)` Serialize this Datamodel object.
`static void` | `serializeHistory(StringBuffer b, List l, String indent)` Serialize the History.
`static void` | `serializeIf(StringBuffer b, If iff, String indent)` Serialize this If object.
`static void` | `serializeInitial(StringBuffer b, Initial i, String indent)` Serialize this Initial object.
`static void` | `serializeInvoke(StringBuffer b, Invoke i, String indent)` Serialize this Invoke object.
`static void` | `serializeOnEntry(StringBuffer b, TransitionTarget t, String indent)` Serialize this OnEntry object.
`static void` | `serializeOnExit(StringBuffer b, TransitionTarget t, String indent)` Serialize this OnExit object.
`static void` | `serializeParallel(StringBuffer b, Parallel p, String indent)` Serialize this Parallel object.
`static void` | `serializeSend(StringBuffer b, Send send, String indent)` Serialize this Send object.
`static void` | `serializeState(StringBuffer b, State s, String indent)` Serialize this State object.
`static void` | `serializeTarget(StringBuffer b, Transition t, String indent)` Deprecated. Inline <target> element has been deprecated in the SCXML WD
`static void` | `serializeTransition(StringBuffer b, Transition t, String indent)` Serialize this Transition object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### serialize

    public static String serialize(SCXML scxml)

  Serialize this SCXML object (primarily for debugging).

  Parameters:
    `scxml` - The SCXML to be serialized
  Returns:
    String The serialized SCXML

### serializeState

    public static void serializeState(StringBuffer b,
                                      State s,
                                      String indent)

  Serialize this State object.

  Parameters:
    `b` - The buffer to append the serialization to
    `s` - The State to serialize
    `indent` - The indent for this XML element

### serializeParallel

    public static void serializeParallel(StringBuffer b,
                                         Parallel p,
                                         String indent)

  Serialize this Parallel object.

  Parameters:
    `b` - The buffer to append the serialization to
    `p` - The Parallel to serialize
    `indent` - The indent for this XML element

### serializeInvoke

    public static void serializeInvoke(StringBuffer b,
                                       Invoke i,
                                       String indent)

  Serialize this Invoke object.

  Parameters:
    `b` - The buffer to append the serialization to
    `i` - The Invoke to serialize
    `indent` - The indent for this XML element

### serializeInitial

    public static void serializeInitial(StringBuffer b,
                                        Initial i,
                                        String indent)

  Serialize this Initial object.

  Parameters:
    `b` - The buffer to append the serialization to
    `i` - The Initial to serialize
    `indent` - The indent for this XML element

### serializeHistory

    public static void serializeHistory(StringBuffer b,
                                        List l,
                                        String indent)

  Serialize the History.

  Parameters:
    `b` - The buffer to append the serialization to
    `l` - The List of History objects to serialize
    `indent` - The indent for this XML element

### serializeTransition

    public static void serializeTransition(StringBuffer b,
                                           Transition t,
                                           String indent)

  Serialize this Transition object.

  Parameters:
    `b` - The buffer to append the serialization to
    `t` - The Transition to serialize
    `indent` - The indent for this XML element

### serializeTarget

    public static void serializeTarget(StringBuffer b,
                                       Transition t,
                                       String indent)

  Deprecated. Inline <target> element has been deprecated in the SCXML WD

  Serialize this Transition's Target.

  Parameters:
    `b` - The buffer to append the serialization to
    `t` - The Transition whose Target needs to be serialized
    `indent` - The indent for this XML element

### serializeDatamodel

    public static void serializeDatamodel(StringBuffer b,
                                          Datamodel dm,
                                          String indent)

  Serialize this Datamodel object.

  Parameters:
    `b` - The buffer to append the serialization to
    `dm` - The Datamodel to be serialized
    `indent` - The indent for this XML element

### serializeOnEntry

    public static void serializeOnEntry(StringBuffer b,
                                        TransitionTarget t,
                                        String indent)

  Serialize this OnEntry object.

  Parameters:
    `b` - The buffer to append the serialization to
    `t` - The TransitionTarget whose OnEntry is to be serialized
    `indent` - The indent for this XML element

### serializeOnExit

    public static void serializeOnExit(StringBuffer b,
                                       TransitionTarget t,
                                       String indent)

  Serialize this OnExit object.

  Parameters:
    `b` - The buffer to append the serialization to
    `t` - The TransitionTarget whose OnExit is to be serialized
    `indent` - The indent for this XML element

### serializeActions

    public static boolean serializeActions(StringBuffer b,
                                           List l,
                                           String indent)

  Serialize this List of actions.

  Parameters:
    `b` - The buffer to append the serialization to
    `l` - The List of actions to serialize
    `indent` - The indent for this XML element
  Returns:
    boolean true if the list of actions contains an <exit/>

### serializeSend

    public static void serializeSend(StringBuffer b,
                                     Send send,
                                     String indent)

  Serialize this Send object.

  Parameters:
    `b` - The buffer to append the serialization to
    `send` - The Send object to serialize
    `indent` - The indent for this XML element

### getBodyContent

    public static final String getBodyContent(ExternalContent externalContent)

  Return serialized body of `ExternalContent`.

  Parameters:
    `externalContent` - The model element containing the body content
  Returns:
    String The serialized body content

### serializeIf

    public static void serializeIf(StringBuffer b,
                                   If iff,
                                   String indent)

  Serialize this If object.

  Parameters:
    `b` - The buffer to append the serialization to
    `iff` - The If object to serialize
    `indent` - The indent for this XML element

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 The Apache Software Foundation. All Rights Reserved.