org.activemath.events.impl
Class EventEncoderProperties

java.lang.Object
  extended by org.activemath.events.impl.EventEncoderProperties

public class EventEncoderProperties
extends Object

Utility class to encode ActivemathEvents as a Map


Constructor Summary
EventEncoderProperties()
           
 
Method Summary
static List elems2strings(List list)
          Creates a Vector out of the incoming List, where each element of the returned vector is the string which represents the jdom.Element of the incoming List.
static List<org.jdom.Element> strings2elems(List<Object> vector)
          Creates a List out of the incoming List, where each element of the returned list is a jdom.Element which is constructed out of the string-element of the incoming list.
static Map toMap(ActivemathEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventEncoderProperties

public EventEncoderProperties()
Method Detail

toMap

public static Map toMap(ActivemathEvent event)

elems2strings

public static List elems2strings(List list)
Creates a Vector out of the incoming List, where each element of the returned vector is the string which represents the jdom.Element of the incoming List. Use this method to make a List of jdom.Elements tranferable via xml-rpc (e.g. if you need to send ExerciseStepEvents from/as a client).

Parameters:
list - A list of jdom.Elements
Returns:
A vector of strings

strings2elems

public static List<org.jdom.Element> strings2elems(List<Object> vector)
Creates a List out of the incoming List, where each element of the returned list is a jdom.Element which is constructed out of the string-element of the incoming list. If there is an element in the incoming list, which is an instance of Element, it as added as it is. Use this method to make a List of Strings readable into an ActiveMathEvent (e.g. if you need to receive ExerciseStepEvents from/as a client via xml-rpc).

Parameters:
vector - A vector of strings
Returns:
A list of jdom.Elements