mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
ordering labels on mindmap retreive
This commit is contained in:
parent
a4aa1c5436
commit
632a9a6e00
@ -29,6 +29,7 @@ import java.io.IOException;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class Mindmap {
|
public class Mindmap {
|
||||||
@ -44,7 +45,7 @@ public class Mindmap {
|
|||||||
private User lastEditor;
|
private User lastEditor;
|
||||||
|
|
||||||
private Set<Collaboration> collaborations = new HashSet<Collaboration>();
|
private Set<Collaboration> collaborations = new HashSet<Collaboration>();
|
||||||
private Set<Label> labels = new HashSet<Label>();
|
private Set<Label> labels = new LinkedHashSet<>();
|
||||||
|
|
||||||
private User creator;
|
private User creator;
|
||||||
private String tags;
|
private String tags;
|
||||||
|
@ -37,6 +37,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@XmlRootElement(name = "map")
|
@XmlRootElement(name = "map")
|
||||||
@ -97,7 +98,7 @@ public class RestMindmapInfo {
|
|||||||
mindmap.setTitle(title);
|
mindmap.setTitle(title);
|
||||||
}
|
}
|
||||||
public Set<RestLabel> getLabels() {
|
public Set<RestLabel> getLabels() {
|
||||||
final Set<RestLabel> result = new HashSet<>();
|
final Set<RestLabel> result = new LinkedHashSet<>();
|
||||||
for (Label label : mindmap.getLabels()) {
|
for (Label label : mindmap.getLabels()) {
|
||||||
result.add(new RestLabel(label));
|
result.add(new RestLabel(label));
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</set>
|
</set>
|
||||||
|
|
||||||
<set name = "labels"
|
<set name = "labels"
|
||||||
table="R_LABEL_MINDMAP">
|
table="R_LABEL_MINDMAP" order-by="label_id">
|
||||||
<key column="mindmap_id" not-null="true"/>
|
<key column="mindmap_id" not-null="true"/>
|
||||||
<many-to-many column="label_id" class="com.wisemapping.model.Label"/>
|
<many-to-many column="label_id" class="com.wisemapping.model.Label"/>
|
||||||
</set>
|
</set>
|
||||||
|
Loading…
Reference in New Issue
Block a user