import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.simantics.db.Resource;
import org.simantics.db.common.ResourceArray;
private PageDesc pageDesc;
private String rvi;
+ private Map<String, Object> properties;
+
/**
* @param parent
* @param name
return pageDesc;
}
+ /**
+ * @param key
+ * @param value
+ * @return this node for chained initialization
+ */
+ public Node setProperty(String key, Object value) {
+ if (properties == null)
+ properties = new HashMap<>();
+ properties.put(key, value);
+ return this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T getProperty(String key) {
+ if (properties == null)
+ return null;
+ return (T) properties.get(key);
+ }
+
@Override
public int compareTo(Node o) {
int ret = name.compareTo(o.name);