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 [5/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/main/java/org/odftoolkit/odfdom/pkg/manifest/FileEntryElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FileEntryElement.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FileEntryElement.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FileEntryElement.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,201 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+/**
+ * Manifest implementation of OpenDocument element  {@odf.element file-entry}.
+ *
+ */
+public class FileEntryElement extends OdfElement {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:file-entry");
+
+	/**
+	 * Create the instance of <code>FileEntryElement</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public FileEntryElement(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element file-entry}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>FullPathAttribute</code> , See {@odf.attribute full-path}
+	 *
+	 * 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.
+	 */
+	public String getFullPathAttribute() {
+		FullPathAttribute attr = (FullPathAttribute) getOdfAttribute(FullPathAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>FullPathAttribute</code> , See {@odf.attribute full-path}
+	 *
+	 * @param fullPathValue   The type is <code>String</code>
+	 */
+	public void setFullPathAttribute(String fullPathValue) {
+		FullPathAttribute attr = new FullPathAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(fullPathValue);
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>MediaTypeAttribute</code> , See {@odf.attribute media-type}
+	 *
+	 * 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.
+	 */
+	public String getMediaTypeAttribute() {
+		MediaTypeAttribute attr = (MediaTypeAttribute) getOdfAttribute(MediaTypeAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>MediaTypeAttribute</code> , See {@odf.attribute media-type}
+	 *
+	 * @param mediaTypeValue   The type is <code>String</code>
+	 */
+	public void setMediaTypeAttribute(String mediaTypeValue) {
+		MediaTypeAttribute attr = new MediaTypeAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(mediaTypeValue);
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>PreferredViewModeAttribute</code> , See {@odf.attribute preferred-view-mode}
+	 *
+	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public String getPreferredViewModeAttribute() {
+		PreferredViewModeAttribute attr = (PreferredViewModeAttribute) getOdfAttribute(PreferredViewModeAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>PreferredViewModeAttribute</code> , See {@odf.attribute preferred-view-mode}
+	 *
+	 * @param preferredViewModeValue   The type is <code>String</code>
+	 */
+	public void setPreferredViewModeAttribute(String preferredViewModeValue) {
+		PreferredViewModeAttribute attr = new PreferredViewModeAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(preferredViewModeValue);
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>SizeAttribute</code> , See {@odf.attribute size}
+	 *
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public Integer getSizeAttribute() {
+		SizeAttribute attr = (SizeAttribute) getOdfAttribute(SizeAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return Integer.valueOf(attr.intValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>SizeAttribute</code> , See {@odf.attribute size}
+	 *
+	 * @param sizeValue   The type is <code>Integer</code>
+	 */
+	public void setSizeAttribute(Integer sizeValue) {
+		SizeAttribute attr = new SizeAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setIntValue(sizeValue.intValue());
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>VersionAttribute</code> , See {@odf.attribute version}
+	 *
+	 * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public String getVersionAttribute() {
+		VersionAttribute attr = (VersionAttribute) getOdfAttribute(VersionAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>VersionAttribute</code> , See {@odf.attribute version}
+	 *
+	 * @param versionValue   The type is <code>String</code>
+	 */
+	public void setVersionAttribute(String versionValue) {
+		VersionAttribute attr = new VersionAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(versionValue);
+	}
+
+	/**
+	 * Create child element {@odf.element encryption-data}.
+	 *
+	 * @param checksumValue  the <code>String</code> value of <code>ChecksumAttribute</code>, see {@odf.attribute  checksum} at specification
+	 * @param checksumTypeValue  the <code>String</code> value of <code>ChecksumTypeAttribute</code>, see {@odf.attribute  checksum-type} at specification
+	 * Child element is new in Odf 1.2
+	 *
+	 * @return the element {@odf.element encryption-data}
+	 */
+	 public EncryptionDataElement newEncryptionDataElement(String checksumValue, String checksumTypeValue) {
+		EncryptionDataElement encryptionData = ((OdfFileDom) this.ownerDocument).newOdfElement(EncryptionDataElement.class);
+		encryptionData.setChecksumAttribute(checksumValue);
+		encryptionData.setChecksumTypeAttribute(checksumTypeValue);
+		this.appendChild(encryptionData);
+		return encryptionData;
+	}
+
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FullPathAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FullPathAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FullPathAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/FullPathAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,129 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute full-path}.
+ *
+ */
+public class FullPathAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:full-path");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute full-path}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public FullPathAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute full-path}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of full-path is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute full-path}.
+	 *
+	 * @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 full-path} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/InitialisationVectorAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/InitialisationVectorAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/InitialisationVectorAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/InitialisationVectorAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,129 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute initialisation-vector}.
+ *
+ */
+public class InitialisationVectorAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:initialisation-vector");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute initialisation-vector}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public InitialisationVectorAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute initialisation-vector}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of initialisation-vector is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute initialisation-vector}.
+	 *
+	 * @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 initialisation-vector} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/IterationCountAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/IterationCountAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/IterationCountAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/IterationCountAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,149 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute iteration-count}.
+ *
+ */
+public class IterationCountAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:iteration-count");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute iteration-count}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public IterationCountAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute iteration-count}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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);
+		}
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of iteration-count is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute iteration-count}.
+	 *
+	 * @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 iteration-count} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationElement.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationElement.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationElement.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,162 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+/**
+ * Manifest implementation of OpenDocument element  {@odf.element key-derivation}.
+ *
+ */
+public class KeyDerivationElement extends OdfElement {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:key-derivation");
+
+	/**
+	 * Create the instance of <code>KeyDerivationElement</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public KeyDerivationElement(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element key-derivation}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>IterationCountAttribute</code> , See {@odf.attribute iteration-count}
+	 *
+	 * Attribute is mandatory.
+	 *
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public Integer getIterationCountAttribute() {
+		IterationCountAttribute attr = (IterationCountAttribute) getOdfAttribute(IterationCountAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return Integer.valueOf(attr.intValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>IterationCountAttribute</code> , See {@odf.attribute iteration-count}
+	 *
+	 * @param iterationCountValue   The type is <code>Integer</code>
+	 */
+	public void setIterationCountAttribute(Integer iterationCountValue) {
+		IterationCountAttribute attr = new IterationCountAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setIntValue(iterationCountValue.intValue());
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>KeyDerivationNameAttribute</code> , See {@odf.attribute key-derivation-name}
+	 *
+	 * 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.
+	 */
+	public String getKeyDerivationNameAttribute() {
+		KeyDerivationNameAttribute attr = (KeyDerivationNameAttribute) getOdfAttribute(KeyDerivationNameAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>KeyDerivationNameAttribute</code> , See {@odf.attribute key-derivation-name}
+	 *
+	 * @param keyDerivationNameValue   The type is <code>String</code>
+	 */
+	public void setKeyDerivationNameAttribute(String keyDerivationNameValue) {
+		KeyDerivationNameAttribute attr = new KeyDerivationNameAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(keyDerivationNameValue);
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>KeySizeAttribute</code> , See {@odf.attribute key-size}
+	 *
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public Integer getKeySizeAttribute() {
+		KeySizeAttribute attr = (KeySizeAttribute) getOdfAttribute(KeySizeAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return Integer.valueOf(attr.intValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>KeySizeAttribute</code> , See {@odf.attribute key-size}
+	 *
+	 * @param keySizeValue   The type is <code>Integer</code>
+	 */
+	public void setKeySizeAttribute(Integer keySizeValue) {
+		KeySizeAttribute attr = new KeySizeAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setIntValue(keySizeValue.intValue());
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>SaltAttribute</code> , See {@odf.attribute salt}
+	 *
+	 * 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.
+	 */
+	public String getSaltAttribute() {
+		SaltAttribute attr = (SaltAttribute) getOdfAttribute(SaltAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>SaltAttribute</code> , See {@odf.attribute salt}
+	 *
+	 * @param saltValue   The type is <code>String</code>
+	 */
+	public void setSaltAttribute(String saltValue) {
+		SaltAttribute attr = new SaltAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(saltValue);
+	}
+
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationNameAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationNameAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationNameAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeyDerivationNameAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,159 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute key-derivation-name}.
+ *
+ */
+public class KeyDerivationNameAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:key-derivation-name");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute key-derivation-name}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public KeyDerivationNameAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute key-derivation-name}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * The value set of {@odf.attribute key-derivation-name}.
+	 */
+	public enum Value {
+		PBKDF2("PBKDF2") ;
+
+		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 attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute key-derivation-name}.
+	 *
+	 * @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 key-derivation-name} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeySizeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeySizeAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeySizeAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/KeySizeAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,149 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute key-size}.
+ *
+ */
+public class KeySizeAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:key-size");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute key-size}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public KeySizeAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute key-size}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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);
+		}
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of key-size is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute key-size}.
+	 *
+	 * @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 key-size} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/ManifestElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/ManifestElement.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/ManifestElement.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/ManifestElement.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,105 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+/**
+ * Manifest implementation of OpenDocument element  {@odf.element manifest}.
+ *
+ */
+public class ManifestElement extends OdfElement {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:manifest");
+
+	/**
+	 * Create the instance of <code>ManifestElement</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public ManifestElement(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element manifest}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>VersionAttribute</code> , See {@odf.attribute version}
+	 *
+	 * 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.
+	 */
+	public String getVersionAttribute() {
+		VersionAttribute attr = (VersionAttribute) getOdfAttribute(VersionAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>VersionAttribute</code> , See {@odf.attribute version}
+	 *
+	 * @param versionValue   The type is <code>String</code>
+	 */
+	public void setVersionAttribute(String versionValue) {
+		VersionAttribute attr = new VersionAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(versionValue);
+	}
+
+	/**
+	 * Create child element {@odf.element file-entry}.
+	 *
+	 * @param fullPathValue  the <code>String</code> value of <code>FullPathAttribute</code>, see {@odf.attribute  full-path} at specification
+	 * @param mediaTypeValue  the <code>String</code> value of <code>MediaTypeAttribute</code>, see {@odf.attribute  media-type} at specification
+	 * Child element is new in Odf 1.2
+	 *
+	 * Child element is mandatory.
+	 *
+	 * @return the element {@odf.element file-entry}
+	 */
+	 public FileEntryElement newFileEntryElement(String fullPathValue, String mediaTypeValue) {
+		FileEntryElement fileEntry = ((OdfFileDom) this.ownerDocument).newOdfElement(FileEntryElement.class);
+		fileEntry.setFullPathAttribute(fullPathValue);
+		fileEntry.setMediaTypeAttribute(mediaTypeValue);
+		this.appendChild(fileEntry);
+		return fileEntry;
+	}
+
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/MediaTypeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/MediaTypeAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/MediaTypeAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/MediaTypeAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,129 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute media-type}.
+ *
+ */
+public class MediaTypeAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:media-type");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute media-type}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public MediaTypeAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute media-type}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of media-type is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute media-type}.
+	 *
+	 * @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 media-type} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/PreferredViewModeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/PreferredViewModeAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/PreferredViewModeAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/PreferredViewModeAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,159 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute preferred-view-mode}.
+ *
+ */
+public class PreferredViewModeAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:preferred-view-mode");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute preferred-view-mode}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public PreferredViewModeAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute preferred-view-mode}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * The value set of {@odf.attribute preferred-view-mode}.
+	 */
+	public enum Value {
+		EDIT("edit"), PRESENTATION_SLIDE_SHOW("presentation-slide-show"), READ_ONLY("read-only") ;
+
+		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 attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute preferred-view-mode}.
+	 *
+	 * @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 preferred-view-mode} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SaltAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SaltAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SaltAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SaltAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,129 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute salt}.
+ *
+ */
+public class SaltAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:salt");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute salt}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public SaltAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute salt}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of salt is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute salt}.
+	 *
+	 * @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 salt} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SizeAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SizeAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SizeAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/SizeAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,149 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute size}.
+ *
+ */
+public class SizeAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:size");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute size}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public SizeAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute size}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * @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);
+		}
+	}
+
+	/**
+	 * @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) {
+		try {
+			super.setValue(attrValue);
+		} catch (NullPointerException e) {
+			// TODO: validation handling/logging
+			throw new IllegalArgumentException(e);
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw (e);
+		}
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		try {
+			return super.getValue();
+		} catch (IllegalArgumentException e) {
+			// TODO: validation handling/logging
+			throw new NumberFormatException("the value of size is not valid");
+		}
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute size}.
+	 *
+	 * @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 size} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationElement.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationElement.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationElement.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationElement.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,110 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfElement;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+/**
+ * Manifest implementation of OpenDocument element  {@odf.element start-key-generation}.
+ *
+ */
+public class StartKeyGenerationElement extends OdfElement {
+
+	public static final OdfName ELEMENT_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:start-key-generation");
+
+	/**
+	 * Create the instance of <code>StartKeyGenerationElement</code>
+	 *
+	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 */
+	public StartKeyGenerationElement(OdfFileDom ownerDoc) {
+		super(ownerDoc, ELEMENT_NAME);
+	}
+
+	/**
+	 * Get the element name
+	 *
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element start-key-generation}.
+	 */
+	public OdfName getOdfName() {
+		return ELEMENT_NAME;
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>KeySizeAttribute</code> , See {@odf.attribute key-size}
+	 *
+	 * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
+	 */
+	public Integer getKeySizeAttribute() {
+		KeySizeAttribute attr = (KeySizeAttribute) getOdfAttribute(KeySizeAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return Integer.valueOf(attr.intValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>KeySizeAttribute</code> , See {@odf.attribute key-size}
+	 *
+	 * @param keySizeValue   The type is <code>Integer</code>
+	 */
+	public void setKeySizeAttribute(Integer keySizeValue) {
+		KeySizeAttribute attr = new KeySizeAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setIntValue(keySizeValue.intValue());
+	}
+
+	/**
+	 * Receives the value of the ODFDOM attribute representation <code>StartKeyGenerationNameAttribute</code> , See {@odf.attribute start-key-generation-name}
+	 *
+	 * 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.
+	 */
+	public String getStartKeyGenerationNameAttribute() {
+		StartKeyGenerationNameAttribute attr = (StartKeyGenerationNameAttribute) getOdfAttribute(StartKeyGenerationNameAttribute.ATTRIBUTE_NAME);
+		if (attr != null) {
+			return String.valueOf(attr.getValue());
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the value of ODFDOM attribute representation <code>StartKeyGenerationNameAttribute</code> , See {@odf.attribute start-key-generation-name}
+	 *
+	 * @param startKeyGenerationNameValue   The type is <code>String</code>
+	 */
+	public void setStartKeyGenerationNameAttribute(String startKeyGenerationNameValue) {
+		StartKeyGenerationNameAttribute attr = new StartKeyGenerationNameAttribute((OdfFileDom) this.ownerDocument);
+		setOdfAttribute(attr);
+		attr.setValue(startKeyGenerationNameValue);
+	}
+
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationNameAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationNameAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationNameAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/StartKeyGenerationNameAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,159 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute start-key-generation-name}.
+ *
+ */
+public class StartKeyGenerationNameAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:start-key-generation-name");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute start-key-generation-name}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public StartKeyGenerationNameAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute start-key-generation-name}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * The value set of {@odf.attribute start-key-generation-name}.
+	 */
+	public enum Value {
+		SHA1("SHA1") ;
+
+		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 attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute start-key-generation-name}.
+	 *
+	 * @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 start-key-generation-name} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}

Added: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/VersionAttribute.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/VersionAttribute.java?rev=1291683&view=auto
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/VersionAttribute.java (added)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/VersionAttribute.java Tue Feb 21 10:06:53 2012
@@ -0,0 +1,159 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ * 
+ * Use is subject to license terms.
+ * 
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * This file is automatically generated.
+ * Don't edit manually.
+ */
+package org.odftoolkit.odfdom.pkg.manifest;
+
+import org.odftoolkit.odfdom.pkg.OdfAttribute;
+import org.odftoolkit.odfdom.pkg.OdfFileDom;
+import org.odftoolkit.odfdom.pkg.OdfName;
+
+/**
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute version}.
+ *
+ */
+public class VersionAttribute extends OdfAttribute {
+
+	public static final OdfName ATTRIBUTE_NAME = OdfName.newName("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0", "manifest:version");
+
+	/**
+	 * Create the instance of OpenDocument attribute {@odf.attribute version}.
+	 *
+	 * @param ownerDocument       The type is <code>OdfFileDom</code>
+	 */
+	public VersionAttribute(OdfFileDom ownerDocument) {
+		super(ownerDocument, ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Returns the attribute name.
+	 *
+	 * @return the <code>OdfName</code> for {@odf.attribute version}.
+	 */
+	@Override
+	public OdfName getOdfName() {
+		return ATTRIBUTE_NAME;
+	}
+
+	/**
+	 * @return Returns the name of this attribute.
+	 */
+	@Override
+	public String getName() {
+		return ATTRIBUTE_NAME.getLocalName();
+	}
+
+	/**
+	 * The value set of {@odf.attribute version}.
+	 */
+	public enum Value {
+		_1_2("1.2") ;
+
+		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 attrValue The <code>String</code> value of the attribute.
+	 * @throws IllegalArgumentException If the provided attribute value is invalid
+	 */
+	@Override
+	public void setValue(String attrValue) {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		super.setValue(attrValue);
+	}
+
+	/**
+	 * @return Returns the <code>String</code> value of the attribute
+	 */
+	@Override
+	public String getValue() {
+		// Since we have not only enumValues, but also a DataType, we use String as common base and don't validate.
+		return super.getValue();
+	}
+
+	/**
+	 * Returns the default value of {@odf.attribute version}.
+	 *
+	 * @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 version} has an element parent
+	 *         otherwise return <code>false</code> as undefined.
+	 */
+	@Override
+	public boolean hasDefault() {
+		return false;
+	}
+
+	/**
+	 * @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
+	 */
+	@Override
+	public boolean isId() {
+		return false;
+	}
+}



Mime
View raw message