- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 20 Oct 2009 16:45:17 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl In directory hutz:/tmp/cvs-serv30953/src/org/w3c/unicorn/response/impl Modified Files: DefaultResponseXBeans.java OldResponseXBeans.java Log Message: + getURISortedMessages(String group) + implementations for old and new schema Index: DefaultResponseXBeans.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/DefaultResponseXBeans.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- DefaultResponseXBeans.java 20 Oct 2009 12:43:58 -0000 1.6 +++ DefaultResponseXBeans.java 20 Oct 2009 16:45:13 -0000 1.7 @@ -353,8 +353,25 @@ return Framework.mapOfObserver.get(observerID).getIndexURI(); } - public MessageIterable getMessages(String group) { + public Iterable<Message> getMessages(String group) { return new MessageIterable(null, null, group); } + + public Iterable<Message> getMessages(String group, String uri) { + return new MessageIterable(uri, null, group); + } + + public Map<String, Iterable<Message>> getURISortedMessages(String group) { + List<String> uris = new ArrayList<String>(); + for (Message mess : getMessages(group)) { + if (!uris.contains(mess.getURI())) + uris.add(mess.getURI()); + } + Map<String, Iterable<Message>> sortedMap = new Hashtable<String, Iterable<Message>>(); + for (String uri : uris) { + sortedMap.put(uri, getMessages(group, uri)); + } + return sortedMap; + } } Index: OldResponseXBeans.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/OldResponseXBeans.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- OldResponseXBeans.java 20 Oct 2009 12:42:33 -0000 1.4 +++ OldResponseXBeans.java 20 Oct 2009 16:45:14 -0000 1.5 @@ -295,5 +295,9 @@ public Iterable<Message> getMessages(String group) { return null; } + + public Map<String, Iterable<Message>> getURISortedMessages(String group) { + return null; + } }
Received on Tuesday, 20 October 2009 16:45:21 UTC