X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fstructure%2FSimpleSElement.java;h=9faea935fb28ac7af3927e672985e719abaff436;hb=b784cf3cf0a72b72178fb9d69ccfdacaa2f4c5a6;hp=4b50d9c22c7a0a4b3b4b7f880f240d48cec0d778;hpb=77ed5d40c10f8e8e788382ed0da1f3e4a1c31958;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
index 4b50d9c22..9faea935f 100644
--- a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
+++ b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
@@ -1,5 +1,9 @@
package org.argeo.slc.core.structure;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.swing.tree.TreeSelectionModel;
/**
* Basic implementation of StructureElement
.
@@ -10,6 +14,7 @@ public class SimpleSElement implements StructureElement {
/** For ORM */
private Long tid;
private String label;
+ private Map tags = new TreeMap();
/** For ORM */
public SimpleSElement() {
@@ -25,6 +30,12 @@ public class SimpleSElement implements StructureElement {
this(label != null ? label : defaultLabel);
}
+ /** Constructor */
+ public SimpleSElement(SimpleSElement sElement) {
+ setLabel(sElement.getLabel());
+ setTags(new TreeMap(sElement.getTags()));
+ }
+
public String getLabel() {
return label;
}
@@ -34,7 +45,7 @@ public class SimpleSElement implements StructureElement {
this.label = label;
}
- Long getTid() {
+ public Long getTid() {
return tid;
}
@@ -42,4 +53,17 @@ public class SimpleSElement implements StructureElement {
this.tid = tid;
}
+ public Map getTags() {
+ return tags;
+ }
+
+ public void setTags(Map tags) {
+ this.tags = tags;
+ }
+
+ @Override
+ public SimpleSElement clone(){
+ return new SimpleSElement(this);
+ }
+
}