/*
 * Copyright (c) 2005 Absolutely Training Limited
 *  
 * Created on 07-Feb-2005
 *
 * @author roberto, fritzd
 */

 //init
 new Validator();

 // constructor
 function Validator(){
	this.ITERATION_RESULT_LIST=0;
	this.LEARNER_RESPONSE_LIST=1;
	this.LEARNER_PREFERENCE_AUDIO_CAPTIONING_LIST=2;
	this.OBJECTIVE_SUCCESS_STATUS_LIST=3;
	this.OBJECTIVE_COMPLETION_STATUS_LIST=4;
	this.EXIT_STATUS_LIST=5;
	this.INTERACTION_TYPE_LIST=6;
	this.ATTEMPT_COMPLETION_STATUS_LIST=7;
	this.NAVIGATION_REQUEST_LIST=8;
	this.aReal = 0.0;
	this.interactionResults = new Array("correct", "incorrect", "unanticipated", "neutral");	 
	this.learnerResponse = new Array("true_false", "multiple_choice", "fill_in", "long_fill_in", "likert", "matching", "performance", "sequencing", "numeric", "other");
	this.leranerPreferenceAudioCaptioning = new Array("-1", "0", "1");
	this.exitStatus = new Array("time-out", "suspend", "logout", "normal", "");
	this.objectiveSuccesssStatus = new Array("passed", "failed", "unknown");
	this.objectiveCompletionStatus = new Array("completed", "incomplete", "not_attempted", "unknown");
	this.interactionType = new Array("true-false", "choice", "fill", "long-fill-in", "likert", "matching", "performance", "sequencing", "numeric", "other");	 
	this.AttemptCompletionStatus  =new Array("completed", "incomplete", "not attempted", "unknown");
	this.navigationRequest = new Array("continue", "previous", "choice", "exit", "exitAll","abandon","abandonAll","_none_");
	this.states = new Array(this.interactionResults, this.learnerResponse, 
						 this.leranerPreferenceAudioCaptioning, this.objectiveSuccesssStatus, 
						 this.objectiveCompletionStatus, this.exitStatus, this.interactionType,
						 this.AttemptCompletionStatus, this.navigationRequest);  
 };
	
Validator.prototype.validateResponseFormat = function (interactionsType, learnerResponse) {
	return true;
};

Validator.prototype.listContainsState = function (index, state) {
	for (i = 0; i < this.states[index].length; i++){
		if (this.states[index][i] == state){
			return true;
		}
	}
	return false;
};

Validator.prototype.validateLocale = function(language) {
	// TODO Auto-generated method stub
	return true;
};

Validator.prototype.validateTimeIntervalFormat = function(latency) {
	// TODO Auto-generated method stub
	return true;
};

Validator.prototype.validateLocalisedString = function (description) {
	// TODO Auto-generated method stub
	return true;
};

Validator.prototype.validateRange = function (scaled, string, string2) {
	// TODO Auto-generated method stub
	return true;
};

Validator.prototype.validateLongIdentifierType = function (id) {
	// TODO Auto-generated method stub
	return true;
};
 
Validator.prototype.validateTimeFormat = function(timestamp) {
	return true;
};

Validator.prototype.addTimeIntervals = function (time1, time2) {
};

Validator.prototype.validateReal = function (real) {
	return true;
};

Validator.prototype.validatePattern = function (pattern) {
	return true;
};

Validator.prototype.isReal = function (value) {
	return true;
};
