incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1291683 [2/5] - in /incubator/odf/trunk/odfdom: ./ src/codegen/resources/ src/codegen/resources/dom/ src/codegen/resources/dom/template/ src/codegen/resources/pkg/template/ src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/ src/main/j...
Date Tue, 21 Feb 2012 10:06:57 GMT
Added: incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm (added)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm Tue Feb 21 10:06:53 2012
@@ -0,0 +1,379 @@
+##################################################################
+## 
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+## 
+##  http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+##################################################################
+## Template to create the list of signature artefacts which are to be generated
+##
+## Documentation of template development can be found in local file
+## TemplateHelp.html.
+##
+## Returns PuzzleComponent covering a PuzzlePiece or PuzzlePieceSet dependent if attribute is multiple times defined
+## Template to create the list of artefacts which are to be generated
+#set($attribute = $signaturemodel.getAttribute($context))
+#set($NS = "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0")
+#set ($PREFIX = "dsig")
+#set($localname = ${signaturemodel.extractLocalname($attribute)})
+#set($classname = "${signaturemodel.camelCase($attribute)}Attribute")
+#set ($valueobject = "String")
+##
+#set($datatypes = ${attribute.getDatatypes().withoutMultiples()})
+#if ($datatypes.size() > 0)
+#set ($hasdatatype = true)
+#else
+#set ($hasdatatype = false)
+#end
+##
+##2DO: Svante - getValues() vs. getValueLiterals() - only literals / constants for attribute values are taken
+#set($values = ${attribute.getValues().withoutMultiples()})
+#if ($values.size() > 0)
+#if ($values.size() ==2 && $hasdatatype == false)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($value in $values)
+#if ($value==true)
+#set ($trueFlag = true)
+#end
+#if ($value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($hasdatatype = true)
+#set ($valueobject = "Boolean")
+#end
+#end
+#set ($enum = true)
+#if ($valueobject == "Boolean")
+#set ($enum = false)
+#end
+#else
+#set ($enum = false)
+#end
+##
+## Check whether the attribute has default value.
+##
+#set ($hasDefaultValue = false)
+#foreach ($parent in ${attribute.getParents().withoutMultiples()})
+#if (${odfmodel.getDefaultAttributeValue($attribute, $parent)})
+#set ($hasDefaultValue = true)
+#end
+#end
+##
+#set ($defaultValueSet = $odfmodel.getDefaultAttributeValues($attribute))
+#if ($hasDefaultValue and $defaultValueSet.size() == 1)
+#foreach ($value in $defaultValueSet)
+#set ($uniqueDefaultValue = $value)
+#end
+#end
+##
+#include('copyright.txt')
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.dsig;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+#if ($hasDefaultValue)
+import org.odftoolkit.odfdom.pkg.OdfElement;
+#end
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * DOM implementation of OpenDocument attribute  {@odf.attribute ${attribute.getQName()}}.
+ *
+ */
+public class $classname extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("${NS}", "${PREFIX}:${attribute}");
+#if ($hasDefaultValue)
+#if ($defaultValueSet.size()>1)
+#foreach ($defaultValue in $defaultValueSet)
+#set ($constant = $signaturemodel.constantCase($defaultValue))
+#if (($defaultValue=="true" or $defaultValue=="false") and $enum == false)
+	public static final String DEFAULT_VALUE_${signaturemodel.escapeKeyword($constant)}= "$defaultValue";
+#else
+	public static final String DEFAULT_VALUE_${signaturemodel.escapeKeyword($constant)}=	Value.${signaturemodel.escapeKeyword($constant)}.toString();
+#end
+#end
+#else
+#if ($uniqueDefaultValue==""")
+	public static final String DEFAULT_VALUE = "\${uniqueDefaultValue}";
+#else
+	public static final String DEFAULT_VALUE = "$uniqueDefaultValue";
+#end
+#end
+#end
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute ${attribute}}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public $classname(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute ${attribute}}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+##
+#if ($enum)
+
+	/**
+	 * The value set of {@odf.attribute ${attribute}}.
+	 */
+	public enum Value {
+#set ($separator="		")
+#foreach($value in $values)
+#if (${value.toString().length()} == 1)
+#set ($constant = $value)
+#else
+#set ($constant = $signaturemodel.constantCase($value))
+#end${separator}${signaturemodel.escapeKeyword($constant)}("${signaturemodel.escapeLiteral($value)}")#set ($separator=", ")
+#end ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+#end
+##
+## Handle Non-String-Attributes
+#set ($valuetypes = ${javamodel.getValuetypes($datatypes)})
+#if ($valueobject != "Boolean")
+#foreach ($valuetype in $valuetypes)
+#set ($valueobject = $valuetype)
+#end
+#end
+#if ($valueobject != "String" && $valueobject != "Double" && $valueobject != "Integer" && $valueobject != "Boolean")
+#set ($valueobject = "String")
+#end
+#if ($valueobject != "String")
+#set ($simplevalue = ${javamodel.getPrimitiveType($valueobject)})
+##
+
+	/**
+	 * @param value The <code>${simplevalue}</code> value of the attribute.
+	 */
+	public void set${signaturemodel.camelCase($simplevalue)}Value(${simplevalue} value) {
+		super.setValue(String.valueOf(value));
+	}
+
+	/**
+	 * @return Returns the <code>${simplevalue}</code> value of the attribute
+	 */
+	public ${simplevalue} ${simplevalue}Value() {
+		String val = super.getValue();
+		try {
+			return ${valueobject}.parse${signaturemodel.camelCase($simplevalue)}(val);
+		} catch (NumberFormatException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+#end
+##
+
+	/**
+	 * @param attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+#if ($enum)
+#if ($hasdatatype)
+## enum and datatype
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+#else
+## enum and no datatype
+		try {
+			super.setValue(Value.enumValueOf(attrValue).toString());
+		} catch (NullPointerException e) {
+			throw new IllegalArgumentException(e);
+		}
+#end
+#else
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+#end
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+#if ($enum)
+#if ($hasdatatype)
+## enum and datatype
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+#else
+## enum and no datatype
+		try {
+			return Value.enumValueOf(super.getValue()).toString();
+		} catch (NullPointerException e) {
+			throw new IllegalArgumentException("the value of ${attribute} is not valid");
+		}
+#end
+#else
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of ${attribute} is not valid");
+		}
+#end
+	}
+
+#if ($hasDefaultValue)
+	/**
+	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 *
+	 * @return the default value as <code>String</code> dependent of its element name
+	 *         return <code>null</code> if the default value does not exist
+	 */
+	@Override
+	public String getDefault() {
+		OdfElement parentElement = (OdfElement)getOwnerElement();
+		String defaultValue = null;
+		if (parentElement != null) {
+#if ($defaultValueSet.size()>1)
+#foreach ($parent in ${attribute.getParents().withoutMultiples()})
+#if ($odfmodel.getDefaultAttributeValue($attribute, $parent))
+			if (parentElement instanceof ${signaturemodel.camelCase($parent)}Element) {
+				defaultValue = "${signaturemodel.escapeLiteral($odfmodel.getDefaultAttributeValue($attribute, $parent))}";
+			}
+#end
+#end
+#else
+			defaultValue = "${signaturemodel.escapeLiteral($uniqueDefaultValue)}";
+#end
+		}
+		return defaultValue;
+	}
+
+	/**
+	 * Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists.
+	 *
+	 * @return <code>true</code> if {@odf.attribute ${attribute}} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return getOwnerElement() == null ? false : true;
+	}
+#else
+	/**
+	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 *
+	 * @return the default value as <code>String</code> dependent of its element name
+	 *         return <code>null</code> if the default value does not exist
+	 */
+	@Override
+	public String getDefault() {
+		return null;
+	}
+
+	/**
+	 * Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists.
+	 *
+	 * @return <code>true</code> if {@odf.attribute ${attribute}} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+#end
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+#if ($hasdatatype and $datatypes.size() > 0)
+#set ($datatype="")
+#foreach($value in $datatypes)
+#set ($datatype=$value)
+#end
+#if ($datatype == "ID")
+		return true;
+#else
+		return false;
+#end
+#else
+		return false;
+#end
+	}
+}

Added: incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm (added)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm Tue Feb 21 10:06:53 2012
@@ -0,0 +1,370 @@
+##################################################################
+## 
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+## 
+##  http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+##################################################################
+## Template to create the Java class representing an ODF signature element
+##
+## Documentation of template development can be found in local file
+## TemplateHelp.html.
+##
+#set ($element = ${signaturemodel.getElement($context)})
+#if ($element == "Signature")
+	#set ($NS = "http://www.w3.org/2000/09/xmldsig#")
+	#set ($PREFIX = "ds")
+#else
+	#set ($NS = "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0")
+	#set ($PREFIX = "dsig")
+#end
+###set ($NS = "${element.getNamespace()}")
+#set ($classname = "${model.camelCase($element)}Element")
+##
+## Set child element and child attributes
+#set ($children = ${element.getChildElements().withoutMultiples()})
+#set ($attributes = ${element.getAttributes().withoutMultiples()})
+##
+## Set base class OdfElement
+#set ($baseclassname = "OdfElement")
+#set ($baseHasMandatoryAttr = false)
+##
+## ...or configured base class
+#if (${javamodel.getBaseclassOf($element)})
+#set ($base = ${javamodel.getBaseclassOf($element)})
+#end
+## Configured manually generated base class?
+#if ($base == "container")
+#set ($_specialbase = true)
+#set ($baseclassname = "OdfContainerElementBase")
+#set ($baseimport = "org.odftoolkit.odfdom.pkg.$baseclassname")
+#set ($baseHasMandatoryAttr = false)
+#end
+##
+## Test if this element has mandatory (non optional) attributes
+#set ($hasMandatoryAttr = false)
+#foreach ($attribute in $attributes)
+#if (${element.isMandatory($attribute)})
+#set ($hasMandatoryAttr = true)
+#set ($mandatoryAttr = $attribute)
+#end
+#end
+##
+## Begin Code
+#include('copyright.txt')
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.dsig;
+
+##
+## ---------------------------------------------------
+##  Imports
+## ---------------------------------------------------
+##
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+##
+## If there is a base class which is not in the current package
+#if ($baseimport)
+import ${baseimport};
+#end
+
+##
+## ---------------------------------------------------
+##  Class
+## ---------------------------------------------------
+##
+/**
+ * Data signature implementation of OpenDocument element  {@odf.element ${context}}.
+ *
+#if ($anychild)
+ * This class can have any org.w3c.dom.Element child element.
+#end
+#if ($anyattribute)
+ * This class can have any org.w3c.dom.Attribute attribute.
+#end
+ */
+public class $classname extends $baseclassname {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("${NS}", "${PREFIX}:${element}");
+
+	/**
+	 * Create the instance of <code>$classname</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public $classname(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element ${context}}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+##
+## ---------------------------------------------------
+##  Add init method if this element or the base
+##  element has mandatory attributes
+##  TODO: NO caller use this method.
+## ---------------------------------------------------
+##
+## ---------------------------------------------------
+##  Attribute getters and setters
+## ---------------------------------------------------
+##
+#foreach ($attr in $attributes)
+#set($attri = ${signaturemodel.getAttribute($attr.getQName())})
+#set ($valueObject = "String")
+#set ($simpleValue = "")
+#set ($dataTypes = ${attri.getDatatypes().withoutMultiples()})
+#set ($valueTypes = ${javamodel.getValuetypes($dataTypes)})
+#foreach ($valueType in $valueTypes)
+#set ($valueObject = $valueType)
+#end
+## use attri get all of the values.
+#set($values = ${attri.getValues().withoutMultiples()})
+#if ($values.size() ==2 && $dataTypes.size()==0)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($value in $values)
+#if ($value==true)
+#set ($trueFlag = true)
+#end
+#if ($value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($hasdatatype = true)
+#set ($valueObject = "Boolean")
+#end
+#end
+#if ($valueObject != "String" && $valueObject != "Double" && $valueObject != "Integer" && $valueObject != "Boolean")
+#set ($valueObject = "String")
+#end
+#if ($valueObject != "String")
+#set ($simpleValue = ${javamodel.getPrimitiveType($valueObject)})
+#end
+#if ($attr != "*")
+#set ($attribute = ${attr.withMultiples()})
+#set ($aNS = ${attribute.getNamespace()})
+#set ($aClassname = "${signaturemodel.camelCase($attribute)}Attribute")
+#set ($aParam = "${signaturemodel.javaCase($attribute)}Value")
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code> , See {@odf.attribute ${attribute.getQName()}}
+	 *
+#if (${element.isMandatory($attribute)})
+	 * Attribute is mandatory.
+	 *
+#end
+	 * @return - the <code>$valueObject</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public $valueObject get${aClassname}() {
+		$aClassname attr = ($aClassname) getOdfAttribute(${aClassname}.ATTRIBUTE_NAME);
+		if (attr != null) {
+#if ($simpleValue!="")
+			return ${valueObject}.valueOf(attr.${simpleValue}Value());
+#else
+			return ${valueObject}.valueOf(attr.getValue());
+#end
+		}
+#if ($odfmodel.getDefaultAttributeValue($attribute, $element))
+#set ($defaultValue = ${signaturemodel.escapeLiteral($odfmodel.getDefaultAttributeValue($attribute, $element))})
+#set ($defaultValueSet = $odfmodel.getDefaultAttributeValues($attribute))
+#if ($defaultValueSet.size()>1)
+#set ($constant = $signaturemodel.constantCase($defaultValue))
+#if ($valueObject == "String")
+		return ${aClassname}.DEFAULT_VALUE_${signaturemodel.escapeKeyword($constant)};
+#else
+		return ${valueObject}.valueOf(${aClassname}.DEFAULT_VALUE_${signaturemodel.escapeKeyword($constant)});
+#end
+#else
+#if ($valueObject == "String")
+		return ${aClassname}.DEFAULT_VALUE;
+#else
+		return ${valueObject}.valueOf(${aClassname}.DEFAULT_VALUE);
+#end
+#end
+#else
+		return null;
+#end
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code> , See {@odf.attribute ${attribute.getQName()}}
+	 *
+	 * @param $aParam   The type is <code>$valueObject</code>
+	 */
+	public void set${aClassname}($valueObject $aParam) {
+		$aClassname attr = new ${aClassname}((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+#if ($valueObject == "String")
+		attr.setValue($aParam);
+#else
+		attr.set${signaturemodel.camelCase($simpleValue)}Value($aParam.${simpleValue}Value());
+#end
+	}
+#end
+#end
+
+##
+## ---------------------------------------------------
+##  Methods for child element creation
+## ---------------------------------------------------
+##
+#foreach($ch in $children)
+#if ($ch != "*")
+#set ($child = ${ch.withMultiples()})
+#set ($cClassname = "${signaturemodel.camelCase($child)}Element")
+#set ($cVar = ${signaturemodel.javaCase($child)})
+#set ($ch_attributes = ${child.getAttributes().withoutMultiples()})
+##set has parameter flag
+#set ($hasParams = false)
+#foreach ($ch_attribute in $ch_attributes)
+#if (${child.isMandatory($ch_attribute)})
+#set ($hasParams = true)
+#end
+#end
+#if ($hasParams)
+	/**
+	 * Create child element {@odf.element ${child}}.
+	 *
+#set ($seperateFlag="")
+#set ($params="")
+#foreach ($ch_attr in $ch_attributes)
+#if (${child.isMandatory($ch_attr)})
+#set($ch_attri = ${signaturemodel.getAttribute($ch_attr.getQName())})
+#set ($ch_ValueObject = "String")
+#set ($ch_SimpleValue = "")
+#set ($ch_DataTypes = ${ch_attri.getDatatypes().withoutMultiples()})
+#set ($ch_ValueTypes = ${javamodel.getValuetypes($ch_DataTypes)})
+#foreach ($ch_ValueType in $ch_ValueTypes)
+#set ($ch_ValueObject = $ch_ValueType)
+#end
+## use ch_attri get all of the values.
+#set($ch_Values = ${ch_attri.getValues().withoutMultiples()})
+#if ($ch_Values.size() ==2 && $ch_DataTypes.size()==0)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($ch_Value in $ch_Values)
+#if ($ch_Value==true)
+#set ($trueFlag = true)
+#end
+#if ($ch_Value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($ch_Hasdatatype = true)
+#set ($ch_ValueObject = "Boolean")
+#end
+#end
+#if ($ch_ValueObject != "String" && $ch_ValueObject != "Double" && $ch_ValueObject != "Integer" && $ch_ValueObject != "Boolean")
+#set ($ch_ValueObject = "String")
+#end
+#if ($ch_ValueObject != "String")
+#set ($ch_SimpleValue = ${javamodel.getPrimitiveType($ch_ValueObject)})
+#end
+#if ($ch_attr != "*")
+#set ($attribute = ${ch_attr.withMultiples()})
+#set ($aNS = ${attribute.getNamespace()})
+#set ($aClassname = "${signaturemodel.camelCase($attribute)}Attribute")
+#set ($aParam = "${signaturemodel.javaCase($attribute)}Value")
+	 * @param $aParam  the <code>$ch_ValueObject</code> value of <code>$aClassname</code>, see {@odf.attribute  ${attribute.getQName()}} at specification
+#if ($ch_SimpleValue!="")
+#set ($params="${params}${seperateFlag}${ch_SimpleValue} ${aParam}")
+#else
+#set ($params="${params}${seperateFlag}${ch_ValueObject} ${aParam}")
+#end
+#set ($seperateFlag=", ")
+#end
+#end
+#end
+## Compare element from old and new Spec. A direct comparison is not possible (both encapsulate different RelaxNG Expressions)
+## but we can compare by name
+#if (!$oldelement || !${oldelement.getChildElements().containsName($child)})
+	 * Child element is new in Odf 1.2
+	 *
+#end
+#if (${element.isMandatory($child)})
+	 * Child element is mandatory.
+	 *
+#end
+	 * @return the element {@odf.element ${child}}
+	 */
+	 public $cClassname new${cClassname}($params) {
+		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
+#foreach ($ch_attr in $ch_attributes)
+#if ($ch_attr != "*" && ${child.isMandatory($ch_attr)})
+#set ($aClassname = "${signaturemodel.camelCase($ch_attr)}Attribute")
+#set ($aParam = "${signaturemodel.javaCase($ch_attr)}Value")
+		${cVar}.set$aClassname($aParam);
+#end
+#end
+		this.appendChild($cVar);
+		return $cVar;
+	}
+
+#else
+	/**
+	 * Create child element {@odf.element ${child}}.
+	 *
+## Compare element from old and new Spec. A direct comparison is not possible (both encapsulate different RelaxNG Expressions)
+## but we can compare by name
+#if (!$oldelement || !${oldelement.getChildElements().containsName($child)})
+	 * Child element is new in Odf 1.2
+	 *
+#end
+#if (${element.isMandatory($child)})
+	 * Child element is mandatory.
+	 *
+#end
+	 * @return the element {@odf.element ${child}}
+	 */
+	public $cClassname new${cClassname}() {
+		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
+		this.appendChild($cVar);
+		return $cVar;
+	}
+
+#end
+#end
+#end
+##
+## -----------------------------------------------------
+##  New: newTextNode
+## -----------------------------------------------------
+##
+#if ($element.canHaveText())
+	/**
+	 * Add text content. Only elements which are allowed to have text content offer this method.
+	 */
+	 public void newTextNode(String content) {
+		if (content != null && !content.equals("")) {
+			this.appendChild(this.getOwnerDocument().createTextNode(content));
+		}
+	 }
+#end
+}

Added: incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm (added)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm Tue Feb 21 10:06:53 2012
@@ -0,0 +1,385 @@
+##################################################################
+## 
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+## 
+##  http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+##################################################################
+## Template to create the list of manifest artefacts which are to be generated
+##
+## Documentation of template development can be found in local file
+## TemplateHelp.html.
+##
+## Returns PuzzleComponent covering a PuzzlePiece or PuzzlePieceSet dependent if attribute is multiple times defined
+#set($attribute = $manifestmodel.getAttribute($context))
+#set ($NS = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0")
+#set($NS = ${attribute.getNamespace()})
+#set($localname = ${manifestmodel.extractLocalname($attribute)})
+#set($classname = "${manifestmodel.camelCase($attribute)}Attribute")
+#set ($valueobject = "String")
+##
+#set($datatypes = ${attribute.getDatatypes().withoutMultiples()})
+#if ($datatypes.size() > 0)
+#set ($hasdatatype = true)
+#else
+#set ($hasdatatype = false)
+#end
+##
+##2DO: Svante - getValues() vs. getValueLiterals() - only literals / constants for attribute values are taken
+#set($values = ${attribute.getValues().withoutMultiples()})
+#if ($values.size() > 0)
+#if ($values.size() ==2 && $hasdatatype == false)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($value in $values)
+#if ($value==true)
+#set ($trueFlag = true)
+#end
+#if ($value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($hasdatatype = true)
+#set ($valueobject = "Boolean")
+#end
+#end
+#set ($enum = true)
+#if ($valueobject == "Boolean")
+#set ($enum = false)
+#end
+#else
+#set ($enum = false)
+#end
+##
+## Check whether the attribute has default value.
+##
+#set ($hasDefaultValue = false)
+#foreach ($parent in ${attribute.getParents().withoutMultiples()})
+#if (${odfmodel.getDefaultAttributeValue($attribute, $parent)})
+#set ($hasDefaultValue = true)
+#end
+#end
+##
+#set ($defaultValueSet = $odfmodel.getDefaultAttributeValues($attribute))
+#if ($hasDefaultValue and $defaultValueSet.size() == 1)
+#foreach ($value in $defaultValueSet)
+#set ($uniqueDefaultValue = $value)
+#end
+#end
+##
+#include('copyright.txt')
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+#if ($hasDefaultValue)
+import org.odftoolkit.odfdom.pkg.OdfElement;
+#end
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+#if ($hasDefaultValue and $defaultValueSet.size()>1)
+#foreach ($parent in ${attribute.getParents().withoutMultiples()})
+#if ($odfmodel.getDefaultAttributeValue($attribute, $parent))
+import org.odftoolkit.odfdom.pkg.${parent.getNamespace()}.${manifestmodel.camelCase($parent)}Element;
+#end
+#end
+#end
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute ${attribute.getQName()}}.
+ *
+ */
+public class $classname extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("${NS}", "manifest:${attribute}");
+#if ($hasDefaultValue)
+#if ($defaultValueSet.size()>1)
+#foreach ($defaultValue in $defaultValueSet)
+#set ($constant = $manifestmodel.constantCase($defaultValue))
+#if (($defaultValue=="true" or $defaultValue=="false") and $enum == false)
+	public static final String DEFAULT_VALUE_${manifestmodel.escapeKeyword($constant)}= "$defaultValue";
+#else
+	public static final String DEFAULT_VALUE_${manifestmodel.escapeKeyword($constant)}=	Value.${manifestmodel.escapeKeyword($constant)}.toString();
+#end
+#end
+#else
+#if ($uniqueDefaultValue=="&#34;")
+	public static final String DEFAULT_VALUE = "\${uniqueDefaultValue}";
+#else
+	public static final String DEFAULT_VALUE = "$uniqueDefaultValue";
+#end
+#end
+#end
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute ${attribute}}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public $classname(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute ${attribute}}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+##
+#if ($enum)
+
+	/**
+	 * The value set of {@odf.attribute ${attribute}}.
+	 */
+	public enum Value {
+#set ($separator="		")
+#foreach($value in $values)
+#if (${value.toString().length()} == 1)
+#set ($constant = $value)
+#else
+#set ($constant = $manifestmodel.constantCase($value))
+#end${separator}${manifestmodel.escapeKeyword($constant)}("${manifestmodel.escapeLiteral($value)}")#set ($separator=", ")
+#end ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+#end
+##
+## Handle Non-String-Attributes
+#set ($valuetypes = ${javamodel.getValuetypes($datatypes)})
+#if ($valueobject != "Boolean")
+#foreach ($valuetype in $valuetypes)
+#set ($valueobject = $valuetype)
+#end
+#end
+#if ($valueobject != "String" && $valueobject != "Double" && $valueobject != "Integer" && $valueobject != "Boolean")
+#set ($valueobject = "String")
+#end
+#if ($valueobject != "String")
+#set ($simplevalue = ${javamodel.getPrimitiveType($valueobject)})
+##
+
+	/**
+	 * @param value The <code>${simplevalue}</code> value of the attribute.
+	 */
+	public void set${manifestmodel.camelCase($simplevalue)}Value(${simplevalue} value) {
+		super.setValue(String.valueOf(value));
+	}
+
+	/**
+	 * @return Returns the <code>${simplevalue}</code> value of the attribute
+	 */
+	public ${simplevalue} ${simplevalue}Value() {
+		String val = super.getValue();
+		try {
+			return ${valueobject}.parse${manifestmodel.camelCase($simplevalue)}(val);
+		} catch (NumberFormatException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+#end
+##
+
+	/**
+	 * @param attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+#if ($enum)
+#if ($hasdatatype)
+## enum and datatype
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+#else
+## enum and no datatype
+		try {
+			super.setValue(Value.enumValueOf(attrValue).toString());
+		} catch (NullPointerException e) {
+			throw new IllegalArgumentException(e);
+		}
+#end
+#else
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+#end
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+#if ($enum)
+#if ($hasdatatype)
+## enum and datatype
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+#else
+## enum and no datatype
+		try {
+			return Value.enumValueOf(super.getValue()).toString();
+		} catch (NullPointerException e) {
+			throw new IllegalArgumentException("the value of ${attribute} is not valid");
+		}
+#end
+#else
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of ${attribute} is not valid");
+		}
+#end
+	}
+
+#if ($hasDefaultValue)
+	/**
+	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 *
+	 * @return the default value as <code>String</code> dependent of its element name
+	 *         return <code>null</code> if the default value does not exist
+	 */
+	@Override
+	public String getDefault() {
+		OdfElement parentElement = (OdfElement)getOwnerElement();
+		String defaultValue = null;
+		if (parentElement != null) {
+#if ($defaultValueSet.size()>1)
+#foreach ($parent in ${attribute.getParents().withoutMultiples()})
+#if ($odfmodel.getDefaultAttributeValue($attribute, $parent))
+			if (parentElement instanceof ${manifestmodel.camelCase($parent)}Element) {
+				defaultValue = "${manifestmodel.escapeLiteral($odfmodel.getDefaultAttributeValue($attribute, $parent))}";
+			}
+#end
+#end
+#else
+			defaultValue = "${manifestmodel.escapeLiteral($uniqueDefaultValue)}";
+#end
+		}
+		return defaultValue;
+	}
+
+	/**
+	 * Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists.
+	 *
+	 * @return <code>true</code> if {@odf.attribute ${attribute}} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return getOwnerElement() == null ? false : true;
+	}
+#else
+	/**
+	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 *
+	 * @return the default value as <code>String</code> dependent of its element name
+	 *         return <code>null</code> if the default value does not exist
+	 */
+	@Override
+	public String getDefault() {
+		return null;
+	}
+
+	/**
+	 * Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists.
+	 *
+	 * @return <code>true</code> if {@odf.attribute ${attribute}} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+#end
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+#if ($hasdatatype and $datatypes.size() > 0)
+#set ($datatype="")
+#foreach($value in $datatypes)
+#set ($datatype=$value)
+#end
+#if ($datatype == "ID")
+		return true;
+#else
+		return false;
+#end
+#else
+		return false;
+#end
+	}
+}

Added: incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm (added)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm Tue Feb 21 10:06:53 2012
@@ -0,0 +1,344 @@
+##################################################################
+## 
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+## 
+##  http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+##################################################################
+## Template to create the Java class representing an ODF manifest element
+##
+## Documentation of template development can be found in local file
+## TemplateHelp.html.
+##
+#set ($element = ${manifestmodel.getElement($context)})
+#set ($oldelement = ${oldmodel.getElement($context)})
+###set ($NS = ${element.getNamespace()})
+#set ($classname = "${manifestmodel.camelCase($element)}Element")
+##
+## Set child element and child attributes
+#set ($children = ${element.getChildElements().withoutMultiples()})
+#set ($attributes = ${element.getAttributes().withoutMultiples()})
+##
+#set ($baseclassname = "OdfElement")
+#set ($baseHasMandatoryAttr = false)
+##
+## Test if this element has mandatory (non optional) attributes
+#set ($hasMandatoryAttr = false)
+#foreach ($attribute in $attributes)
+#if (${element.isMandatory($attribute)})
+#set ($hasMandatoryAttr = true)
+#set ($mandatoryAttr = $attribute)
+#end
+#end
+##
+## Begin Code
+#include('copyright.txt')
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+##
+## ---------------------------------------------------
+##  Imports
+## ---------------------------------------------------
+##
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+##
+## ---------------------------------------------------
+##  Class
+## ---------------------------------------------------
+##
+/**
+ * Manifest implementation of OpenDocument element  {@odf.element ${context}}.
+ *
+#if ($anychild)
+ * This class can have any org.w3c.dom.Element child element.
+#end
+#if ($anyattribute)
+ * This class can have any org.w3c.dom.Attribute attribute.
+#end
+ */
+public class $classname extends $baseclassname {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:${element}");
+
+	/**
+	 * Create the instance of <code>$classname</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public $classname(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element ${context}}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+##
+## ---------------------------------------------------
+##  Add init method if this element or the base
+##  element has mandatory attributes
+##  TODO: NO caller use this method.
+## ---------------------------------------------------
+##
+## ---------------------------------------------------
+##  Attribute getters and setters
+## ---------------------------------------------------
+##
+#foreach ($attr in $attributes)
+#set($attri = ${manifestmodel.getAttribute($attr.getQName())})
+#set ($valueObject = "String")
+#set ($simpleValue = "")
+#set ($dataTypes = ${attri.getDatatypes().withoutMultiples()})
+#set ($valueTypes = ${javamodel.getValuetypes($dataTypes)})
+#foreach ($valueType in $valueTypes)
+#set ($valueObject = $valueType)
+#end
+## use attri get all of the values.
+#set($values = ${attri.getValues().withoutMultiples()})
+#if ($values.size() ==2 && $dataTypes.size()==0)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($value in $values)
+#if ($value==true)
+#set ($trueFlag = true)
+#end
+#if ($value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($hasdatatype = true)
+#set ($valueObject = "Boolean")
+#end
+#end
+#if ($valueObject != "String" && $valueObject != "Double" && $valueObject != "Integer" && $valueObject != "Boolean")
+#set ($valueObject = "String")
+#end
+#if ($valueObject != "String")
+#set ($simpleValue = ${javamodel.getPrimitiveType($valueObject)})
+#end
+#if ($attr != "*")
+#set ($attribute = ${attr.withMultiples()})
+#set ($aNS = ${attribute.getNamespace()})
+#set ($aClassname = "${manifestmodel.camelCase($attribute)}Attribute")
+#set ($aParam = "${manifestmodel.javaCase($attribute)}Value")
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code> , See {@odf.attribute ${attribute.getQName()}}
+	 *
+#if (${element.isMandatory($attribute)})
+	 * Attribute is mandatory.
+	 *
+#end
+	 * @return - the <code>$valueObject</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public $valueObject get${aClassname}() {
+		$aClassname attr = ($aClassname) getOdfAttribute(${aClassname}.ATTRIBUTE_NAME);
+		if (attr != null) {
+#if ($simpleValue!="")
+			return ${valueObject}.valueOf(attr.${simpleValue}Value());
+#else
+			return ${valueObject}.valueOf(attr.getValue());
+#end
+		}
+#if ($odfmodel.getDefaultAttributeValue($attribute, $element))
+#set ($defaultValue = ${manifestmodel.escapeLiteral($odfmodel.getDefaultAttributeValue($attribute, $element))})
+#set ($defaultValueSet = $odfmodel.getDefaultAttributeValues($attribute))
+#if ($defaultValueSet.size()>1)
+#set ($constant = $manifestmodel.constantCase($defaultValue))
+#if ($valueObject == "String")
+		return ${aClassname}.DEFAULT_VALUE_${manifestmodel.escapeKeyword($constant)};
+#else
+		return ${valueObject}.valueOf(${aClassname}.DEFAULT_VALUE_${manifestmodel.escapeKeyword($constant)});
+#end
+#else
+#if ($valueObject == "String")
+		return ${aClassname}.DEFAULT_VALUE;
+#else
+		return ${valueObject}.valueOf(${aClassname}.DEFAULT_VALUE);
+#end
+#end
+#else
+		return null;
+#end
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code> , See {@odf.attribute ${attribute.getQName()}}
+	 *
+	 * @param $aParam   The type is <code>$valueObject</code>
+	 */
+	public void set${aClassname}($valueObject $aParam) {
+		$aClassname attr = new ${aClassname}((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+#if ($valueObject == "String")
+		attr.setValue($aParam);
+#else
+		attr.set${manifestmodel.camelCase($simpleValue)}Value($aParam.${simpleValue}Value());
+#end
+	}
+#end
+#end
+
+##
+## ---------------------------------------------------
+##  Methods for child element creation
+## ---------------------------------------------------
+##
+#foreach($ch in $children)
+#if ($ch != "*")
+#set ($child = ${ch.withMultiples()})
+#set ($cClassname = "${manifestmodel.camelCase($child)}Element")
+#set ($cVar = ${manifestmodel.javaCase($child)})
+#set ($ch_attributes = ${child.getAttributes().withoutMultiples()})
+##set has parameter flag
+#set ($hasParams = false)
+#foreach ($ch_attribute in $ch_attributes)
+#if (${child.isMandatory($ch_attribute)})
+#set ($hasParams = true)
+#end
+#end
+#if ($hasParams)
+	/**
+	 * Create child element {@odf.element ${child}}.
+	 *
+#set ($seperateFlag="")
+#set ($params="")
+#foreach ($ch_attr in $ch_attributes)
+#if (${child.isMandatory($ch_attr)})
+#set($ch_attri = ${manifestmodel.getAttribute($ch_attr.getQName())})
+#set ($ch_ValueObject = "String")
+#set ($ch_SimpleValue = "")
+#set ($ch_DataTypes = ${ch_attri.getDatatypes().withoutMultiples()})
+#set ($ch_ValueTypes = ${javamodel.getValuetypes($ch_DataTypes)})
+#foreach ($ch_ValueType in $ch_ValueTypes)
+#set ($ch_ValueObject = $ch_ValueType)
+#end
+## use ch_attri get all of the values.
+#set($ch_Values = ${ch_attri.getValues().withoutMultiples()})
+#if ($ch_Values.size() ==2 && $ch_DataTypes.size()==0)
+#set ($trueFlag = false)
+#set ($falseFlag = false)
+#foreach ($ch_Value in $ch_Values)
+#if ($ch_Value==true)
+#set ($trueFlag = true)
+#end
+#if ($ch_Value==false)
+#set ($falseFlag = true)
+#end
+#end
+#if ($trueFlag and $falseFlag)
+#set ($ch_Hasdatatype = true)
+#set ($ch_ValueObject = "Boolean")
+#end
+#end
+#if ($ch_ValueObject != "String" && $ch_ValueObject != "Double" && $ch_ValueObject != "Integer" && $ch_ValueObject != "Boolean")
+#set ($ch_ValueObject = "String")
+#end
+#if ($ch_ValueObject != "String")
+#set ($ch_SimpleValue = ${javamodel.getPrimitiveType($ch_ValueObject)})
+#end
+#if ($ch_attr != "*")
+#set ($attribute = ${ch_attr.withMultiples()})
+#set ($aNS = ${attribute.getNamespace()})
+#set ($aClassname = "${manifestmodel.camelCase($attribute)}Attribute")
+#set ($aParam = "${manifestmodel.javaCase($attribute)}Value")
+	 * @param $aParam  the <code>$ch_ValueObject</code> value of <code>$aClassname</code>, see {@odf.attribute  ${attribute.getQName()}} at specification
+#if ($ch_SimpleValue!="")
+#set ($params="${params}${seperateFlag}${ch_SimpleValue} ${aParam}")
+#else
+#set ($params="${params}${seperateFlag}${ch_ValueObject} ${aParam}")
+#end
+#set ($seperateFlag=", ")
+#end
+#end
+#end
+## Compare element from old and new Spec. A direct comparison is not possible (both encapsulate different RelaxNG Expressions)
+## but we can compare by name
+#if (!$oldelement || !${oldelement.getChildElements().containsName($child)})
+	 * Child element is new in Odf 1.2
+	 *
+#end
+#if (${element.isMandatory($child)})
+	 * Child element is mandatory.
+	 *
+#end
+	 * @return the element {@odf.element ${child}}
+	 */
+	 public $cClassname new${cClassname}($params) {
+		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
+#foreach ($ch_attr in $ch_attributes)
+#if ($ch_attr != "*" && ${child.isMandatory($ch_attr)})
+#set ($aClassname = "${manifestmodel.camelCase($ch_attr)}Attribute")
+#set ($aParam = "${manifestmodel.javaCase($ch_attr)}Value")
+		${cVar}.set$aClassname($aParam);
+#end
+#end
+		this.appendChild($cVar);
+		return $cVar;
+	}
+
+#else
+	/**
+	 * Create child element {@odf.element ${child}}.
+	 *
+## Compare element from old and new Spec. A direct comparison is not possible (both encapsulate different RelaxNG Expressions)
+## but we can compare by name
+#if (!$oldelement || !${oldelement.getChildElements().containsName($child)})
+	 * Child element is new in Odf 1.2
+	 *
+#end
+#if (${element.isMandatory($child)})
+	 * Child element is mandatory.
+	 *
+#end
+	 * @return the element {@odf.element ${child}}
+	 */
+	public $cClassname new${cClassname}() {
+		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
+		this.appendChild($cVar);
+		return $cVar;
+	}
+
+#end
+#end
+#end
+##
+## -----------------------------------------------------
+##  New: newTextNode
+## -----------------------------------------------------
+##
+#if ($element.canHaveText())
+	/**
+	 * Add text content. Only elements which are allowed to have text content offer this method.
+	 */
+	 public void newTextNode(String content) {
+		if (content != null && !content.equals("")) {
+			this.appendChild(this.getOwnerDocument().createTextNode(content));
+		}
+	 }
+#end
+}

Added: incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/pkg-output-files.vm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/pkg-output-files.vm?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/pkg-output-files.vm (added)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/pkg-output-files.vm Tue Feb 21 10:06:53 2012
@@ -0,0 +1,62 @@
+##################################################################
+## 
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+## 
+##  http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+##################################################################
+<?xml version="1.0" encoding="UTF-8"?>
+## Template to create the list of artefacts which are to be generated
+##
+## Documentation of template development can be found in local file
+## src/main/resources/documentation/help.html
+##
+<filelist>
+##
+#foreach ($element in ${signaturemodel.getElements().withoutMultiples()})
+#if ($element != "*")
+##
+#set($classname = "${signaturemodel.camelCase($element)}Element")
+	<file path="org/odftoolkit/odfdom/pkg/dsig/${classname}.java" context="$element" template="odfdom-dsig-element-template.vm" />
+##
+#end
+#end
+##
+#foreach ($attribute in ${signaturemodel.getAttributes().withoutMultiples()})
+#if ($attribute != "*")
+##
+#set($classname = "${signaturemodel.camelCase($attribute)}Attribute")
+	<file path="org/odftoolkit/odfdom/pkg/dsig/${classname}.java" context="$attribute" template="odfdom-dsig-attribute-template.vm" />
+#end
+#end
+##
+#foreach ($element in ${manifestmodel.getElements().withoutMultiples()})
+#if ($element != "*")
+##
+#set($classname = "${manifestmodel.camelCase($element)}Element")
+	<file path="org/odftoolkit/odfdom/pkg/manifest/${classname}.java" context="$element" template="odfdom-manifest-element-template.vm" />
+##
+#end
+#end
+##
+#foreach ($attribute in ${manifestmodel.getAttributes().withoutMultiples()})
+#if ($attribute != "*")
+##
+#set($classname = "${manifestmodel.camelCase($attribute)}Attribute")
+	<file path="org/odftoolkit/odfdom/pkg/manifest/${classname}.java" context="$attribute" template="odfdom-manifest-attribute-template.vm" />
+#end
+#end
+</filelist>

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawExtrusionOriginAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawExtrusionOriginAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawExtrusionOriginAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawExtrusionOriginAttribute.java Tue Feb 21 10:06:53 2012
@@ -69,6 +69,26 @@ public class DrawExtrusionOriginAttribut
 	}
 
 	/**
+	 * @param value The <code>double</code> value of the attribute.
+	 */
+	public void setDoubleValue(double value) {
+		super.setValue(String.valueOf(value));
+	}
+
+	/**
+	 * @return Returns the <code>double</code> value of the attribute
+	 */
+	public double doubleValue() {
+		String val = super.getValue();
+		try {
+			return Double.parseDouble(val);
+		} catch (NumberFormatException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
 	 * Returns the default value of {@odf.attribute draw:extrusion-origin}.
 	 *
 	 * @return the default value as <code>String</code> dependent of its element name

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTileRepeatOffsetAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTileRepeatOffsetAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTileRepeatOffsetAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTileRepeatOffsetAttribute.java Tue Feb 21 10:06:53 2012
@@ -67,6 +67,47 @@ public class DrawTileRepeatOffsetAttribu
 	}
 
 	/**
+	 * The value set of {@odf.attribute draw:tile-repeat-offset}.
+	 */
+	public enum Value {
+		HORIZONTAL("horizontal"), VERTICAL("vertical") ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+
+	/**
 	 * Returns the default value of {@odf.attribute draw:tile-repeat-offset}.
 	 *
 	 * @return the default value as <code>String</code> dependent of its element name

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTypeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTypeAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTypeAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/draw/DrawTypeAttribute.java Tue Feb 21 10:06:53 2012
@@ -41,8 +41,8 @@ import org.odftoolkit.odfdom.dom.element
 public class DrawTypeAttribute extends OdfAttribute {
 
 	public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.DRAW, "type");
-	public static final String DEFAULT_VALUE_NON_PRIMITIVE = Value.NON_PRIMITIVE.toString();
 	public static final String DEFAULT_VALUE_STANDARD = Value.STANDARD.toString();
+	public static final String DEFAULT_VALUE_NON_PRIMITIVE = Value.NON_PRIMITIVE.toString();
 
 	/**
 	 * Create the instance of OpenDocument attribute {@odf.attribute draw:type}.

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/form/FormListLinkageTypeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/form/FormListLinkageTypeAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/form/FormListLinkageTypeAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/form/FormListLinkageTypeAttribute.java Tue Feb 21 10:06:53 2012
@@ -70,7 +70,7 @@ public class FormListLinkageTypeAttribut
 	 * The value set of {@odf.attribute form:list-linkage-type}.
 	 */
 	public enum Value {
-		SELECTION("selection"), SELECTION_INDEXES("selection-indexes") ;
+		SELECTION("selection"), SELECTION_INDICES("selection-indices") ;
 
 		private String mValue;
 

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/smil/SmilCalcModeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/smil/SmilCalcModeAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/smil/SmilCalcModeAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/smil/SmilCalcModeAttribute.java Tue Feb 21 10:06:53 2012
@@ -42,8 +42,8 @@ import org.odftoolkit.odfdom.dom.element
 public class SmilCalcModeAttribute extends OdfAttribute {
 
 	public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.SMIL, "calcMode");
-	public static final String DEFAULT_VALUE_PACED = Value.PACED.toString();
 	public static final String DEFAULT_VALUE_DISCRETE = Value.DISCRETE.toString();
+	public static final String DEFAULT_VALUE_PACED = Value.PACED.toString();
 
 	/**
 	 * Create the instance of OpenDocument attribute {@odf.attribute smil:calcMode}.

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleCellProtectAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleCellProtectAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleCellProtectAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleCellProtectAttribute.java Tue Feb 21 10:06:53 2012
@@ -70,7 +70,7 @@ public class StyleCellProtectAttribute e
 	 * The value set of {@odf.attribute style:cell-protect}.
 	 */
 	public enum Value {
-		HIDDEN_AND_PROTECTED("hidden-and-protected"), NONE("none") ;
+		FORMULA_HIDDEN("formula-hidden"), HIDDEN_AND_PROTECTED("hidden-and-protected"), NONE("none"), PROTECTED("protected") ;
 
 		private String mValue;
 

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StylePrintAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StylePrintAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StylePrintAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StylePrintAttribute.java Tue Feb 21 10:06:53 2012
@@ -67,6 +67,47 @@ public class StylePrintAttribute extends
 	}
 
 	/**
+	 * The value set of {@odf.attribute style:print}.
+	 */
+	public enum Value {
+		ANNOTATIONS("annotations"), CHARTS("charts"), DRAWINGS("drawings"), FORMULAS("formulas"), GRID("grid"), HEADERS("headers"), OBJECTS("objects"), ZERO_VALUES("zero-values") ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+
+	/**
 	 * Returns the default value of {@odf.attribute style:print}.
 	 *
 	 * @return the default value as <code>String</code> dependent of its element name

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleProtectAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleProtectAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleProtectAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleProtectAttribute.java Tue Feb 21 10:06:53 2012
@@ -70,7 +70,7 @@ public class StyleProtectAttribute exten
 	 * The value set of {@odf.attribute style:protect}.
 	 */
 	public enum Value {
-		FALSE("false"), NONE("none"), TRUE("true") ;
+		CONTENT("content"), FALSE("false"), NONE("none"), POSITION("position"), SIZE("size"), TRUE("true") ;
 
 		private String mValue;
 

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextEmphasizeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextEmphasizeAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextEmphasizeAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextEmphasizeAttribute.java Tue Feb 21 10:06:53 2012
@@ -70,7 +70,7 @@ public class StyleTextEmphasizeAttribute
 	 * The value set of {@odf.attribute style:text-emphasize}.
 	 */
 	public enum Value {
-		NONE("none") ;
+		ABOVE("above"), ACCENT("accent"), BELOW("below"), CIRCLE("circle"), DISC("disc"), DOT("dot"), NONE("none") ;
 
 		private String mValue;
 

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextPositionAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextPositionAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextPositionAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleTextPositionAttribute.java Tue Feb 21 10:06:53 2012
@@ -67,6 +67,47 @@ public class StyleTextPositionAttribute 
 	}
 
 	/**
+	 * The value set of {@odf.attribute style:text-position}.
+	 */
+	public enum Value {
+		SUB("sub"), SUPER("super") ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+
+	/**
 	 * Returns the default value of {@odf.attribute style:text-position}.
 	 *
 	 * @return the default value as <code>String</code> dependent of its element name

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/svg/SvgViewBoxAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/svg/SvgViewBoxAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/svg/SvgViewBoxAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/svg/SvgViewBoxAttribute.java Tue Feb 21 10:06:53 2012
@@ -67,6 +67,26 @@ public class SvgViewBoxAttribute extends
 	}
 
 	/**
+	 * @param value The <code>int</code> value of the attribute.
+	 */
+	public void setIntValue(int value) {
+		super.setValue(String.valueOf(value));
+	}
+
+	/**
+	 * @return Returns the <code>int</code> value of the attribute
+	 */
+	public int intValue() {
+		String val = super.getValue();
+		try {
+			return Integer.parseInt(val);
+		} catch (NumberFormatException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
 	 * Returns the default value of {@odf.attribute svg:viewBox}.
 	 *
 	 * @return the default value as <code>String</code> dependent of its element name

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableCaseSensitiveAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableCaseSensitiveAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableCaseSensitiveAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableCaseSensitiveAttribute.java Tue Feb 21 10:06:53 2012
@@ -43,8 +43,8 @@ import org.odftoolkit.odfdom.dom.element
 public class TableCaseSensitiveAttribute extends OdfAttribute {
 
 	public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.TABLE, "case-sensitive");
-	public static final String DEFAULT_VALUE_TRUE = Value.TRUE.toString();
 	public static final String DEFAULT_VALUE_FALSE = Value.FALSE.toString();
+	public static final String DEFAULT_VALUE_TRUE = Value.TRUE.toString();
 
 	/**
 	 * Create the instance of OpenDocument attribute {@odf.attribute table:case-sensitive}.

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableRangeUsableAsAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableRangeUsableAsAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableRangeUsableAsAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/table/TableRangeUsableAsAttribute.java Tue Feb 21 10:06:53 2012
@@ -72,7 +72,7 @@ public class TableRangeUsableAsAttribute
 	 * The value set of {@odf.attribute table:range-usable-as}.
 	 */
 	public enum Value {
-		NONE("none") ;
+		FILTER("filter"), NONE("none"), PRINT_RANGE("print-range"), REPEAT_COLUMN("repeat-column"), REPEAT_ROW("repeat-row") ;
 
 		private String mValue;
 

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/text/TextOutlineLevelAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/text/TextOutlineLevelAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/text/TextOutlineLevelAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/text/TextOutlineLevelAttribute.java Tue Feb 21 10:06:53 2012
@@ -67,6 +67,47 @@ public class TextOutlineLevelAttribute e
 	}
 
 	/**
+	 * The value set of {@odf.attribute text:outline-level}.
+	 */
+	public enum Value {
+		_1("1"), _2("2"), _3("3"), SEPARATOR("separator") ;
+
+		private String mValue;
+
+		Value(String value) {
+			mValue = value;
+		}
+
+		@Override
+		public String toString() {
+			return mValue;
+		}
+
+		public static Value enumValueOf(String value) {
+			for(Value aIter : values()) {
+				if (value.equals(aIter.toString())) {
+				return aIter;
+				}
+			}
+			return null;
+		}
+	}
+
+	/**
+	 * @param attrValue The <code>Enum</code> value of the attribute.
+	 */
+	public void setEnumValue(Value attrValue) {
+		setValue(attrValue.toString());
+	}
+
+	/**
+	 * @return Returns the <code>Enum</code> value of the attribute
+	 */
+	public Value getEnumValue() {
+		return Value.enumValueOf(this.getValue());
+	}
+
+	/**
 	 * @param value The <code>int</code> value of the attribute.
 	 */
 	public void setIntValue(int value) {

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkActuateAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkActuateAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkActuateAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkActuateAttribute.java Tue Feb 21 10:06:53 2012
@@ -61,8 +61,8 @@ import org.odftoolkit.odfdom.dom.element
 public class XlinkActuateAttribute extends OdfAttribute {
 
 	public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.XLINK, "actuate");
-	public static final String DEFAULT_VALUE_ONREQUEST = Value.ONREQUEST.toString();
 	public static final String DEFAULT_VALUE_ONLOAD = Value.ONLOAD.toString();
+	public static final String DEFAULT_VALUE_ONREQUEST = Value.ONREQUEST.toString();
 
 	/**
 	 * Create the instance of OpenDocument attribute {@odf.attribute xlink:actuate}.

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkShowAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkShowAttribute.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkShowAttribute.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/xlink/XlinkShowAttribute.java Tue Feb 21 10:06:53 2012
@@ -52,9 +52,9 @@ import org.odftoolkit.odfdom.dom.element
 public class XlinkShowAttribute extends OdfAttribute {
 
 	public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.XLINK, "show");
-	public static final String DEFAULT_VALUE_EMBED = Value.EMBED.toString();
-	public static final String DEFAULT_VALUE_NONE = Value.NONE.toString();
 	public static final String DEFAULT_VALUE_REPLACE = Value.REPLACE.toString();
+	public static final String DEFAULT_VALUE_NONE = Value.NONE.toString();
+	public static final String DEFAULT_VALUE_EMBED = Value.EMBED.toString();
 
 	/**
 	 * Create the instance of OpenDocument attribute {@odf.attribute xlink:show}.

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dExtrudeElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dExtrudeElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dExtrudeElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dExtrudeElement.java Tue Feb 21 10:06:53 2012
@@ -295,12 +295,12 @@ public class Dr3dExtrudeElement extends 
 	 *
 	 * Attribute is mandatory.
 	 *
-	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
 	 */
-	public String getSvgViewBoxAttribute() {
+	public Integer getSvgViewBoxAttribute() {
 		SvgViewBoxAttribute attr = (SvgViewBoxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "viewBox");
 		if (attr != null) {
-			return String.valueOf(attr.getValue());
+			return Integer.valueOf(attr.intValue());
 		}
 		return null;
 	}
@@ -308,12 +308,12 @@ public class Dr3dExtrudeElement extends 
 	/**
 	 * Sets the value of ODFDOM attribute representation <code>SvgViewBoxAttribute</code> , See {@odf.attribute svg:viewBox}
 	 *
-	 * @param svgViewBoxValue   The type is <code>String</code>
+	 * @param svgViewBoxValue   The type is <code>Integer</code>
 	 */
-	public void setSvgViewBoxAttribute(String svgViewBoxValue) {
+	public void setSvgViewBoxAttribute(Integer svgViewBoxValue) {
 		SvgViewBoxAttribute attr = new SvgViewBoxAttribute((OdfFileDom) this.ownerDocument);
 		setOdfAttribute(attr);
-		attr.setValue(svgViewBoxValue);
+		attr.setIntValue(svgViewBoxValue.intValue());
 	}
 
 	/**

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dRotateElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dRotateElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dRotateElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dRotateElement.java Tue Feb 21 10:06:53 2012
@@ -295,12 +295,12 @@ public class Dr3dRotateElement extends O
 	 *
 	 * Attribute is mandatory.
 	 *
-	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
 	 */
-	public String getSvgViewBoxAttribute() {
+	public Integer getSvgViewBoxAttribute() {
 		SvgViewBoxAttribute attr = (SvgViewBoxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "viewBox");
 		if (attr != null) {
-			return String.valueOf(attr.getValue());
+			return Integer.valueOf(attr.intValue());
 		}
 		return null;
 	}
@@ -308,12 +308,12 @@ public class Dr3dRotateElement extends O
 	/**
 	 * Sets the value of ODFDOM attribute representation <code>SvgViewBoxAttribute</code> , See {@odf.attribute svg:viewBox}
 	 *
-	 * @param svgViewBoxValue   The type is <code>String</code>
+	 * @param svgViewBoxValue   The type is <code>Integer</code>
 	 */
-	public void setSvgViewBoxAttribute(String svgViewBoxValue) {
+	public void setSvgViewBoxAttribute(Integer svgViewBoxValue) {
 		SvgViewBoxAttribute attr = new SvgViewBoxAttribute((OdfFileDom) this.ownerDocument);
 		setOdfAttribute(attr);
-		attr.setValue(svgViewBoxValue);
+		attr.setIntValue(svgViewBoxValue.intValue());
 	}
 
 	/**

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dSceneElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dSceneElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dSceneElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/dr3d/Dr3dSceneElement.java Tue Feb 21 10:06:53 2012
@@ -829,10 +829,10 @@ public class Dr3dSceneElement extends Od
 	 * Create child element {@odf.element dr3d:extrude}.
 	 *
 	 * @param svgDValue  the <code>String</code> value of <code>SvgDAttribute</code>, see {@odf.attribute  svg:d} at specification
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * @return the element {@odf.element dr3d:extrude}
 	 */
-	 public Dr3dExtrudeElement newDr3dExtrudeElement(String svgDValue, String svgViewBoxValue) {
+	 public Dr3dExtrudeElement newDr3dExtrudeElement(String svgDValue, int svgViewBoxValue) {
 		Dr3dExtrudeElement dr3dExtrude = ((OdfFileDom) this.ownerDocument).newOdfElement(Dr3dExtrudeElement.class);
 		dr3dExtrude.setSvgDAttribute(svgDValue);
 		dr3dExtrude.setSvgViewBoxAttribute(svgViewBoxValue);
@@ -857,10 +857,10 @@ public class Dr3dSceneElement extends Od
 	 * Create child element {@odf.element dr3d:rotate}.
 	 *
 	 * @param svgDValue  the <code>String</code> value of <code>SvgDAttribute</code>, see {@odf.attribute  svg:d} at specification
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * @return the element {@odf.element dr3d:rotate}
 	 */
-	 public Dr3dRotateElement newDr3dRotateElement(String svgDValue, String svgViewBoxValue) {
+	 public Dr3dRotateElement newDr3dRotateElement(String svgDValue, int svgViewBoxValue) {
 		Dr3dRotateElement dr3dRotate = ((OdfFileDom) this.ownerDocument).newOdfElement(Dr3dRotateElement.class);
 		dr3dRotate.setSvgDAttribute(svgDValue);
 		dr3dRotate.setSvgViewBoxAttribute(svgViewBoxValue);

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAElement.java Tue Feb 21 10:06:53 2012
@@ -331,12 +331,12 @@ public class DrawAElement extends OdfEle
 	/**
 	 * Create child element {@odf.element draw:connector}.
 	 *
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * Child element is new in Odf 1.2
 	 *
 	 * @return the element {@odf.element draw:connector}
 	 */
-	 public DrawConnectorElement newDrawConnectorElement(String svgViewBoxValue) {
+	 public DrawConnectorElement newDrawConnectorElement(int svgViewBoxValue) {
 		DrawConnectorElement drawConnector = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawConnectorElement.class);
 		drawConnector.setSvgViewBoxAttribute(svgViewBoxValue);
 		this.appendChild(drawConnector);
@@ -467,12 +467,12 @@ public class DrawAElement extends OdfEle
 	 * Create child element {@odf.element draw:path}.
 	 *
 	 * @param svgDValue  the <code>String</code> value of <code>SvgDAttribute</code>, see {@odf.attribute  svg:d} at specification
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * Child element is new in Odf 1.2
 	 *
 	 * @return the element {@odf.element draw:path}
 	 */
-	 public DrawPathElement newDrawPathElement(String svgDValue, String svgViewBoxValue) {
+	 public DrawPathElement newDrawPathElement(String svgDValue, int svgViewBoxValue) {
 		DrawPathElement drawPath = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPathElement.class);
 		drawPath.setSvgDAttribute(svgDValue);
 		drawPath.setSvgViewBoxAttribute(svgViewBoxValue);
@@ -484,12 +484,12 @@ public class DrawAElement extends OdfEle
 	 * Create child element {@odf.element draw:polygon}.
 	 *
 	 * @param drawPointsValue  the <code>String</code> value of <code>DrawPointsAttribute</code>, see {@odf.attribute  draw:points} at specification
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * Child element is new in Odf 1.2
 	 *
 	 * @return the element {@odf.element draw:polygon}
 	 */
-	 public DrawPolygonElement newDrawPolygonElement(String drawPointsValue, String svgViewBoxValue) {
+	 public DrawPolygonElement newDrawPolygonElement(String drawPointsValue, int svgViewBoxValue) {
 		DrawPolygonElement drawPolygon = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolygonElement.class);
 		drawPolygon.setDrawPointsAttribute(drawPointsValue);
 		drawPolygon.setSvgViewBoxAttribute(svgViewBoxValue);
@@ -501,12 +501,12 @@ public class DrawAElement extends OdfEle
 	 * Create child element {@odf.element draw:polyline}.
 	 *
 	 * @param drawPointsValue  the <code>String</code> value of <code>DrawPointsAttribute</code>, see {@odf.attribute  draw:points} at specification
-	 * @param svgViewBoxValue  the <code>String</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
+	 * @param svgViewBoxValue  the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see {@odf.attribute  svg:viewBox} at specification
 	 * Child element is new in Odf 1.2
 	 *
 	 * @return the element {@odf.element draw:polyline}
 	 */
-	 public DrawPolylineElement newDrawPolylineElement(String drawPointsValue, String svgViewBoxValue) {
+	 public DrawPolylineElement newDrawPolylineElement(String drawPointsValue, int svgViewBoxValue) {
 		DrawPolylineElement drawPolyline = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolylineElement.class);
 		drawPolyline.setDrawPointsAttribute(drawPointsValue);
 		drawPolyline.setSvgViewBoxAttribute(svgViewBoxValue);

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAreaPolygonElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAreaPolygonElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAreaPolygonElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawAreaPolygonElement.java Tue Feb 21 10:06:53 2012
@@ -203,12 +203,12 @@ public class DrawAreaPolygonElement exte
 	 *
 	 * Attribute is mandatory.
 	 *
-	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
 	 */
-	public String getSvgViewBoxAttribute() {
+	public Integer getSvgViewBoxAttribute() {
 		SvgViewBoxAttribute attr = (SvgViewBoxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "viewBox");
 		if (attr != null) {
-			return String.valueOf(attr.getValue());
+			return Integer.valueOf(attr.intValue());
 		}
 		return null;
 	}
@@ -216,12 +216,12 @@ public class DrawAreaPolygonElement exte
 	/**
 	 * Sets the value of ODFDOM attribute representation <code>SvgViewBoxAttribute</code> , See {@odf.attribute svg:viewBox}
 	 *
-	 * @param svgViewBoxValue   The type is <code>String</code>
+	 * @param svgViewBoxValue   The type is <code>Integer</code>
 	 */
-	public void setSvgViewBoxAttribute(String svgViewBoxValue) {
+	public void setSvgViewBoxAttribute(Integer svgViewBoxValue) {
 		SvgViewBoxAttribute attr = new SvgViewBoxAttribute((OdfFileDom) this.ownerDocument);
 		setOdfAttribute(attr);
-		attr.setValue(svgViewBoxValue);
+		attr.setIntValue(svgViewBoxValue.intValue());
 	}
 
 	/**

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawConnectorElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawConnectorElement.java?rev=1291683&r1=1291682&r2=1291683&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawConnectorElement.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/draw/DrawConnectorElement.java Tue Feb 21 10:06:53 2012
@@ -351,12 +351,12 @@ public class DrawConnectorElement extend
 	 *
 	 * Attribute is mandatory.
 	 *
-	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
 	 */
-	public String getSvgViewBoxAttribute() {
+	public Integer getSvgViewBoxAttribute() {
 		SvgViewBoxAttribute attr = (SvgViewBoxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "viewBox");
 		if (attr != null) {
-			return String.valueOf(attr.getValue());
+			return Integer.valueOf(attr.intValue());
 		}
 		return null;
 	}
@@ -364,12 +364,12 @@ public class DrawConnectorElement extend
 	/**
 	 * Sets the value of ODFDOM attribute representation <code>SvgViewBoxAttribute</code> , See {@odf.attribute svg:viewBox}
 	 *
-	 * @param svgViewBoxValue   The type is <code>String</code>
+	 * @param svgViewBoxValue   The type is <code>Integer</code>
 	 */
-	public void setSvgViewBoxAttribute(String svgViewBoxValue) {
+	public void setSvgViewBoxAttribute(Integer svgViewBoxValue) {
 		SvgViewBoxAttribute attr = new SvgViewBoxAttribute((OdfFileDom) this.ownerDocument);
 		setOdfAttribute(attr);
-		attr.setValue(svgViewBoxValue);
+		attr.setIntValue(svgViewBoxValue.intValue());
 	}
 
 	/**



Mime
View raw message