Merge remote-tracking branch 'origin/master' into anehmer/restapi

Signed-off-by: Alexander Nehmer <a.nehmer@science-computing.de>
diff --git a/build.gradle b/build.gradle
index 3260115..69c14af 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,4 +46,4 @@
 
 artifacts {
 	archives sourcesJar
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/eclipse/mdm/api/dflt/model/EntityFactory.java b/src/main/java/org/eclipse/mdm/api/dflt/model/EntityFactory.java
index f67d546..8960acc 100644
--- a/src/main/java/org/eclipse/mdm/api/dflt/model/EntityFactory.java
+++ b/src/main/java/org/eclipse/mdm/api/dflt/model/EntityFactory.java
@@ -38,6 +38,7 @@
 import org.eclipse.mdm.api.base.model.ScalarType;
 import org.eclipse.mdm.api.base.model.Test;
 import org.eclipse.mdm.api.base.model.TestStep;
+import org.eclipse.mdm.api.base.model.Unit;
 import org.eclipse.mdm.api.base.model.Value;
 import org.eclipse.mdm.api.base.model.ValueType;
 import org.eclipse.mdm.api.base.model.VersionState;
@@ -397,6 +398,26 @@
 	}
 
 	/**
+	 * Creates a new {@link CatalogAttribute} for given {@link CatalogComponent} with the given {@link Unit}.
+	 * For {@link ValueType} see {@link #createCatalogAttribute(String, ValueType, CatalogComponent)}.
+	 *
+	 * @param name             Name of the created {@code CatalogAttribute}.
+	 * @param valueType        The {@code ValueType}.
+	 * @param
+	 * @param catalogComponent The parent {@code CatalogComponent}.
+	 * @return The created {@code CatalogAttribute} is returned.
+	 * @throws IllegalArgumentException Thrown if given name is already in use or
+	 *                                  not allowed or given {@code ValueType} is
+	 *                                  not supported.
+	 */
+	public CatalogAttribute createCatalogAttribute(String name, ValueType<?> valueType, Unit unit,
+			CatalogComponent catalogComponent) {
+		CatalogAttribute catAttr = createCatalogAttribute(name, valueType, catalogComponent);
+		catAttr.setUnit(unit);
+		return catAttr;
+	}
+
+	/**
 	 * Creates a new {@link CatalogAttribute} for given {@link CatalogComponent}.
 	 *
 	 * @param name              Name of the created {@code CatalogAttribute}.