package org.argeo.slc.core.structure;\r
\r
+import java.util.Map;\r
+import java.util.TreeMap;\r
+\r
+import javax.swing.tree.TreeSelectionModel;\r
\r
/**\r
* Basic implementation of <code>StructureElement</code>.\r
public class SimpleSElement implements StructureElement {\r
/** For ORM */\r
private Long tid;\r
- private String description;\r
+ private String label;\r
+ private Map<String, String> tags = new TreeMap<String, String>();\r
\r
/** For ORM */\r
public SimpleSElement() {\r
}\r
\r
/** Constructor */\r
- public SimpleSElement(String description) {\r
- this.description = description;\r
+ public SimpleSElement(String label) {\r
+ this.label = label;\r
}\r
\r
/** Constructor */\r
- public SimpleSElement(String description, String defaultDescription) {\r
- this(description != null ? description : defaultDescription);\r
+ public SimpleSElement(String label, String defaultLabel) {\r
+ this(label != null ? label : defaultLabel);\r
}\r
\r
- public String getDescription() {\r
- return description;\r
+ /** Constructor */\r
+ public SimpleSElement(SimpleSElement sElement) {\r
+ setLabel(sElement.getLabel());\r
+ setTags(new TreeMap<String, String>(sElement.getTags()));\r
}\r
\r
- /** Sets the description. */\r
- public void setDescription(String description) {\r
- this.description = description;\r
+ public String getLabel() {\r
+ return label;\r
}\r
\r
- Long getTid() {\r
+ /** Sets the label. */\r
+ public void setLabel(String label) {\r
+ this.label = label;\r
+ }\r
+\r
+ public Long getTid() {\r
return tid;\r
}\r
\r
this.tid = tid;\r
}\r
\r
+ public Map<String, String> getTags() {\r
+ return tags;\r
+ }\r
+\r
+ public void setTags(Map<String, String> tags) {\r
+ this.tags = tags;\r
+ }\r
+\r
+ @Override\r
+ public SimpleSElement clone(){\r
+ return new SimpleSElement(this);\r
+ }\r
+\r
}\r