public Map<String, String> decompose(Frontier frontier, String modelText) {
        if (!(frontier instanceof SCXMLFrontier)) {
            return null;
        }

        TransitionTarget target = ((SCXMLFrontier) frontier).getRoot().nextState;
        Map<String, String> variables = ((SCXMLFrontier) frontier).getRoot().variables;

        Map<String, String> decomposition = new HashMap<String, String>();
        decomposition.put("target", target.getId());

        StringBuilder packedVariables = new StringBuilder();
        for (Map.Entry<String, String> variable : variables.entrySet()) {
            packedVariables.append(variable.getKey());
            packedVariables.append("::");
            packedVariables.append(variable.getValue());
            packedVariables.append(";");
        }

        decomposition.put("variables", packedVariables.toString());
        decomposition.put("model", modelText);

        return decomposition;
    }
public Map < String , String > decompose ( Frontier frontier , String modelText ) { if ( ! ( frontier instanceof SCXMLFrontier ) ) { return null ; } TransitionTarget target = ( ( SCXMLFrontier ) frontier ) . getRoot ( ) . nextState ; Map < String , String > variables = ( ( SCXMLFrontier ) frontier ) . getRoot ( ) . variables ; Map < String , String > decomposition = new HashMap < String , String > ( ) ; decomposition . put ( "target" , target . getId ( ) ) ; StringBuilder packedVariables = new StringBuilder ( ) ; for ( Map . Entry < String , String > variable : variables . entrySet ( ) ) { packedVariables . append ( variable . getKey ( ) ) ; packedVariables . append ( "::" ) ; packedVariables . append ( variable . getValue ( ) ) ; packedVariables . append ( ";" ) ; } decomposition . put ( "variables" , packedVariables . toString ( ) ) ; decomposition . put ( "model" , modelText ) ; return decomposition ; }
Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings
These strings can be sent over a network to get a Frontier past a 'gap'

@param frontier  the Frontier
@param modelText the model
@return the map of strings representing a decomposition