+ /**
+ * Add a new {@link TypeInfo} in this {@link Data}.
+ *
+ * @param type
+ * the new type
+ */
+ public void add(TypeInfo type) {
+ type.setParent(this);
+ type.setDirty();
+ types.add(type);
+ }
+
+ /**
+ * Remove the given {@link TypeInfo} from its this {@link Data} if it is in.
+ *
+ * @return TRUE in case of success
+ */
+ public boolean remove(TypeInfo type) {
+ if (types.remove(type)) {
+ setDirty();
+ }
+
+ return false;
+ }
+
+ /**
+ * Change the {@link TypeInfo}s of this {@link Data}.
+ *
+ * @param types
+ * the new types
+ */
+ @Deprecated
+ public void setTypes(List<TypeInfo> types) {
+ // TODO: check if this method is required
+ this.types.clear();
+ for (TypeInfo type : types) {
+ this.types.add(type);
+ type.setParent(this);
+ }
+
+ setDirty();
+ }
+