incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1293100 - in /incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template: odfdom-dsig-attribute-template.vm odfdom-dsig-element-template.vm odfdom-manifest-attribute-template.vm odfdom-manifest-element-template.vm
Date Fri, 24 Feb 2012 06:45:26 GMT
Author: devinhan
Date: Fri Feb 24 06:45:25 2012
New Revision: 1293100

URL: http://svn.apache.org/viewvc?rev=1293100&view=rev
Log:
#ODFTOOLKIT-305# Fix the bug that manifest and data signature lack of namespace prefix in
template files.[Developer:Devin]

Modified:
    incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm
    incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm
    incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm
    incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm

Modified: 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=1293100&r1=1293099&r2=1293100&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm
(original)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-attribute-template.vm
Fri Feb 24 06:45:25 2012
@@ -97,7 +97,7 @@ import org.odftoolkit.odfdom.pkg.OdfFile
 import org.odftoolkit.odfdom.pkg.OdfName;
 
 /**
- * DOM implementation of OpenDocument attribute  {@odf.attribute ${attribute.getQName()}}.
+ * DOM implementation of OpenDocument attribute  {@odf.attribute ${PREFIX}:${attribute.getQName()}}.
  *
  */
 public class $classname extends OdfAttribute {
@@ -123,7 +123,7 @@ public class $classname extends OdfAttri
 #end
 
 	/**
-	 * Create the instance of OpenDocument attribute {@odf.attribute ${attribute}}.
+	 * Create the instance of OpenDocument attribute {@odf.attribute ${PREFIX}:${attribute}}.
 	 *
 	 * @param ownerDocument       The type is <code>OdfFileDom</code>
 	 */
@@ -134,7 +134,7 @@ public class $classname extends OdfAttri
 	/**
 	 * Returns the attribute name.
 	 *
-	 * @return the <code>OdfName</code> for {@odf.attribute ${attribute}}.
+	 * @return the <code>OdfName</code> for {@odf.attribute ${PREFIX}:${attribute}}.
 	 */
 	@Override
 	public OdfName getOdfName() {
@@ -152,7 +152,7 @@ public class $classname extends OdfAttri
 #if ($enum)
 
 	/**
-	 * The value set of {@odf.attribute ${attribute}}.
+	 * The value set of {@odf.attribute ${PREFIX}:${attribute}}.
 	 */
 	public enum Value {
 #set ($separator="		")
@@ -283,7 +283,7 @@ public class $classname extends OdfAttri
 		try {
 			return Value.enumValueOf(super.getValue()).toString();
 		} catch (NullPointerException e) {
-			throw new IllegalArgumentException("the value of ${attribute} is not valid");
+			throw new IllegalArgumentException("the value of ${PREFIX}:${attribute} is not valid");
 		}
 #end
 #else
@@ -291,14 +291,14 @@ public class $classname extends OdfAttri
 			return super.getValue();
 		} catch (IllegalArgumentException e) {
 			// TODO: validation handling/logging
-			throw new NumberFormatException("the value of ${attribute} is not valid");
+			throw new NumberFormatException("the value of ${PREFIX}:${attribute} is not valid");
 		}
 #end
 	}
 
 #if ($hasDefaultValue)
 	/**
-	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 * Returns the default value of {@odf.attribute ${PREFIX}:${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
@@ -326,7 +326,7 @@ public class $classname extends OdfAttri
 	/**
 	 * 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
+	 * @return <code>true</code> if {@odf.attribute ${PREFIX}:${attribute}} has
an element parent
 	 *         otherwise return <code>false</code> as undefined.
 	 */
 	@Override
@@ -335,7 +335,7 @@ public class $classname extends OdfAttri
 	}
 #else
 	/**
-	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 * Returns the default value of {@odf.attribute ${PREFIX}:${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
@@ -348,7 +348,7 @@ public class $classname extends OdfAttri
 	/**
 	 * 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
+	 * @return <code>true</code> if {@odf.attribute ${PREFIX}:${attribute}} has
an element parent
 	 *         otherwise return <code>false</code> as undefined.
 	 */
 	@Override

