CVSROOT: /sources/classpath Module name: cp-tools Changes by: Andrew John Hughes <gnu_andrew> 12/01/30 11:40:57
Modified files: . : ChangeLog Makefile.am src/gnu/ldml : DetailedListElement.java ListDataElement.java Parser.java src/gnu/localegen: PropertiesGenerator.java Added files: src/gnu/ldml : Leaf.java Log message: Store all values for a type name in a sorted set, rather than overwriting them. Include the first in output. 2012-01-30 Andrew John Hughes <gnu_and...@member.fsf.org> * Makefile.am: Add Leaf.java to files to compile. * src/gnu/ldml/DetailedListElement.java: DetailedListElement(Parser,ListDataElement,String,String)): Catch attemps to overwrite an existing element. * src/gnu/ldml/Leaf.java: New class to contain both the data found and the metadata about it (type, draft status, alternative text). * src/gnu/ldml/ListDataElement.java: (listData): Change type to Map<String,SortedSet<Leaf>>. (listElms): Change type to Map rather than HashMap. (addData(String,Leaf)): Document. Adapt to use Leaf and collect data with the same type name in a sorted set. (addElement(String, DetailedListElement)): Document and return the element replaced, if any. (getData(String)): Fix return type. (getData()): Likewise. * src/gnu/ldml/Parser.java: (List.start(String,Attributes)): Store draft and alt attributes. (List.end(String)): Update to use Leaf. (Collations.start(String,Attributes)): Catch overwriting and throw a SAXException. (allElements): Set type to Map rather than HashMap. * src/gnu/localegen/PropertiesGenerator.java: (ManualListContent(String,String...)): Make type more strict and use varargs. (OrderedListContent.data): Update type. (OrderedListContent(String,Map<String,SortedSet<Leaf>>>)): Likewise. (OrderedListContent.generateContent(PrintWriter)): Update to use set of Leaf objects. (HashtableContent.table): Update type. (HashtableContent(String,SortedMap<String,SortedSet<Leaf>>)): Likewise. (HashtableContent(String,Map<String,SortedSet<Leaf>>)): Likewise. (HashtableContent(SortedMap<String,String>,String)): New constructor to convert a map with just String data to one using sets of Leafs. (HashtableContent.generateContent(PrintWriter)): Update to use set of Leaf objects. (computeCalendar(Map<String,Element>>)): Likewise. (computeCurrencies(Map<String,Element>>)): Likewise. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/cp-tools/ChangeLog?cvsroot=classpath&r1=1.74&r2=1.75 http://cvs.savannah.gnu.org/viewcvs/cp-tools/Makefile.am?cvsroot=classpath&r1=1.18&r2=1.19 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/DetailedListElement.java?cvsroot=classpath&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/ListDataElement.java?cvsroot=classpath&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/Parser.java?cvsroot=classpath&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/Leaf.java?cvsroot=classpath&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/localegen/PropertiesGenerator.java?cvsroot=classpath&r1=1.11&r2=1.12