Skip to content
Snippets Groups Projects
Commit a9492e15 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

- some code refactoring

- respect java standards
- No more use of DbData.splitDbData: directly return the expected data array at extraction (TANGOARCH-715)
parent 11e4af58
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -72,6 +71,10 @@ ...@@ -72,6 +71,10 @@
<groupId>fr.soleil.lib</groupId> <groupId>fr.soleil.lib</groupId>
<artifactId>snapArchivingApi</artifactId> <artifactId>snapArchivingApi</artifactId>
</dependency> </dependency>
<dependency>
<groupId>fr.soleil.gui</groupId>
<artifactId>commonArchivingGUI</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.swinglabs</groupId> <groupId>org.swinglabs</groupId>
<artifactId>swingx</artifactId> <artifactId>swingx</artifactId>
...@@ -112,10 +115,6 @@ ...@@ -112,10 +115,6 @@
<groupId>fr.soleil.lib</groupId> <groupId>fr.soleil.lib</groupId>
<artifactId>ApplicationUtilities</artifactId> <artifactId>ApplicationUtilities</artifactId>
</dependency> </dependency>
<dependency>
<groupId>fr.soleil.gui</groupId>
<artifactId>commonArchivingGUI</artifactId>
</dependency>
<dependency> <dependency>
<groupId>net.sf.transmorph</groupId> <groupId>net.sf.transmorph</groupId>
<artifactId>transmorph</artifactId> <artifactId>transmorph</artifactId>
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
package fr.soleil.bensikin.models; package fr.soleil.bensikin.models;
import java.text.Collator; import java.text.Collator;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
...@@ -122,8 +121,7 @@ public class AttributesTreeModel extends DefaultTreeModel { ...@@ -122,8 +121,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
((DefaultMutableTreeNode) getRoot()).add(domainNode); ((DefaultMutableTreeNode) getRoot()).add(domainNode);
final List<Family> familiesToSort = new ArrayList<Family>(); final List<Family> familiesToSort = domain.getFamilies();
familiesToSort.addAll(domain.getFamilies().values());
Collections.sort(familiesToSort, new EntitiesComparator()); Collections.sort(familiesToSort, new EntitiesComparator());
for (Family family : familiesToSort) { for (Family family : familiesToSort) {
...@@ -131,8 +129,7 @@ public class AttributesTreeModel extends DefaultTreeModel { ...@@ -131,8 +129,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
final DefaultMutableTreeNode familyNode = new DefaultMutableTreeNode(family.getName()); final DefaultMutableTreeNode familyNode = new DefaultMutableTreeNode(family.getName());
domainNode.add(familyNode); domainNode.add(familyNode);
final List<Member> membersToSort = new ArrayList<Member>(); final List<Member> membersToSort = family.getMembers();
membersToSort.addAll(family.getMembers().values());
Collections.sort(membersToSort, new EntitiesComparator()); Collections.sort(membersToSort, new EntitiesComparator());
for (Member member : membersToSort) { for (Member member : membersToSort) {
...@@ -140,9 +137,7 @@ public class AttributesTreeModel extends DefaultTreeModel { ...@@ -140,9 +137,7 @@ public class AttributesTreeModel extends DefaultTreeModel {
final DefaultMutableTreeNode memberNode = new DefaultMutableTreeNode(member.getName()); final DefaultMutableTreeNode memberNode = new DefaultMutableTreeNode(member.getName());
familyNode.add(memberNode); familyNode.add(memberNode);
final Collection<Attribute> coll = member.getAttributes().values(); final List<Attribute> attributesToSort = member.getAttributes();
final List<Attribute> attributesToSort = new ArrayList<Attribute>();
attributesToSort.addAll(coll);
Collections.sort(attributesToSort, new EntitiesComparator()); Collections.sort(attributesToSort, new EntitiesComparator());
for (Attribute attribute : attributesToSort) { for (Attribute attribute : attributesToSort) {
...@@ -164,10 +159,13 @@ public class AttributesTreeModel extends DefaultTreeModel { ...@@ -164,10 +159,13 @@ public class AttributesTreeModel extends DefaultTreeModel {
} }
// END CURRENT ATTRIBUTE // END CURRENT ATTRIBUTE
} }
attributesToSort.clear();
// END CURRENT MEMBER // END CURRENT MEMBER
} }
membersToSort.clear();
// END CURRENT FAMILY // END CURRENT FAMILY
} }
familiesToSort.clear();
// END CURRENT DOMAIN // END CURRENT DOMAIN
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment