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=8681865662b6fc3dfdb88019eb96cbc84e70291a;hpb=faf680e212bf3e18837c4f798587856e061273b3;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 868186566..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
.
@@ -9,32 +13,39 @@ package org.argeo.slc.core.structure;
public class SimpleSElement implements StructureElement {
/** For ORM */
private Long tid;
- private String description;
+ private String label;
+ private Map tags = new TreeMap();
/** For ORM */
public SimpleSElement() {
}
/** Constructor */
- public SimpleSElement(String description) {
- this.description = description;
+ public SimpleSElement(String label) {
+ this.label = label;
}
/** Constructor */
- public SimpleSElement(String description, String defaultDescription) {
- this(description != null ? description : defaultDescription);
+ public SimpleSElement(String label, String defaultLabel) {
+ this(label != null ? label : defaultLabel);
}
- public String getDescription() {
- return description;
+ /** Constructor */
+ public SimpleSElement(SimpleSElement sElement) {
+ setLabel(sElement.getLabel());
+ setTags(new TreeMap(sElement.getTags()));
}
- /** Sets the description. */
- public void setDescription(String description) {
- this.description = description;
+ public String getLabel() {
+ return label;
}
- Long getTid() {
+ /** Sets the label. */
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ 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);
+ }
+
}