1 /*
2 * @(#)$Id: JdomBatchSequenceValue.java 689 2009-07-22 00:10:27Z bsigner $
3 *
4 * Author : Ueli Kurmann, igesture@uelikurmann.ch
5 *
6 *
7 * Purpose :
8 *
9 * -----------------------------------------------------------------------
10 *
11 * Revision Information:
12 *
13 * Date Who Reason
14 *
15 * 15.10.2008 ukurmann Initial Release
16 *
17 * -----------------------------------------------------------------------
18 *
19 * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20 *
21 * This software is the proprietary information of ETH Zurich.
22 * Use is subject to license terms.
23 *
24 */
25
26
27 package org.ximtec.igesture.batch.core.jdom;
28
29 import java.util.List;
30
31 import org.jdom.Element;
32 import org.ximtec.igesture.batch.core.BatchSequenceValue;
33
34
35
36 /**
37 * Comment
38 * @version 1.0 15.10.2008
39 * @author Ueli Kurmann
40 */
41 public class JdomBatchSequenceValue {
42
43 public static String ROOT_TAG = "sequence";
44
45 public static String CHILD_TAG = "value";
46
47 /**
48 * Imports a BatchSequenceValue from an XML element.
49 * @param parameterValue the XML element the value has to be imported from.
50 * @return the BatchSequenceValue imported from the XML element.
51 */
52 @SuppressWarnings("unchecked")
53 public static BatchSequenceValue unmarshal(Element parameterValue) {
54 final BatchSequenceValue value = new BatchSequenceValue();
55 final List<Element> children = parameterValue.getChildren(CHILD_TAG);
56
57 for (final Element element : children) {
58 value.addValue(element.getText());
59 }
60
61 return value;
62 } // unmarshal
63
64
65 }