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=74ca4f4b824e8fa9ad8118bf1649031777f0941c;hp=98bf7e319531139589e570f88e87466fad594e42;hpb=4a32164c4b6e1b1fced50f37e503965c0e3843a9;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 98bf7e319..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;
}
@@ -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);
+ }
+
}