Changeset 30568 in osm for applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom
- Timestamp:
- 2014-08-06T19:33:57+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom
- Files:
-
- 13 edited
-
ChildCreator.java (modified) (1 diff)
-
ImmutableDocStyledNode.java (modified) (1 diff)
-
ODMeta.java (modified) (2 diffs)
-
ODPackage.java (modified) (2 diffs)
-
ODSingleXMLDocument.java (modified) (2 diffs)
-
ODXMLDocument.java (modified) (3 diffs)
-
StyleDesc.java (modified) (1 diff)
-
StyleStyle.java (modified) (1 diff)
-
XMLVersion.java (modified) (1 diff)
-
spreadsheet/Cell.java (modified) (1 diff)
-
spreadsheet/Row.java (modified) (2 diffs)
-
spreadsheet/SpreadSheet.java (modified) (1 diff)
-
spreadsheet/Table.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ChildCreator.java
r28000 r30568 37 37 throw new NullPointerException("null content"); 38 38 this.content = content; 39 this.elemsOrder = new ArrayList< Element>(children);39 this.elemsOrder = new ArrayList<>(children); 40 40 } 41 41 -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ImmutableDocStyledNode.java
r28000 r30568 25 25 26 26 private static final Set<Document> getDocuments(final ODPackage pkg) { 27 final Set<Document> res = new HashSet< Document>();27 final Set<Document> res = new HashSet<>(); 28 28 for (final String entry : pkg.getEntries()) { 29 29 final ODPackageEntry e = pkg.getEntry(entry); -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ODMeta.java
r28000 r30568 42 42 private static final Map<XMLVersion, List<Element>> ELEMS_ORDER; 43 43 static { 44 ELEMS_ORDER = new HashMap< XMLVersion, List<Element>>(2);44 ELEMS_ORDER = new HashMap<>(2); 45 45 ELEMS_ORDER.put(XMLVersion.getOOo(), createChildren(XMLVersion.getOOo())); 46 46 ELEMS_ORDER.put(XMLVersion.getOD(), createChildren(XMLVersion.getOD())); … … 50 50 final Namespace meta = ins.getMETA(); 51 51 final Namespace dc = ins.getNS("dc"); 52 final List<Element> res = new ArrayList< Element>(8);52 final List<Element> res = new ArrayList<>(8); 53 53 res.add(new Element("generator", meta)); 54 54 res.add(new Element("title", dc)); -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ODPackage.java
r28000 r30568 37 37 private static final Set<String> subdocNames; 38 38 static { 39 subdocNames = new HashSet< String>();39 subdocNames = new HashSet<>(); 40 40 // section 2.1 of OpenDocument-v1.1-os.odt 41 41 subdocNames.add("content.xml"); … … 49 49 50 50 public ODPackage() { 51 this.files = new HashMap< String, ODPackageEntry>();51 this.files = new HashMap<>(); 52 52 this.file = null; 53 53 } -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ODSingleXMLDocument.java
r28000 r30568 28 28 final static Set<String> DONT_PREFIX; 29 29 static { 30 DONT_PREFIX = new HashSet< String>();30 DONT_PREFIX = new HashSet<>(); 31 31 // don't touch to user fields and variables 32 32 // we want them to be the same across the document … … 57 57 ODSingleXMLDocument(ODSingleXMLDocument doc, ODPackage p) { 58 58 super(doc); 59 this.stylesNames = new HashSet< String>(doc.stylesNames);60 this.listStylesNames = new HashSet< String>(doc.listStylesNames);59 this.stylesNames = new HashSet<>(doc.stylesNames); 60 this.listStylesNames = new HashSet<>(doc.listStylesNames); 61 61 this.pkg = p; 62 62 this.meta = ODMeta.create(this); -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/ODXMLDocument.java
r28000 r30568 41 41 private static final Map<XMLVersion, List<Element>> ELEMS_ORDER; 42 42 static { 43 ELEMS_ORDER = new HashMap< XMLVersion, List<Element>>(2);43 ELEMS_ORDER = new HashMap<>(2); 44 44 ELEMS_ORDER.put(XMLVersion.getOOo(), createChildren(XMLVersion.getOOo())); 45 45 ELEMS_ORDER.put(XMLVersion.getOD(), createChildren(XMLVersion.getOD())); … … 48 48 private static final List<Element> createChildren(XMLVersion ins) { 49 49 final Namespace ns = ins.getOFFICE(); 50 final List<Element> res = new ArrayList< Element>(8);50 final List<Element> res = new ArrayList<>(8); 51 51 res.add(new Element("meta", ns)); 52 52 res.add(new Element("settings", ns)); … … 63 63 static private final Map<String, String> namePrefixes; 64 64 static { 65 namePrefixes = new HashMap< String, String>();65 namePrefixes = new HashMap<>(); 66 66 namePrefixes.put("table:table", "table"); 67 67 namePrefixes.put("text:a", "office"); -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/StyleDesc.java
r28000 r30568 68 68 this.family = family; 69 69 this.baseName = baseName; 70 this.refElements = new CollectionMap< String, String>();70 this.refElements = new CollectionMap<>(); 71 71 // 4 since they are not common 72 this.multiRefElements = new CollectionMap< String, String>(4);72 this.multiRefElements = new CollectionMap<>(4); 73 73 } 74 74 -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/StyleStyle.java
r28000 r30568 37 37 private static boolean descsLoaded = false; 38 38 static { 39 family2Desc = new HashMap< XMLVersion, Map<String, StyleDesc<?>>>();40 class2Desc = new HashMap< XMLVersion, Map<Class<? extends StyleStyle>, StyleDesc<?>>>();39 family2Desc = new HashMap<>(); 40 class2Desc = new HashMap<>(); 41 41 for (final XMLVersion v : XMLVersion.values()) { 42 42 family2Desc.put(v, new HashMap<String, StyleDesc<?>>()); -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/XMLVersion.java
r28000 r30568 81 81 82 82 private XMLVersion(String name, Namespace manifest) { 83 this.nss = new HashMap< String, Namespace>(16);83 this.nss = new HashMap<>(16); 84 84 } 85 85 -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/spreadsheet/Cell.java
r28000 r30568 136 136 */ 137 137 public String getTextValue(final boolean ooMode) { 138 final List<String> ps = new ArrayList< String>();138 final List<String> ps = new ArrayList<>(); 139 139 for (final Object o : this.getElement().getChildren()) { 140 140 final Element child = (Element) o; -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/spreadsheet/Row.java
r28000 r30568 44 44 this.parent = parent; 45 45 this.index = index; 46 this.cells = new ArrayList< Cell<D>>();46 this.cells = new ArrayList<>(); 47 47 for (final Element cellElem : this.getCellElements()) { 48 48 addCellElem(cellElem); … … 59 59 60 60 private void addCellElem(final Element cellElem) { 61 final Cell<D> cell = new Cell< D>(this, cellElem);61 final Cell<D> cell = new Cell<>(this, cellElem); 62 62 this.cells.add(cell); 63 63 -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/spreadsheet/SpreadSheet.java
r28000 r30568 49 49 50 50 // map Sheet by XML elements so has not to depend on ordering or name 51 this.sheets = new HashMap< Element, Sheet>();51 this.sheets = new HashMap<>(); 52 52 } 53 53 -
applications/editors/josm/plugins/opendata/includes/org/jopendocument/dom/spreadsheet/Table.java
r28000 r30568 44 44 super(parent, local, TableStyle.class); 45 45 46 this.rows = new ArrayList< Row<D>>();47 this.cols = new ArrayList< Column<D>>();46 this.rows = new ArrayList<>(); 47 this.cols = new ArrayList<>(); 48 48 49 49 this.readColumns(); … … 71 71 72 72 private final void addCol(Element clone) { 73 this.cols.add(new Column< D>(this, clone));73 this.cols.add(new Column<>(this, clone)); 74 74 } 75 75 76 76 private Tuple2<List<Element>, Integer> flatten(boolean col) { 77 final List<Element> res = new ArrayList< Element>();77 final List<Element> res = new ArrayList<>(); 78 78 final Element header = this.getElement().getChild("table-header-" + getName(col) + "s", getTABLE()); 79 79 if (header != null) … … 128 128 129 129 private synchronized void addRow(Element child) { 130 this.rows.add(new Row< D>(this, child, this.rows.size()));130 this.rows.add(new Row<>(this, child, this.rows.size())); 131 131 } 132 132
Note:
See TracChangeset
for help on using the changeset viewer.
