Search in sources :

Example 21 with PropertyDefinitionKV

use of org.eclipse.winery.model.tosca.extensions.kvproperties.PropertyDefinitionKV in project winery by eclipse.

the class ModelUtilities method allRequiredFieldsNonNull.

public static boolean allRequiredFieldsNonNull(WinerysPropertiesDefinition wpd) {
    boolean valid = wpd.getNamespace() != null;
    valid = valid && (wpd.getElementName() != null);
    if (valid) {
        List<PropertyDefinitionKV> propertyDefinitions = wpd.getPropertyDefinitions();
        valid = (propertyDefinitions != null);
        if (valid) {
            for (PropertyDefinitionKV def : propertyDefinitions) {
                valid = valid && (def.getKey() != null);
                valid = valid && (def.getType() != null);
            }
        }
    }
    return valid;
}
Also used : PropertyDefinitionKV(org.eclipse.winery.model.tosca.extensions.kvproperties.PropertyDefinitionKV)

Aggregations

PropertyDefinitionKV (org.eclipse.winery.model.tosca.extensions.kvproperties.PropertyDefinitionKV)21 WinerysPropertiesDefinition (org.eclipse.winery.model.tosca.extensions.kvproperties.WinerysPropertiesDefinition)16 TEntityType (org.eclipse.winery.model.tosca.TEntityType)11 ArrayList (java.util.ArrayList)9 LinkedHashMap (java.util.LinkedHashMap)8 QName (javax.xml.namespace.QName)8 TNodeType (org.eclipse.winery.model.tosca.TNodeType)8 NodeTypeId (org.eclipse.winery.model.ids.definitions.NodeTypeId)7 IOException (java.io.IOException)6 TEntityTemplate (org.eclipse.winery.model.tosca.TEntityTemplate)6 TNodeTemplate (org.eclipse.winery.model.tosca.TNodeTemplate)6 TRelationshipTemplate (org.eclipse.winery.model.tosca.TRelationshipTemplate)6 IRepository (org.eclipse.winery.repository.backend.IRepository)6 Map (java.util.Map)5 Path (javax.ws.rs.Path)5 Produces (javax.ws.rs.Produces)5 HashMap (java.util.HashMap)4 Consumes (javax.ws.rs.Consumes)4 POST (javax.ws.rs.POST)4 List (java.util.List)3