- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 19 Aug 2009 18:53:00 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist In directory hutz:/tmp/cvs-serv25121/src/org/w3c/unicorn/tasklist Modified Files: Tag: dev2 Task.java Log Message: added a signature to getMapOfParameter to select only "simple" ou "advanced" parameters Index: Task.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/Attic/Task.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Task.java 11 Aug 2009 16:05:40 -0000 1.1.2.1 +++ Task.java 19 Aug 2009 18:52:58 -0000 1.1.2.2 @@ -5,6 +5,7 @@ package org.w3c.unicorn.tasklist; import java.util.ArrayList; +import java.util.Hashtable; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -243,6 +244,17 @@ public Map<String, Parameter> getMapOfParameter() { return this.mapOfTaskParameter; } + + public Map<String, Parameter> getMapOfParameter(String uiLevel) { + //Map<String, Parameter> map = new LinkedHashMap<String, Parameter>(); + Hashtable <String, Parameter> map = new Hashtable <String, Parameter>(); + for (String key : mapOfTaskParameter.keySet()) { + if (mapOfTaskParameter.get(key).getUiLevel().toString().equals(uiLevel)) { + map.put(key, mapOfTaskParameter.get(key)); + } + } + return map; + } /** * Sets the parameters list of this task @@ -386,11 +398,18 @@ final int iStringBufferSize = 5000; final String sVariableSeparator = "\n"; final StringBuffer aStringBuffer = new StringBuffer(iStringBufferSize); - - aStringBuffer.append("ID:").append(sID); + aStringBuffer.append(sVariableSeparator); + aStringBuffer.append("ID:").append(sID); aStringBuffer.append(sVariableSeparator); - aStringBuffer.append("parameters:").append(this.mapOfTaskParameter); + aStringBuffer.append("parameters:\n"); //.append(this.mapOfTaskParameter); + for (String key : mapOfTaskParameter.keySet()) { + Parameter param = mapOfTaskParameter.get(key); + aStringBuffer.append("\t" + key + " (" + param.getUiLevel() + "-" + param.getType() + ") => \n"); + for (String key1: param.getMapOfValue().keySet()) { + aStringBuffer.append("\t\t" + key1 + " => " + mapOfTaskParameter.get(key).getMapOfValue().get(key1) + "\n"); + } + } aStringBuffer.append(sVariableSeparator); aStringBuffer.append("references:").append(this.listOfReference);
Received on Wednesday, 19 August 2009 18:53:10 UTC