1 /*******************************************************************************
2 * Copyright (c) 2013 University of Stuttgart.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and the Apache License 2.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * Oliver Kopp - initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.winery.common.propertydefinitionkv;
14 import javax.xml.bind.annotation.XmlAttribute;
15 import javax.xml.bind.annotation.XmlElement;
16 import javax.xml.bind.annotation.XmlRootElement;
18 import org.eclipse.winery.common.constants.Namespaces;
21 * This is Winery's main extension element for a key/value based properties
24 @XmlRootElement(name = "PropertiesDefinition")
25 public class WinerysPropertiesDefinition {
27 private String namespace;
28 private String elementName;
29 private PropertyDefinitionKVList propertyDefinitionKVList;
30 private Boolean isDerivedFromXSD = Boolean.FALSE;
33 @XmlAttribute(name = "namespace")
34 public String getNamespace() {
35 return this.namespace;
38 public void setNamespace(String namespace) {
39 this.namespace = namespace;
42 @XmlAttribute(name = "elementname")
43 public String getElementName() {
44 return this.elementName;
47 public void setElementName(String localName) {
48 this.elementName = localName;
51 @XmlElement(name = "properties")
52 public PropertyDefinitionKVList getPropertyDefinitionKVList() {
53 return this.propertyDefinitionKVList;
56 public void setPropertyDefinitionKVList(PropertyDefinitionKVList propertyDefinitionKVList) {
57 this.propertyDefinitionKVList = propertyDefinitionKVList;
61 * @return null if not derived from XSD, "Boolean.TRUE" otherwise. This
62 * leads JAXB to write the attribute only if derivedFromXSD is true
64 @XmlAttribute(name = "derivedFromXSD", namespace = Namespaces.TOSCA_WINERY_EXTENSIONS_NAMESPACE)
65 public Boolean getIsDerivedFromXSD() {
66 if ((this.isDerivedFromXSD != null) && (this.isDerivedFromXSD)) {
73 public void setIsDerivedFromXSD(Boolean isDerivedFromXSD) {
74 this.isDerivedFromXSD = isDerivedFromXSD;