/*
 * Copyright (c) 2005 Absolutely Training Limited
 *  
 * Created on 07-Feb-2005
 */

 // constructor
 

 function Comment(type){
	this.comment=null;
	this.location=null;
	this.timestamp=null;
        this.propertiesArray = new Array("comment", "location", "timestamp");
	this.type=type;

        this.validator=new Validator();
	this._children="comment,location,timestamp";
 }
 
new Comment();
Comment.prototype = new RTEDataObject();
Comment.prototype.constructor = Comment;



    /**
     * @param comment The comment to set.
     * @throws ScormRteDmodelException
     */
    Comment.prototype.setComment= function(comment) {
	    if (this.validator.validateLocalisedString(comment)){
	   	    this.comment = comment;
		    return VariableInfo.NO_SET_ERROR;
	    }
	    return VariableInfo.ERROR_406;

    };


    /**
     * @param location The location to set.
     */
    Comment.prototype.setLocation= function(location) {
        this.location = location;
		return VariableInfo.NO_SET_ERROR;
    };

    /**
     * @param timestamp The timestamp to set.
     */
    Comment.prototype.setTimestamp= function(timestamp) {
	    if (this.validator.validateTimeFormat(timestamp)){
	        this.timestamp = timestamp;
			return VariableInfo.NO_SET_ERROR;
		   
	    }
		 return VariableInfo.ERROR_406;
    };
    
 
 
 
 
