Changeset 122:886c9fcc8dbb
- Timestamp:
- 07/30/08 14:19:06 (5 years ago)
- Author:
- jbarouh
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@123
- Message:
-
Test for the new Task.expand method.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r115
|
r122
|
|
| 8 | 8 | import java.io.IOException; |
| 9 | 9 | import java.util.ArrayList; |
| | 10 | import java.util.HashMap; |
| | 11 | import java.util.LinkedHashMap; |
| | 12 | import java.util.Map; |
| 10 | 13 | |
| 11 | 14 | import org.apache.xmlbeans.XmlException; |
| | 15 | import org.w3.unicorn.tasklist.TaskType; |
| 12 | 16 | import org.w3.unicorn.tasklist.TasklistDocument; |
| 13 | 17 | import org.w3c.unicorn.tasklist.Task; |
| … |
… |
|
| 26 | 30 | TasklistDocument tasklist=TasklistDocument.Factory.parse(new File("resources/tasklist/new-tasklist.xml")); |
| 27 | 31 | Task aTask=new Task(tasklist.getTasklist().getTaskArray(0)); |
| 28 | | ArrayList<TLTExec> liste=new ArrayList<TLTExec>(); |
| 29 | | aTask.getExecs(liste, aTask.getTree()); |
| 30 | | for(TLTExec exec: liste){ |
| 31 | | System.out.println(exec); |
| | 32 | Map<String, Task> mapOfTask = new LinkedHashMap<String, Task>(); |
| | 33 | for(TaskType myTask : tasklist.getTasklist().getTaskArray()){ |
| | 34 | Task bTask=new Task(myTask); |
| | 35 | mapOfTask.put(bTask.getID(), bTask); |
| 32 | 36 | } |
| | 37 | aTask.setRoot(aTask.expandNode(mapOfTask, aTask.getRoot())); |
| | 38 | aTask.displayTree(aTask.getRoot()); |
| 33 | 39 | } catch (XmlException e) { |
| 34 | | // TODO Auto-generated catch block |
| 35 | 40 | e.printStackTrace(); |
| 36 | 41 | } catch (IOException e) { |
| 37 | | // TODO Auto-generated catch block |
| 38 | 42 | e.printStackTrace(); |
| 39 | 43 | } |