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=2bab2e74c892812957f5c90207bbbcfed6ccc602;hb=433bb709efd6c2cf50be82094f8aa96d4138732a;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..2bab2e74c 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 org.argeo.slc.core.structure.tree.TreeSPath; /** * 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); + } + }