- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Sep 2009 13:45:15 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist In directory hutz:/tmp/cvs-serv13205/src/org/w3c/unicorn/tasklist Modified Files: TaskListUnmarshallerBeans.java Task.java Added Files: Group.java Output.java Log Message: created classes Ouput and Group to be xmlbeans independent --- NEW FILE: Output.java --- package org.w3c.unicorn.tasklist; import java.util.ArrayList; import java.util.List; public class Output { private List<Group> groupList; public List<Group> getGroupList() { if (groupList == null) groupList = new ArrayList<Group>(); return groupList; } public void setGroupList(List<Group> groupList) { this.groupList = groupList; } } Index: TaskListUnmarshallerBeans.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TaskListUnmarshallerBeans.java 2 Sep 2009 15:45:42 -0000 1.5 +++ TaskListUnmarshallerBeans.java 4 Sep 2009 13:45:13 -0000 1.6 @@ -12,6 +12,7 @@ import org.apache.xmlbeans.XmlException; import org.w3.unicorn.tasklist.CondType; import org.w3.unicorn.tasklist.ExecType; +import org.w3.unicorn.tasklist.GroupType; import org.w3.unicorn.tasklist.IfType; import org.w3.unicorn.tasklist.MappedType; import org.w3.unicorn.tasklist.ParameterType; @@ -93,7 +94,16 @@ aTaskCurrent.setTree(this.expandTree(aTask, aTask.getRoutine())); // Add the OutputList - aTaskCurrent.setOutput(aTask.getOutput()); + Output output = new Output(); + for (GroupType groupType : aTask.getOutput().getGroupList()) { + Group group = new Group(); + if (groupType.isSetType()) + group.setType(groupType.getType().toString()); + group.setObservationList(groupType.getObservationList()); + output.getGroupList().add(group); + } + + aTaskCurrent.setOutput(output); // parameters final ParametersType aParameters = aTask.getParameters(); Index: Task.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/Task.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Task.java 2 Sep 2009 15:45:42 -0000 1.4 +++ Task.java 4 Sep 2009 13:45:13 -0000 1.5 @@ -12,7 +12,6 @@ import javax.activation.MimeType; -import org.w3.unicorn.tasklist.OutputType; import org.w3c.unicorn.contract.Observer; import org.w3c.unicorn.tasklist.parameters.Parameter; import org.w3c.unicorn.tasklisttree.TLTCond; @@ -59,7 +58,7 @@ //private List<String> listOfOutput; - private OutputType output; + private Output output; /** * Creates a new Task. @@ -70,6 +69,7 @@ this.aLocalizedStringDescription = new LocalizedString(); this.mapOfTaskParameter = new LinkedHashMap<String, Parameter>(); this.listOfReference = new ArrayList<String>(); + //output.getGroupList().get(0) } /** @@ -428,11 +428,11 @@ return listOfOutput; }*/ - public void setOutput(OutputType output) { + public void setOutput(Output output) { this.output = output; } - public OutputType getOutput() { + public Output getOutput() { return output; } --- NEW FILE: Group.java --- package org.w3c.unicorn.tasklist; import java.util.List; public class Group { public enum Type { FIRSTPASSED } private Type type; private List<String> observationList; public boolean isSetType() { if (type != null) return true; return false; } public List<String> getObservationList() { return observationList; } public void setObservationList(List<String> observationList) { this.observationList = observationList; } public Type getType() { return type; } public void setType(Type type) { this.type = type; } public void setType(String type) { if (type.equalsIgnoreCase(Type.FIRSTPASSED.toString())) this.type = Type.FIRSTPASSED; } }
Received on Friday, 4 September 2009 13:45:25 UTC