/**
 * Copyright 2009 The Australian National University (ANU)
 *
 * Licensed 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.
 */
package org.ands.rifcs.base;

import java.util.Date;

import org.w3c.dom.Node;

/**
 * Class representing a RIF-CS description object.
 *
 * @author Scott Yeadon
 *
 */
public class CommonDateElement extends RIFCSElement {
    /**
     * Construct a CommonDateElement object.
     *
     * @param n
     *        A w3c Node, typically an Element
     *
     * @throws RIFCSException A RIFCSException
     */
    protected CommonDateElement(final Node n) throws RIFCSException {
        super(n, n.getNodeName());
    }


        /**
     * Set the type.
     *
     * @param type
     *          The type of date
     */
    public final void setDateFormat(final String type) {
        super.setAttributeValue(Constants.ATTRIBUTE_DATE_FORMAT, type);
    }


    /**
     * return the type.
     *
     * @return
     *      The type attribute value or empty string if attribute
     *      is empty or not present
     */
    public final String getDateFormat() {
        return super.getAttributeValue(Constants.ATTRIBUTE_DATE_FORMAT);
    }


    /**
     * Set the content.
     *
     * @param value
     *      The content of the date
     */
    public final void setValue(final String value) {
        super.setTextContent(value);
    }


    /**
     * Set the content.
     *
     * @param value
     *      The content of the date
     */
    public final void setValue(final Date value) {
        super.setTextContent(RegistryObject.formatDate(value));
    }


    /**
     * Obtain the content.
     *
     * @return
     *      The description string
     */
    public final String getValue() {
        return super.getTextContent();
    }
}

@@ -738,25 +738,50 @@
 CS d
-escription object
+ate object that has a dateFormat attribute
 .%0A *
@@ -1187,27 +1187,43 @@
   * Set the 
-typ
+dateFormat attribut
 e.%0A     *%0A  
@@ -1234,20 +1234,26 @@
  @param 
-type
+dateFormat
 %0A     * 
@@ -1269,15 +1269,25 @@
 The 
-type of
+dateFormat of the
  dat
@@ -1345,20 +1345,26 @@
  String 
-type
+dateFormat
 ) %7B%0A    
@@ -1424,20 +1424,26 @@
 FORMAT, 
-type
+dateFormat
 );%0A    %7D
@@ -1471,19 +1471,48 @@
 urn the 
-typ
+value of the dateFormat attribut
 e.%0A     
@@ -1548,12 +1548,18 @@
 The 
-type
+dateFormat
  att

Fix commenting in CommonDateElement