Modified: 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=1293100&r1=1293099&r2=1293100&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm
(original)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-dsig-element-template.vm
Fri Feb 24 06:45:25 2012
@@ -92,7 +92,7 @@ import ${baseimport};
 ## ---------------------------------------------------
 ##
 /**
- * Data signature implementation of OpenDocument element  {@odf.element ${context}}.
+ * DOM implementation of OpenDocument element  {@odf.element ${PREFIX}:${context}}.
  *
 #if ($anychild)
  * This class can have any org.w3c.dom.Element child element.
@@ -108,7 +108,7 @@ public class $classname extends $basecla
 	/**
 	 * Create the instance of <code>$classname</code>
 	 *
-	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 * @param  ownerDoc The type is <code>OdfFileDom</code>
 	 */
 	public $classname(OdfFileDom ownerDoc) {
 		super(ownerDoc, ELEMENT_NAME);
@@ -117,7 +117,7 @@ public class $classname extends $basecla
 	/**
 	 * Get the element name
 	 *
-	 * @return  return   <code>OdfName</code> the name of element {@odf.element
${context}}.
+	 * @return  return <code>OdfName</code> the name of element {@odf.element ${PREFIX}:${context}}.
 	 */
 	public OdfName getOdfName() {
 		return ELEMENT_NAME;
@@ -173,7 +173,7 @@ public class $classname extends $basecla
 #set ($aParam = "${signaturemodel.javaCase($attribute)}Value")
 
 	/**
-	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${attribute.getQName()}}
+	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${PREFIX}:${attribute.getQName()}}
 	 *
 #if (${element.isMandatory($attribute)})
 	 * Attribute is mandatory.
@@ -213,7 +213,7 @@ public class $classname extends $basecla
 	}
 
 	/**
-	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${attribute.getQName()}}
+	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${PREFIX}:${attribute.getQName()}}
 	 *
 	 * @param $aParam   The type is <code>$valueObject</code>
 	 */
@@ -249,7 +249,7 @@ public class $classname extends $basecla
 #end
 #if ($hasParams)
 	/**
-	 * Create child element {@odf.element ${child}}.
+	 * Create child element {@odf.element ds:${child}}.
 	 *
 #set ($seperateFlag="")
 #set ($params="")
@@ -292,7 +292,7 @@ public class $classname extends $basecla
 #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
+	 * @param $aParam  the <code>$ch_ValueObject</code> value of <code>$aClassname</code>,
see {@odf.attribute ${PREFIX}:${attribute.getQName()}} at specification
 #if ($ch_SimpleValue!="")
 #set ($params="${params}${seperateFlag}${ch_SimpleValue} ${aParam}")
 #else
@@ -312,7 +312,7 @@ public class $classname extends $basecla
 	 * Child element is mandatory.
 	 *
 #end
-	 * @return the element {@odf.element ${child}}
+	 * @return the element {@odf.element ds:${child}}
 	 */
 	 public $cClassname new${cClassname}($params) {
 		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
@@ -329,7 +329,7 @@ public class $classname extends $basecla
 
 #else
 	/**
-	 * Create child element {@odf.element ${child}}.
+	 * Create child element {@odf.element ds:${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
@@ -341,7 +341,7 @@ public class $classname extends $basecla
 	 * Child element is mandatory.
 	 *
 #end
-	 * @return the element {@odf.element ${child}}
+	 * @return the element {@odf.element ds:${child}}
 	 */
 	public $cClassname new${cClassname}() {
 		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);

Modified: 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=1293100&r1=1293099&r2=1293100&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm
(original)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-attribute-template.vm
Fri Feb 24 06:45:25 2012
@@ -103,7 +103,7 @@ import org.odftoolkit.odfdom.pkg.${paren
 #end
 #end
 /**
- * Manifest implementation of OpenDocument attribute  {@odf.attribute ${attribute.getQName()}}.
+ * Manifest implementation of OpenDocument attribute  {@odf.attribute manifest:${attribute.getQName()}}.
  *
  */
 public class $classname extends OdfAttribute {
@@ -129,7 +129,7 @@ public class $classname extends OdfAttri
 #end
 
 	/**
-	 * Create the instance of OpenDocument attribute {@odf.attribute ${attribute}}.
+	 * Create the instance of OpenDocument attribute {@odf.attribute manifest:${attribute}}.
 	 *
 	 * @param ownerDocument       The type is <code>OdfFileDom</code>
 	 */
@@ -140,7 +140,7 @@ public class $classname extends OdfAttri
 	/**
 	 * Returns the attribute name.
 	 *
-	 * @return the <code>OdfName</code> for {@odf.attribute ${attribute}}.
+	 * @return the <code>OdfName</code> for {@odf.attribute manifest:${attribute}}.
 	 */
 	@Override
 	public OdfName getOdfName() {
@@ -158,7 +158,7 @@ public class $classname extends OdfAttri
 #if ($enum)
 
 	/**
-	 * The value set of {@odf.attribute ${attribute}}.
+	 * The value set of {@odf.attribute manifest:${attribute}}.
 	 */
 	public enum Value {
 #set ($separator="		")
@@ -304,7 +304,7 @@ public class $classname extends OdfAttri
 
 #if ($hasDefaultValue)
 	/**
-	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 * Returns the default value of {@odf.attribute manifest:${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
@@ -332,7 +332,7 @@ public class $classname extends OdfAttri
 	/**
 	 * 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
+	 * @return <code>true</code> if {@odf.attribute manifest:${attribute}} has an
element parent
 	 *         otherwise return <code>false</code> as undefined.
 	 */
 	@Override
@@ -341,7 +341,7 @@ public class $classname extends OdfAttri
 	}
 #else
 	/**
-	 * Returns the default value of {@odf.attribute ${attribute}}.
+	 * Returns the default value of {@odf.attribute manifest:${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
@@ -354,7 +354,7 @@ public class $classname extends OdfAttri
 	/**
 	 * 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
+	 * @return <code>true</code> if {@odf.attribute manifest:${attribute}} has an
element parent
 	 *         otherwise return <code>false</code> as undefined.
 	 */
 	@Override

Modified: 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=1293100&r1=1293099&r2=1293100&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm
(original)
+++ incubator/odf/trunk/odfdom/src/codegen/resources/pkg/template/odfdom-manifest-element-template.vm
Fri Feb 24 06:45:25 2012
@@ -66,7 +66,7 @@ import org.odftoolkit.odfdom.pkg.OdfName
 ## ---------------------------------------------------
 ##
 /**
- * Manifest implementation of OpenDocument element  {@odf.element ${context}}.
+ * Manifest implementation of OpenDocument element  {@odf.element manifest:${context}}.
  *
 #if ($anychild)
  * This class can have any org.w3c.dom.Element child element.
@@ -82,7 +82,7 @@ public class $classname extends $basecla
 	/**
 	 * Create the instance of <code>$classname</code>
 	 *
-	 * @param  ownerDoc     The type is <code>OdfFileDom</code>
+	 * @param  ownerDoc  The type is <code>OdfFileDom</code>
 	 */
 	public $classname(OdfFileDom ownerDoc) {
 		super(ownerDoc, ELEMENT_NAME);
@@ -91,7 +91,7 @@ public class $classname extends $basecla
 	/**
 	 * Get the element name
 	 *
-	 * @return  return   <code>OdfName</code> the name of element {@odf.element
${context}}.
+	 * @return  return   <code>OdfName</code> the name of element {@odf.element
manifest:${context}}.
 	 */
 	public OdfName getOdfName() {
 		return ELEMENT_NAME;
@@ -147,7 +147,7 @@ public class $classname extends $basecla
 #set ($aParam = "${manifestmodel.javaCase($attribute)}Value")
 
 	/**
-	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${attribute.getQName()}}
+	 * Receives the value of the ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute manifest:${attribute.getQName()}}
 	 *
 #if (${element.isMandatory($attribute)})
 	 * Attribute is mandatory.
@@ -187,7 +187,7 @@ public class $classname extends $basecla
 	}
 
 	/**
-	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute ${attribute.getQName()}}
+	 * Sets the value of ODFDOM attribute representation <code>$aClassname</code>
, See {@odf.attribute manifest:${attribute.getQName()}}
 	 *
 	 * @param $aParam   The type is <code>$valueObject</code>
 	 */
@@ -223,7 +223,7 @@ public class $classname extends $basecla
 #end
 #if ($hasParams)
 	/**
-	 * Create child element {@odf.element ${child}}.
+	 * Create child element {@odf.element manifest:${child}}.
 	 *
 #set ($seperateFlag="")
 #set ($params="")
@@ -266,7 +266,7 @@ public class $classname extends $basecla
 #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
+	 * @param $aParam  the <code>$ch_ValueObject</code> value of <code>$aClassname</code>,
see {@odf.attribute  manifest:${attribute.getQName()}} at specification
 #if ($ch_SimpleValue!="")
 #set ($params="${params}${seperateFlag}${ch_SimpleValue} ${aParam}")
 #else
@@ -286,7 +286,7 @@ public class $classname extends $basecla
 	 * Child element is mandatory.
 	 *
 #end
-	 * @return the element {@odf.element ${child}}
+	 * @return the element {@odf.element manifest:${child}}
 	 */
 	 public $cClassname new${cClassname}($params) {
 		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);
@@ -303,7 +303,7 @@ public class $classname extends $basecla
 
 #else
 	/**
-	 * Create child element {@odf.element ${child}}.
+	 * Create child element {@odf.element manifest:${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
@@ -315,7 +315,7 @@ public class $classname extends $basecla
 	 * Child element is mandatory.
 	 *
 #end
-	 * @return the element {@odf.element ${child}}
+	 * @return the element {@odf.element manifest:${child}}
 	 */
 	public $cClassname new${cClassname}() {
 		$cClassname $cVar = ((OdfFileDom) this.ownerDocument).newOdfElement(${cClassname}.class);



Mime
View raw message