org.yawlfoundation.yawl.worklet.support
Class RdrConversionTools

java.lang.Object
  extended by org.yawlfoundation.yawl.worklet.support.RdrConversionTools

public class RdrConversionTools
extends Object

This class contains some static methods that convert some objects to Strings and vice versa. It supports the stringifying of some objects for persistence purposes.

Author:
Michael Adams v0.8, 04-09/2006

Constructor Summary
RdrConversionTools()
           
 
Method Summary
static String getChildValue(String xmlStr, String child)
          returns the String value of a child of the xml string passed
static String MapKeySetToString(Map map)
          Converts a list of a Map's keyset values to a String of csv's
static String StringListToString(List<String> list)
          Converts a list of String values to a String of csv's
static RdrNode stringToNode(String s, RdrTree tree)
          builds an RdrNode from its String representation
static RdrNode[] stringToSearchPair(String s, RdrTree tree)
          Build a pair of RdrNodes from their string representation.
static List<String> StringToStringList(String s)
          Converts a String of csv's and returns them as a String List PRE: 's' is a series of substrings delimited by commas
static String WIRListToString(List<WorkItemRecord> items)
           
static RdrNode xmlStringToNode(org.jdom.Element e, RdrTree tree)
          Builds an RdrNode from its JDOM Element representation
static WorkItemRecord xmlStringtoWIR(String xmlStr)
          Builds a WorkItemRecord from its representation as an XML String
static List<WorkItemRecord> xmlToWIRList(String xml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdrConversionTools

public RdrConversionTools()
Method Detail

stringToNode

public static RdrNode stringToNode(String s,
                                   RdrTree tree)
builds an RdrNode from its String representation


xmlStringToNode

public static RdrNode xmlStringToNode(org.jdom.Element e,
                                      RdrTree tree)
Builds an RdrNode from its JDOM Element representation

Parameters:
e - - the Element represerntation of the RdrNode
tree - - the tree that this node will become a member of
Returns:
- the reconstructed RdrNode

xmlStringtoWIR

public static WorkItemRecord xmlStringtoWIR(String xmlStr)
Builds a WorkItemRecord from its representation as an XML String

Parameters:
xmlStr -
Returns:
the reconstructed WorkItemRecord

stringToSearchPair

public static RdrNode[] stringToSearchPair(String s,
                                           RdrTree tree)
Build a pair of RdrNodes from their string representation. (The searchPair is returned after a tree search to denote the last node satisfied and the last node tested).

Parameters:
s - - the String representing the two RdrNodes
tree - - the tree that contains these two nodes
Returns:
- the reconstructed pair of nodes

StringToStringList

public static List<String> StringToStringList(String s)
Converts a String of csv's and returns them as a String List PRE: 's' is a series of substrings delimited by commas

Parameters:
s - - the string containing the comma separated values
Returns:
- the List of values

WIRListToString

public static String WIRListToString(List<WorkItemRecord> items)

xmlToWIRList

public static List<WorkItemRecord> xmlToWIRList(String xml)

StringListToString

public static String StringListToString(List<String> list)
Converts a list of String values to a String of csv's

Parameters:
list - - list of String values
Returns:
the String of comma separated values

MapKeySetToString

public static String MapKeySetToString(Map map)
Converts a list of a Map's keyset values to a String of csv's

Parameters:
map - - the map to convert
Returns:
the String of comma separated keyset values

getChildValue

public static String getChildValue(String xmlStr,
                                   String child)
returns the String value of a child of the xml string passed



Copyright © 2004-2012 The YAWL Foundation.