Added: airavata/sandbox/gsoc2013/js/vendor/tv4.js
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/js/vendor/tv4.js?rev=1505156&view=auto
==============================================================================
--- airavata/sandbox/gsoc2013/js/vendor/tv4.js (added)
+++ airavata/sandbox/gsoc2013/js/vendor/tv4.js Sat Jul 20 15:58:00 2013
@@ -0,0 +1,767 @@
+/**
+Author: Geraint Luff and others
+Year: 2013
+
+This code is released into the "public domain" by its author(s).  Anybody may 
use, alter and distribute the code without restriction.  The author makes no 
guarantees, and takes no liability of any kind for use of this code.
+
+If you find a bug or make an improvement, it would be courteous to let the 
author know, but it is not compulsory.
+**/
+
+(function (global) {
+var ValidatorContext = function (parent, collectMultiple) {
+       this.missing = [];
+       this.schemas = parent ? Object.create(parent.schemas) : {};
+       this.collectMultiple = collectMultiple;
+       this.errors = [];
+       this.handleError = collectMultiple ? this.collectError : 
this.returnError;
+};
+ValidatorContext.prototype.returnError = function (error) {
+       return error;
+};
+ValidatorContext.prototype.collectError = function (error) {
+       if (error) {
+               this.errors.push(error);
+       }
+       return null;
+}
+ValidatorContext.prototype.prefixErrors = function (startIndex, dataPath, 
schemaPath) {
+       for (var i = startIndex; i < this.errors.length; i++) {
+               this.errors[i] = this.errors[i].prefixWith(dataPath, 
schemaPath);
+       }
+       return this;
+}
+
+ValidatorContext.prototype.getSchema = function (url) {
+       if (this.schemas[url] != undefined) {
+               var schema = this.schemas[url];
+               return schema;
+       }
+       var baseUrl = url;
+       var fragment = "";
+       if (url.indexOf('#') != -1) {
+               fragment = url.substring(url.indexOf("#") + 1);
+               baseUrl = url.substring(0, url.indexOf("#"));
+       }
+       if (this.schemas[baseUrl] != undefined) {
+               var schema = this.schemas[baseUrl];
+               var pointerPath = decodeURIComponent(fragment);
+               if (pointerPath == "") {
+                       return schema;
+               } else if (pointerPath.charAt(0) != "/") {
+                       return undefined;
+               }
+               var parts = pointerPath.split("/").slice(1);
+               for (var i = 0; i < parts.length; i++) {
+                       var component = parts[i].replace("~1", 
"/").replace("~0", "~");
+                       if (schema[component] == undefined) {
+                               schema = undefined;
+                               break;
+                       }
+                       schema = schema[component];
+               }
+               if (schema != undefined) {
+                       return schema;
+               }
+       }
+       if (this.missing[baseUrl] == undefined) {
+               this.missing.push(baseUrl);
+               this.missing[baseUrl] = baseUrl;
+       }
+};
+ValidatorContext.prototype.addSchema = function (url, schema) {
+       var map = {};
+       map[url] = schema;
+       normSchema(schema, url);
+       searchForTrustedSchemas(map, schema, url);
+       for (var key in map) {
+               this.schemas[key] = map[key];
+       }
+       return map;
+};
+       
+ValidatorContext.prototype.validateAll = function validateAll(data, schema, 
dataPathParts, schemaPathParts) {
+       if (schema['$ref'] != undefined) {
+               schema = this.getSchema(schema['$ref']);
+               if (!schema) {
+                       return null;
+               }
+       }
+       
+       var errorCount = this.errors.length;
+       var error = this.validateBasic(data, schema)
+               || this.validateNumeric(data, schema)
+               || this.validateString(data, schema)
+               || this.validateArray(data, schema)
+               || this.validateObject(data, schema)
+               || this.validateCombinations(data, schema)
+               || null
+       if (error || errorCount != this.errors.length) {
+               while ((dataPathParts && dataPathParts.length) || 
(schemaPathParts && schemaPathParts.length)) {
+                       var dataPart = (dataPathParts && dataPathParts.length) 
? "" + dataPathParts.pop() : null;
+                       var schemaPart = (schemaPathParts && 
schemaPathParts.length) ? "" + schemaPathParts.pop() : null;
+                       if (error) {
+                               error = error.prefixWith(dataPart, schemaPart);
+                       }
+                       this.prefixErrors(errorCount, dataPart, schemaPart);
+               }
+       }
+               
+       return this.handleError(error);
+}
+
+function recursiveCompare(A, B) {
+       if (A === B) {
+               return true;
+       }
+       if (typeof A == "object" && typeof B == "object") {
+               if (Array.isArray(A) != Array.isArray(B)) {
+                       return false;
+               } else if (Array.isArray(A)) {
+                       if (A.length != B.length) {
+                               return false
+                       }
+                       for (var i = 0; i < A.length; i++) {
+                               if (!recursiveCompare(A[i], B[i])) {
+                                       return false;
+                               }
+                       }
+               } else {
+                       for (var key in A) {
+                               if (B[key] === undefined && A[key] !== 
undefined) {
+                                       return false;
+                               }
+                       }
+                       for (var key in B) {
+                               if (A[key] === undefined && B[key] !== 
undefined) {
+                                       return false;
+                               }
+                       }
+                       for (var key in A) {
+                               if (!recursiveCompare(A[key], B[key])) {
+                                       return false;
+                               }
+                       }
+               }
+               return true;
+       }
+       return false;
+}
+
+ValidatorContext.prototype.validateBasic = function validateBasic(data, 
schema) {
+       var error;
+       if (error = this.validateType(data, schema)) {
+               return error.prefixWith(null, "type");
+       }
+       if (error = this.validateEnum(data, schema)) {
+               return error.prefixWith(null, "type");
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateType = function validateType(data, schema) {
+       if (schema.type == undefined) {
+               return null;
+       }
+       var dataType = typeof data;
+       if (data == null) {
+               dataType = "null";
+       } else if (Array.isArray(data)) {
+               dataType = "array";
+       }
+       var allowedTypes = schema.type;
+       if (typeof allowedTypes != "object") {
+               allowedTypes = [allowedTypes];
+       }
+       
+       for (var i = 0; i < allowedTypes.length; i++) {
+               var type = allowedTypes[i];
+               if (type == dataType || (type == "integer" && dataType == 
"number" && (data%1 == 0))) {
+                       return null;
+               }
+       }
+       return new ValidationError(ErrorCodes.INVALID_TYPE, "invalid data type: 
" + dataType);
+}
+
+ValidatorContext.prototype.validateEnum = function validateEnum(data, schema) {
+       if (schema["enum"] == undefined) {
+               return null;
+       }
+       for (var i = 0; i < schema["enum"].length; i++) {
+               var enumVal = schema["enum"][i];
+               if (recursiveCompare(data, enumVal)) {
+                       return null;
+               }
+       }
+       return new ValidationError(ErrorCodes.ENUM_MISMATCH, "No enum match 
for: " + JSON.stringify(data));
+}
+ValidatorContext.prototype.validateNumeric = function validateNumeric(data, 
schema) {
+       return this.validateMultipleOf(data, schema)
+               || this.validateMinMax(data, schema)
+               || null;
+}
+
+ValidatorContext.prototype.validateMultipleOf = function 
validateMultipleOf(data, schema) {
+       var multipleOf = schema.multipleOf || schema.divisibleBy;
+       if (multipleOf == undefined) {
+               return null;
+       }
+       if (typeof data == "number") {
+               if (data%multipleOf != 0) {
+                       return new 
ValidationError(ErrorCodes.NUMBER_MULTIPLE_OF, "Value " + data + " is not a 
multiple of " + multipleOf);
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateMinMax = function validateMinMax(data, 
schema) {
+       if (typeof data != "number") {
+               return null;
+       }
+       if (schema.minimum != undefined) {
+               if (data < schema.minimum) {
+                       return new ValidationError(ErrorCodes.NUMBER_MINIMUM, 
"Value " + data + " is less than minimum " + schema.minimum).prefixWith(null, 
"minimum");
+               }
+               if (schema.exclusiveMinimum && data == schema.minimum) {
+                       return new 
ValidationError(ErrorCodes.NUMBER_MINIMUM_EXCLUSIVE, "Value "+ data + " is 
equal to exclusive minimum " + schema.minimum).prefixWith(null, 
"exclusiveMinimum");
+               }
+       }
+       if (schema.maximum != undefined) {
+               if (data > schema.maximum) {
+                       return new ValidationError(ErrorCodes.NUMBER_MAXIMUM, 
"Value " + data + " is greater than maximum " + 
schema.maximum).prefixWith(null, "maximum");
+               }
+               if (schema.exclusiveMaximum && data == schema.maximum) {
+                       return new 
ValidationError(ErrorCodes.NUMBER_MAXIMUM_EXCLUSIVE, "Value "+ data + " is 
equal to exclusive maximum " + schema.maximum).prefixWith(null, 
"exclusiveMaximum");
+               }
+       }
+       return null;
+}
+ValidatorContext.prototype.validateString = function validateString(data, 
schema) {
+       return this.validateStringLength(data, schema)
+               || this.validateStringPattern(data, schema)
+               || null;
+}
+
+ValidatorContext.prototype.validateStringLength = function 
validateStringLength(data, schema) {
+       if (typeof data != "string") {
+               return null;
+       }
+       if (schema.minLength != undefined) {
+               if (data.length < schema.minLength) {
+                       return new 
ValidationError(ErrorCodes.STRING_LENGTH_SHORT, "String is too short (" + 
data.length + " chars), minimum " + schema.minLength).prefixWith(null, 
"minLength");
+               }
+       }
+       if (schema.maxLength != undefined) {
+               if (data.length > schema.maxLength) {
+                       return new 
ValidationError(ErrorCodes.STRING_LENGTH_LONG, "String is too long (" + 
data.length + " chars), maximum " + schema.maxLength).prefixWith(null, 
"maxLength");
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateStringPattern = function 
validateStringPattern(data, schema) {
+       if (typeof data != "string" || schema.pattern == undefined) {
+               return null;
+       }
+       var regexp = new RegExp(schema.pattern);
+       if (!regexp.test(data)) {
+               return new ValidationError(ErrorCodes.STRING_PATTERN, "String 
does not match pattern").prefixWith(null, "pattern");
+       }
+       return null;
+}
+ValidatorContext.prototype.validateArray = function validateArray(data, 
schema) {
+       if (!Array.isArray(data)) {
+               return null;
+       }
+       return this.validateArrayLength(data, schema)
+               || this.validateArrayUniqueItems(data, schema)
+               || this.validateArrayItems(data, schema)
+               || null;
+}
+
+ValidatorContext.prototype.validateArrayLength = function 
validateArrayLength(data, schema) {
+       if (schema.minItems != undefined) {
+               if (data.length < schema.minItems) {
+                       var error = (new 
ValidationError(ErrorCodes.ARRAY_LENGTH_SHORT, "Array is too short (" + 
data.length + "), minimum " + schema.minItems)).prefixWith(null, "minItems");
+                       if (this.handleError(error)) {
+                               return error;
+                       }
+               }
+       }
+       if (schema.maxItems != undefined) {
+               if (data.length > schema.maxItems) {
+                       var error = (new 
ValidationError(ErrorCodes.ARRAY_LENGTH_LONG, "Array is too long (" + 
data.length + " chars), maximum " + schema.maxItems)).prefixWith(null, 
"maxItems");
+                       if (this.handleError(error)) {
+                               return error;
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateArrayUniqueItems = function 
validateArrayUniqueItems(data, schema) {
+       if (schema.uniqueItems) {
+               for (var i = 0; i < data.length; i++) {
+                       for (var j = i + 1; j < data.length; j++) {
+                               if (recursiveCompare(data[i], data[j])) {
+                                       var error = (new 
ValidationError(ErrorCodes.ARRAY_UNIQUE, "Array items are not unique (indices " 
+ i + " and " + j + ")")).prefixWith(null, "uniqueItems");
+                                       if (this.handleError(error)) {
+                                               return error;
+                                       }
+                               }
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateArrayItems = function 
validateArrayItems(data, schema) {
+       if (schema.items == undefined) {
+               return null;
+       }
+       var error;
+       if (Array.isArray(schema.items)) {
+               for (var i = 0; i < data.length; i++) {
+                       if (i < schema.items.length) {
+                               if (error = this.validateAll(data[i], 
schema.items[i], [i], ["items", i])) {
+                                       return error;
+                               }
+                       } else if (schema.additionalItems != undefined) {
+                               if (typeof schema.additionalItems == "boolean") 
{
+                                       if (!schema.additionalItems) {
+                                               error = (new 
ValidationError(ErrorCodes.ARRAY_ADDITIONAL_ITEMS, "Additional items not 
allowed")).prefixWith("" + i, "additionalItems");
+                                               if (this.handleError(error)) {
+                                                       return error;
+                                               }
+                                       }
+                               } else if (error = this.validateAll(data[i], 
schema.additionalItems, [i], ["additionalItems"])) {
+                                       return error;
+                               }
+                       }
+               }
+       } else {
+               for (var i = 0; i < data.length; i++) {
+                       if (error = this.validateAll(data[i], schema.items, 
[i], ["items"])) {
+                               return error;
+                       }
+               }
+       }
+       return null;
+}
+ValidatorContext.prototype.validateObject = function validateObject(data, 
schema) {
+       if (typeof data != "object" || data == null || Array.isArray(data)) {
+               return null;
+       }
+       return this.validateObjectMinMaxProperties(data, schema)
+               || this.validateObjectRequiredProperties(data, schema)
+               || this.validateObjectProperties(data, schema)
+               || this.validateObjectDependencies(data, schema)
+               || null;
+}
+
+ValidatorContext.prototype.validateObjectMinMaxProperties = function 
validateObjectMinMaxProperties(data, schema) {
+       var keys = Object.keys(data);
+       if (schema.minProperties != undefined) {
+               if (keys.length < schema.minProperties) {
+                       var error = new 
ValidationError(ErrorCodes.OBJECT_PROPERTIES_MINIMUM, "Too few properties 
defined (" + keys.length + "), minimum " + 
schema.minProperties).prefixWith(null, "minProperties");
+                       if (this.handleError(error)) {
+                               return error;
+                       }
+               }
+       }
+       if (schema.maxProperties != undefined) {
+               if (keys.length > schema.maxProperties) {
+                       var error = new 
ValidationError(ErrorCodes.OBJECT_PROPERTIES_MAXIMUM, "Too many properties 
defined (" + keys.length + "), maximum " + 
schema.maxProperties).prefixWith(null, "maxProperties");
+                       if (this.handleError(error)) {
+                               return error;
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateObjectRequiredProperties = function 
validateObjectRequiredProperties(data, schema) {
+       if (schema.required != undefined) {
+               for (var i = 0; i < schema.required.length; i++) {
+                       var key = schema.required[i];
+                       if (data[key] === undefined) {
+                               var error = new 
ValidationError(ErrorCodes.OBJECT_REQUIRED, "Missing required property: " + 
key).prefixWith(null, "" + i).prefixWith(null, "required");
+                               if (this.handleError(error)) {
+                                       return error;
+                               }
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateObjectProperties = function 
validateObjectProperties(data, schema) {
+       var error;
+       for (var key in data) {
+               var foundMatch = false;
+               if (schema.properties != undefined && schema.properties[key] != 
undefined) {
+                       foundMatch = true;
+                       if (error = this.validateAll(data[key], 
schema.properties[key], [key], ["properties", key])) {
+                               return error;
+                       }
+               }
+               if (schema.patternProperties != undefined) {
+                       for (var patternKey in schema.patternProperties) {
+                               var regexp = new RegExp(patternKey);
+                               if (regexp.test(key)) {
+                                       foundMatch = true;
+                                       if (error = this.validateAll(data[key], 
schema.patternProperties[patternKey], [key], ["patternProperties", 
patternKey])) {
+                                               return error;
+                                       }
+                               }
+                       }
+               }
+               if (!foundMatch && schema.additionalProperties != undefined) {
+                       if (typeof schema.additionalProperties == "boolean") {
+                               if (!schema.additionalProperties) {
+                                       error = new 
ValidationError(ErrorCodes.OBJECT_ADDITIONAL_PROPERTIES, "Additional properties 
not allowed").prefixWith(key, "additionalProperties");
+                                       if (this.handleError(error)) {
+                                               return error;
+                                       }
+                               }
+                       } else {
+                               if (error = this.validateAll(data[key], 
schema.additionalProperties, [key], ["additionalProperties"])) {
+                                       return error;
+                               }
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateObjectDependencies = function 
validateObjectDependencies(data, schema) {
+       var error;
+       if (schema.dependencies != undefined) {
+               for (var depKey in schema.dependencies) {
+                       if (data[depKey] !== undefined) {
+                               var dep = schema.dependencies[depKey];
+                               if (typeof dep == "string") {
+                                       if (data[dep] === undefined) {
+                                               error = new 
ValidationError(ErrorCodes.OBJECT_DEPENDENCY_KEY, "Dependency failed - key must 
exist: " + dep).prefixWith(null, depKey).prefixWith(null, "dependencies");
+                                               if (this.handleError(error)) {
+                                                       return error;
+                                               }
+                                       }
+                               } else if (Array.isArray(dep)) {
+                                       for (var i = 0; i < dep.length; i++) {
+                                               var requiredKey = dep[i];
+                                               if (data[requiredKey] === 
undefined) {
+                                                       error = new 
ValidationError(ErrorCodes.OBJECT_DEPENDENCY_KEY, "Dependency failed - key must 
exist: " + requiredKey).prefixWith(null, "" + i).prefixWith(null, 
depKey).prefixWith(null, "dependencies");
+                                                       if 
(this.handleError(error)) {
+                                                               return error;
+                                                       }
+                                               }
+                                       }
+                               } else {
+                                       if (error = this.validateAll(data, dep, 
[], ["dependencies", depKey])) {
+                                               return error;
+                                       }
+                               }
+                       }
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateCombinations = function 
validateCombinations(data, schema) {
+       var error;
+       return this.validateAllOf(data, schema)
+               || this.validateAnyOf(data, schema)
+               || this.validateOneOf(data, schema)
+               || this.validateNot(data, schema)
+               || null;
+}
+
+ValidatorContext.prototype.validateAllOf = function validateAllOf(data, 
schema) {
+       if (schema.allOf == undefined) {
+               return null;
+       }
+       var error;
+       for (var i = 0; i < schema.allOf.length; i++) {
+               var subSchema = schema.allOf[i];
+               if (error = this.validateAll(data, subSchema, [], ["allOf", 
i])) {
+                       return error;
+               }
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateAnyOf = function validateAnyOf(data, 
schema) {
+       if (schema.anyOf == undefined) {
+               return null;
+       }
+       var errors = [];
+       var startErrorCount = this.errors.length;
+       for (var i = 0; i < schema.anyOf.length; i++) {
+               var subSchema = schema.anyOf[i];
+
+               var errorCount = this.errors.length;
+               var error = this.validateAll(data, subSchema, [], ["anyOf", i]);
+
+               if (error == null && errorCount == this.errors.length) {
+                       this.errors = this.errors.slice(0, startErrorCount);
+                       return null;
+               }
+               if (error) {
+                       errors.push(error.prefixWith(null, "" + 
i).prefixWith(null, "anyOf"));
+               }
+       }
+       errors = errors.concat(this.errors.slice(startErrorCount));
+       this.errors = this.errors.slice(0, startErrorCount);
+       return new ValidationError(ErrorCodes.ANY_OF_MISSING, "Data does not 
match any schemas from \"anyOf\"", "", "/anyOf", errors);
+}
+
+ValidatorContext.prototype.validateOneOf = function validateOneOf(data, 
schema) {
+       if (schema.oneOf == undefined) {
+               return null;
+       }
+       var validIndex = null;
+       var errors = [];
+       var startErrorCount = this.errors.length;
+       for (var i = 0; i < schema.oneOf.length; i++) {
+               var subSchema = schema.oneOf[i];
+               
+               var errorCount = this.errors.length;
+               var error = this.validateAll(data, subSchema, [], ["oneOf", i]);
+               
+               if (error == null && errorCount == this.errors.length) {
+                       if (validIndex == null) {
+                               validIndex = i;
+                       } else {
+                               this.errors = this.errors.slice(0, 
startErrorCount);
+                               return new 
ValidationError(ErrorCodes.ONE_OF_MULTIPLE, "Data is valid against more than 
one schema from \"oneOf\": indices " + validIndex + " and " + i, "", "/oneOf");
+                       }
+               } else if (error) {
+                       errors.push(error.prefixWith(null, "" + 
i).prefixWith(null, "oneOf"));
+               }
+       }
+       if (validIndex == null) {
+               errors = errors.concat(this.errors.slice(startErrorCount));
+               this.errors = this.errors.slice(0, startErrorCount);
+               return new ValidationError(ErrorCodes.ONE_OF_MISSING, "Data 
does not match any schemas from \"oneOf\"", "", "/oneOf", errors);
+       } else {
+               this.errors = this.errors.slice(0, startErrorCount);
+       }
+       return null;
+}
+
+ValidatorContext.prototype.validateNot = function validateNot(data, schema) {
+       if (schema.not == undefined) {
+               return null;
+       }
+       var oldErrorCount = this.errors.length;
+       var error = this.validateAll(data, schema.not);
+       var notErrors = this.errors.slice(oldErrorCount);
+       this.errors = this.errors.slice(0, oldErrorCount);
+       if (error == null && notErrors.length == 0) {
+               return new ValidationError(ErrorCodes.NOT_PASSED, "Data matches 
schema from \"not\"", "", "/not")
+       }
+       return null;
+}
+
+// parseURI() and resolveUrl() are from https://gist.github.com/1088850
+//   -  released as public domain by author ("Yaffle") - see comments on gist
+
+function parseURI(url) {
+       var m = String(url).replace(/^\s+|\s+$/g, 
'').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
+       // authority = '//' + user + ':' + pass '@' + hostname + ':' port
+       return (m ? {
+               href     : m[0] || '',
+               protocol : m[1] || '',
+               authority: m[2] || '',
+               host     : m[3] || '',
+               hostname : m[4] || '',
+               port     : m[5] || '',
+               pathname : m[6] || '',
+               search   : m[7] || '',
+               hash     : m[8] || ''
+       } : null);
+}
+
+function resolveUrl(base, href) {// RFC 3986
+
+       function removeDotSegments(input) {
+               var output = [];
+               input.replace(/^(\.\.?(\/|$))+/, '')
+                       .replace(/\/(\.(\/|$))+/g, '/')
+                       .replace(/\/\.\.$/, '/../')
+                       .replace(/\/?[^\/]*/g, function (p) {
+                               if (p === '/..') {
+                                       output.pop();
+                               } else {
+                                       output.push(p);
+                               }
+               });
+               return output.join('').replace(/^\//, input.charAt(0) === '/' ? 
'/' : '');
+       }
+
+       href = parseURI(href || '');
+       base = parseURI(base || '');
+
+       return !href || !base ? null : (href.protocol || base.protocol) +
+               (href.protocol || href.authority ? href.authority : 
base.authority) +
+               removeDotSegments(href.protocol || href.authority || 
href.pathname.charAt(0) === '/' ? href.pathname : (href.pathname ? 
((base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, 
base.pathname.lastIndexOf('/') + 1) + href.pathname) : base.pathname)) +
+               (href.protocol || href.authority || href.pathname ? href.search 
: (href.search || base.search)) +
+               href.hash;
+}
+
+function normSchema(schema, baseUri) {
+       if (baseUri == undefined) {
+               baseUri = schema.id;
+       } else if (typeof schema.id == "string") {
+               baseUri = resolveUrl(baseUri, schema.id);
+               schema.id = baseUri;
+       }
+       if (typeof schema == "object") {
+               if (Array.isArray(schema)) {
+                       for (var i = 0; i < schema.length; i++) {
+                               normSchema(schema[i], baseUri);
+                       }
+               } else if (typeof schema['$ref'] == "string") {
+                       schema['$ref'] = resolveUrl(baseUri, schema['$ref']);
+               } else {
+                       for (var key in schema) {
+                               if (key != "enum") {
+                                       normSchema(schema[key], baseUri);
+                               }
+                       }
+               }
+       }
+}
+
+var ErrorCodes = {
+       INVALID_TYPE: 0,
+       ENUM_MISMATCH: 1,
+       ANY_OF_MISSING: 10,
+       ONE_OF_MISSING: 11,
+       ONE_OF_MULTIPLE: 12,
+       NOT_PASSED: 13,
+       // Numeric errors
+       NUMBER_MULTIPLE_OF: 100,
+       NUMBER_MINIMUM: 101,
+       NUMBER_MINIMUM_EXCLUSIVE: 102,
+       NUMBER_MAXIMUM: 103,
+       NUMBER_MAXIMUM_EXCLUSIVE: 104,
+       // String errors
+       STRING_LENGTH_SHORT: 200,
+       STRING_LENGTH_LONG: 201,
+       STRING_PATTERN: 202,
+       // Object errors
+       OBJECT_PROPERTIES_MINIMUM: 300,
+       OBJECT_PROPERTIES_MAXIMUM: 301,
+       OBJECT_REQUIRED: 302,
+       OBJECT_ADDITIONAL_PROPERTIES: 303,
+       OBJECT_DEPENDENCY_KEY: 304,
+       // Array errors
+       ARRAY_LENGTH_SHORT: 400,
+       ARRAY_LENGTH_LONG: 401,
+       ARRAY_UNIQUE: 402,
+       ARRAY_ADDITIONAL_ITEMS: 403
+};
+
+function ValidationError(code, message, dataPath, schemaPath, subErrors) {
+       if (code == undefined) {
+               throw new Error ("No code supplied for error: "+ message);
+       }
+       this.code = code;
+       this.message = message;
+       this.dataPath = dataPath ? dataPath : "";
+       this.schemaPath = schemaPath ? schemaPath : "";
+       this.subErrors = subErrors ? subErrors : null;
+}
+ValidationError.prototype = {
+       prefixWith: function (dataPrefix, schemaPrefix) {
+               if (dataPrefix != null) {
+                       dataPrefix = dataPrefix.replace("~", "~0").replace("/", 
"~1");
+                       this.dataPath = "/" + dataPrefix + this.dataPath;
+               }
+               if (schemaPrefix != null) {
+                       schemaPrefix = schemaPrefix.replace("~", 
"~0").replace("/", "~1");
+                       this.schemaPath = "/" + schemaPrefix + this.schemaPath;
+               }
+               if (this.subErrors != null) {
+                       for (var i = 0; i < this.subErrors.length; i++) {
+                               this.subErrors[i].prefixWith(dataPrefix, 
schemaPrefix);
+                       }
+               }
+               return this;
+       }
+};
+
+function searchForTrustedSchemas(map, schema, url) {
+       if (typeof schema.id == "string") {
+               if (schema.id.substring(0, url.length) == url) {
+                       var remainder = schema.id.substring(url.length);
+                       if ((url.length > 0 && url.charAt(url.length - 1) == 
"/")
+                               || remainder.charAt(0) == "#"
+                               || remainder.charAt(0) == "?") {
+                               if (map[schema.id] == undefined) {
+                                       map[schema.id] = schema;
+                               }
+                       }
+               }
+       }
+       if (typeof schema == "object") {
+               for (var key in schema) {
+                       if (key != "enum" && typeof schema[key] == "object") {
+                               searchForTrustedSchemas(map, schema[key], url);
+                       }
+               }
+       }
+       return map;
+}
+
+var globalContext = new ValidatorContext();
+
+var publicApi = {
+       validate: function (data, schema) {
+               var context = new ValidatorContext(globalContext);
+               if (typeof schema == "string") {
+                       schema = {"$ref": schema};
+               }
+               var added = context.addSchema("", schema);
+               var error = context.validateAll(data, schema);
+               this.error = error;
+               this.missing = context.missing;
+               this.valid = (error == null);
+               return this.valid;
+       },
+       validateResult: function () {
+               var result = {};
+               this.validate.apply(result, arguments);
+               return result;
+       },
+       validateMultiple: function (data, schema) {
+               var context = new ValidatorContext(globalContext, true);
+               if (typeof schema == "string") {
+                       schema = {"$ref": schema};
+               }
+               context.addSchema("", schema);
+               context.validateAll(data, schema);
+               var result = {};
+               result.errors = context.errors;
+               result.missing = context.missing;
+               result.valid = (result.errors.length == 0);
+               return result;
+       },
+       addSchema: function (url, schema) {
+               return globalContext.addSchema(url, schema);
+       },
+       getSchema: function (url) {
+               return globalContext.getSchema(url);
+       },
+       missing: [],
+       error: null,
+       normSchema: normSchema,
+       resolveUrl: resolveUrl,
+       errorCodes: ErrorCodes
+};
+
+global.tv4 = publicApi;
+
+})((typeof module !== 'undefined' && module.exports) ? exports : this);
+

Added: airavata/sandbox/gsoc2013/js/vendor/tv4.min.js
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/js/vendor/tv4.min.js?rev=1505156&view=auto
==============================================================================
--- airavata/sandbox/gsoc2013/js/vendor/tv4.min.js (added)
+++ airavata/sandbox/gsoc2013/js/vendor/tv4.min.js Sat Jul 20 15:58:00 2013
@@ -0,0 +1,27 @@
+(function(s){function j(b,a){if(b===a)return!0;if("object"==typeof 
b&&"object"==typeof 
a){if(Array.isArray(b)!=Array.isArray(a))return!1;if(Array.isArray(b)){if(b.length!=a.length)return!1;for(var
 c=0;c<b.length;c++)if(!j(b[c],a[c]))return!1}else{for(c in b)if(void 
0===a[c]&&void 0!==b[c])return!1;for(c in a)if(void 0===b[c]&&void 
0!==a[c])return!1;for(c in 
b)if(!j(b[c],a[c]))return!1}return!0}return!1}function 
q(b){return(b=String(b).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/))?
+{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function
 p(b,a){a=q(a||"");b=q(b||"");var 
c;if(!a||!b)c=null;else{c=(a.protocol||b.protocol)+(a.protocol||a.authority?a.authority:b.authority);var
 
d;d=a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(b.authority&&!b.pathname?"/":"")+b.pathname.slice(0,b.pathname.lastIndexOf("/")+1)+a.pathname:b.pathname;var
 f=[];d.replace(/^(\.\.?(\/|$))+/,
+"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?f.pop():f.push(a)});d=f.join("").replace(/^\//,"/"===d.charAt(0)?"/":"");c=c+d+(a.protocol||a.authority||a.pathname?a.search:a.search||b.search)+a.hash}return
 c}function m(b,a){void 0==a?a=b.id:"string"==typeof 
b.id&&(a=p(a,b.id),b.id=a);if("object"==typeof b)if(Array.isArray(b))for(var 
c=0;c<b.length;c++)m(b[c],a);else if("string"==typeof 
b.$ref)b.$ref=p(a,b.$ref);else for(c in b)"enum"!=c&&m(b[c],
+a)}function g(b,a,c,d,f){if(void 0==b)throw Error("No code supplied for error: 
"+a);this.code=b;this.message=a;this.dataPath=c?c:"";this.schemaPath=d?d:"";this.subErrors=f?f:null}function
 r(b,a,c){if("string"==typeof a.id&&a.id.substring(0,c.length)==c){var 
d=a.id.substring(c.length);if(0<c.length&&"/"==c.charAt(c.length-1)||"#"==d.charAt(0)||"?"==d.charAt(0))void
 0==b[a.id]&&(b[a.id]=a)}if("object"==typeof a)for(var f in 
a)"enum"!=f&&"object"==typeof a[f]&&r(b,a[f],c);return b}var 
e=function(b,a){this.missing=
+[];this.schemas=b?Object.create(b.schemas):{};this.collectMultiple=a;this.errors=[];this.handleError=a?this.collectError:this.returnError};e.prototype.returnError=function(b){return
 b};e.prototype.collectError=function(b){b&&this.errors.push(b);return 
null};e.prototype.prefixErrors=function(b,a,c){for(;b<this.errors.length;b++)this.errors[b]=this.errors[b].prefixWith(a,c);return
 this};e.prototype.getSchema=function(b){if(void 0!=this.schemas[b])return 
b=this.schemas[b];var a=b,c="";-1!=b.indexOf("#")&&
+(c=b.substring(b.indexOf("#")+1),a=b.substring(0,b.indexOf("#")));if(void 
0!=this.schemas[a]){b=this.schemas[a];c=decodeURIComponent(c);if(""==c)return 
b;if("/"!=c.charAt(0))return;for(var 
c=c.split("/").slice(1),d=0;d<c.length;d++){var 
f=c[d].replace("~1","/").replace("~0","~");if(void 0==b[f]){b=void 
0;break}b=b[f]}if(void 0!=b)return b}void 
0==this.missing[a]&&(this.missing.push(a),this.missing[a]=a)};e.prototype.addSchema=function(b,a){var
 c={};c[b]=a;m(a,b);r(c,a,b);for(var d in c)this.schemas[d]=
+c[d];return c};e.prototype.validateAll=function(b,a,c,d){if(void 
0!=a.$ref&&(a=this.getSchema(a.$ref),!a))return null;var 
f=this.errors.length;if((b=this.validateBasic(b,a)||this.validateNumeric(b,a)||this.validateString(b,a)||this.validateArray(b,a)||this.validateObject(b,a)||this.validateCombinations(b,a)||null)||f!=this.errors.length)for(;c&&c.length||d&&d.length;){a=c&&c.length?""+c.pop():null;var
 
e=d&&d.length?""+d.pop():null;b&&(b=b.prefixWith(a,e));this.prefixErrors(f,a,e)}return
 this.handleError(b)};
+e.prototype.validateBasic=function(b,a){var 
c;return(c=this.validateType(b,a))||(c=this.validateEnum(b,a))?c.prefixWith(null,"type"):null};e.prototype.validateType=function(b,a){if(void
 0==a.type)return null;var c=typeof 
b;null==b?c="null":Array.isArray(b)&&(c="array");var d=a.type;"object"!=typeof 
d&&(d=[d]);for(var f=0;f<d.length;f++){var 
e=d[f];if(e==c||"integer"==e&&"number"==c&&0==b%1)return null}return new 
g(h.INVALID_TYPE,"invalid data type: 
"+c)};e.prototype.validateEnum=function(b,a){if(void 0==
+a["enum"])return null;for(var 
c=0;c<a["enum"].length;c++)if(j(b,a["enum"][c]))return null;return new 
g(h.ENUM_MISMATCH,"No enum match for: 
"+JSON.stringify(b))};e.prototype.validateNumeric=function(b,a){return 
this.validateMultipleOf(b,a)||this.validateMinMax(b,a)||null};e.prototype.validateMultipleOf=function(b,a){var
 c=a.multipleOf||a.divisibleBy;return void 0==c?null:"number"==typeof 
b&&0!=b%c?new g(h.NUMBER_MULTIPLE_OF,"Value "+b+" is not a multiple of 
"+c):null};e.prototype.validateMinMax=function(b,
+a){if("number"!=typeof b)return null;if(void 
0!=a.minimum){if(b<a.minimum)return(new g(h.NUMBER_MINIMUM,"Value "+b+" is less 
than minimum 
"+a.minimum)).prefixWith(null,"minimum");if(a.exclusiveMinimum&&b==a.minimum)return(new
 g(h.NUMBER_MINIMUM_EXCLUSIVE,"Value "+b+" is equal to exclusive minimum 
"+a.minimum)).prefixWith(null,"exclusiveMinimum")}if(void 
0!=a.maximum){if(b>a.maximum)return(new g(h.NUMBER_MAXIMUM,"Value "+b+" is 
greater than maximum 
"+a.maximum)).prefixWith(null,"maximum");if(a.exclusiveMaximum&&
+b==a.maximum)return(new g(h.NUMBER_MAXIMUM_EXCLUSIVE,"Value "+b+" is equal to 
exclusive maximum "+a.maximum)).prefixWith(null,"exclusiveMaximum")}return 
null};e.prototype.validateString=function(b,a){return 
this.validateStringLength(b,a)||this.validateStringPattern(b,a)||null};e.prototype.validateStringLength=function(b,a){return"string"!=typeof
 b?null:void 0!=a.minLength&&b.length<a.minLength?(new 
g(h.STRING_LENGTH_SHORT,"String is too short ("+b.length+" chars), minimum 
"+a.minLength)).prefixWith(null,
+"minLength"):void 0!=a.maxLength&&b.length>a.maxLength?(new 
g(h.STRING_LENGTH_LONG,"String is too long ("+b.length+" chars), maximum 
"+a.maxLength)).prefixWith(null,"maxLength"):null};e.prototype.validateStringPattern=function(b,a){return"string"!=typeof
 b||void 0==a.pattern?null:!RegExp(a.pattern).test(b)?(new 
g(h.STRING_PATTERN,"String does not match 
pattern")).prefixWith(null,"pattern"):null};e.prototype.validateArray=function(b,a){return!Array.isArray(b)?null:this.validateArrayLength(b,a)||this.validateArrayUniqueItems(b,
+a)||this.validateArrayItems(b,a)||null};e.prototype.validateArrayLength=function(b,a){if(void
 0!=a.minItems&&b.length<a.minItems){var c=(new g(h.ARRAY_LENGTH_SHORT,"Array 
is too short ("+b.length+"), minimum 
"+a.minItems)).prefixWith(null,"minItems");if(this.handleError(c))return 
c}return void 0!=a.maxItems&&b.length>a.maxItems&&(c=(new 
g(h.ARRAY_LENGTH_LONG,"Array is too long ("+b.length+" chars), maximum 
"+a.maxItems)).prefixWith(null,"maxItems"),this.handleError(c))?c:null};e.prototype.validateArrayUniqueItems=
+function(b,a){if(a.uniqueItems)for(var c=0;c<b.length;c++)for(var 
d=c+1;d<b.length;d++)if(j(b[c],b[d])){var f=(new g(h.ARRAY_UNIQUE,"Array items 
are not unique (indices "+c+" and 
"+d+")")).prefixWith(null,"uniqueItems");if(this.handleError(f))return f}return 
null};e.prototype.validateArrayItems=function(b,a){if(void 0==a.items)return 
null;var c;if(Array.isArray(a.items))for(var 
d=0;d<b.length;d++)if(d<a.items.length){if(c=this.validateAll(b[d],a.items[d],[d],["items",d]))return
 c}else{if(void 0!=
+a.additionalItems)if("boolean"==typeof 
a.additionalItems){if(!a.additionalItems&&(c=(new 
g(h.ARRAY_ADDITIONAL_ITEMS,"Additional items not 
allowed")).prefixWith(""+d,"additionalItems"),this.handleError(c)))return 
c}else 
if(c=this.validateAll(b[d],a.additionalItems,[d],["additionalItems"]))return 
c}else 
for(d=0;d<b.length;d++)if(c=this.validateAll(b[d],a.items,[d],["items"]))return 
c;return null};e.prototype.validateObject=function(b,a){return"object"!=typeof 
b||null==b||Array.isArray(b)?null:this.validateObjectMinMaxProperties(b,
+a)||this.validateObjectRequiredProperties(b,a)||this.validateObjectProperties(b,a)||this.validateObjectDependencies(b,a)||null};e.prototype.validateObjectMinMaxProperties=function(b,a){var
 c=Object.keys(b);if(void 0!=a.minProperties&&c.length<a.minProperties){var 
d=(new g(h.OBJECT_PROPERTIES_MINIMUM,"Too few properties defined 
("+c.length+"), minimum 
"+a.minProperties)).prefixWith(null,"minProperties");if(this.handleError(d))return
 d}return void 0!=a.maxProperties&&c.length>a.maxProperties&&(d=(new 
g(h.OBJECT_PROPERTIES_MAXIMUM,
+"Too many properties defined ("+c.length+"), maximum 
"+a.maxProperties)).prefixWith(null,"maxProperties"),this.handleError(d))?d:null};e.prototype.validateObjectRequiredProperties=function(b,a){if(void
 0!=a.required)for(var c=0;c<a.required.length;c++){var d=a.required[c];if(void 
0===b[d]&&(d=(new g(h.OBJECT_REQUIRED,"Missing required property: 
"+d)).prefixWith(null,""+c).prefixWith(null,"required"),this.handleError(d)))return
 d}return null};e.prototype.validateObjectProperties=function(b,a){var c,
+d;for(d in b){var f=!1;if(void 0!=a.properties&&void 
0!=a.properties[d]&&(f=!0,c=this.validateAll(b[d],a.properties[d],[d],["properties",d])))return
 c;if(void 0!=a.patternProperties)for(var e in 
a.patternProperties)if(RegExp(e).test(d)&&(f=!0,c=this.validateAll(b[d],a.patternProperties[e],[d],["patternProperties",e])))return
 c;if(!f&&void 0!=a.additionalProperties)if("boolean"==typeof 
a.additionalProperties){if(!a.additionalProperties&&(c=(new 
g(h.OBJECT_ADDITIONAL_PROPERTIES,"Additional properties not 
allowed")).prefixWith(d,
+"additionalProperties"),this.handleError(c)))return c}else 
if(c=this.validateAll(b[d],a.additionalProperties,[d],["additionalProperties"]))return
 c}return null};e.prototype.validateObjectDependencies=function(b,a){var 
c;if(void 0!=a.dependencies)for(var d in a.dependencies)if(void 0!==b[d]){var 
f=a.dependencies[d];if("string"==typeof f){if(void 0===b[f]&&(c=(new 
g(h.OBJECT_DEPENDENCY_KEY,"Dependency failed - key must exist: 
"+f)).prefixWith(null,d).prefixWith(null,"dependencies"),this.handleError(c)))return
 c}else if(Array.isArray(f))for(var e=
+0;e<f.length;e++){if(c=f[e],void 0===b[c]&&(c=(new 
g(h.OBJECT_DEPENDENCY_KEY,"Dependency failed - key must exist: 
"+c)).prefixWith(null,""+e).prefixWith(null,d).prefixWith(null,"dependencies"),this.handleError(c)))return
 c}else if(c=this.validateAll(b,f,[],["dependencies",d]))return c}return 
null};e.prototype.validateCombinations=function(b,a){return 
this.validateAllOf(b,a)||this.validateAnyOf(b,a)||this.validateOneOf(b,a)||this.validateNot(b,a)||null};e.prototype.validateAllOf=function(b,a){if(void
 0==
+a.allOf)return null;for(var 
c,d=0;d<a.allOf.length;d++)if(c=this.validateAll(b,a.allOf[d],[],["allOf",d]))return
 c;return null};e.prototype.validateAnyOf=function(b,a){if(void 
0==a.anyOf)return null;for(var 
c=[],d=this.errors.length,f=0;f<a.anyOf.length;f++){var 
e=this.errors.length,l=this.validateAll(b,a.anyOf[f],[],["anyOf",f]);if(null==l&&e==this.errors.length)return
 
this.errors=this.errors.slice(0,d),null;l&&c.push(l.prefixWith(null,""+f).prefixWith(null,"anyOf"))}c=c.concat(this.errors.slice(d));
+this.errors=this.errors.slice(0,d);return new g(h.ANY_OF_MISSING,'Data does 
not match any schemas from 
"anyOf"',"","/anyOf",c)};e.prototype.validateOneOf=function(b,a){if(void 
0==a.oneOf)return null;for(var 
c=null,d=[],e=this.errors.length,k=0;k<a.oneOf.length;k++){var 
l=this.errors.length,j=this.validateAll(b,a.oneOf[k],[],["oneOf",k]);if(null==j&&l==this.errors.length)if(null==c)c=k;else
 return this.errors=this.errors.slice(0,e),new g(h.ONE_OF_MULTIPLE,'Data is 
valid against more than one schema from "oneOf": indices '+
+c+" and "+k,"","/oneOf");else 
j&&d.push(j.prefixWith(null,""+k).prefixWith(null,"oneOf"))}if(null==c)return 
d=d.concat(this.errors.slice(e)),this.errors=this.errors.slice(0,e),new 
g(h.ONE_OF_MISSING,'Data does not match any schemas from 
"oneOf"',"","/oneOf",d);this.errors=this.errors.slice(0,e);return 
null};e.prototype.validateNot=function(b,a){if(void 0==a.not)return null;var 
c=this.errors.length,d=this.validateAll(b,a.not),e=this.errors.slice(c);this.errors=this.errors.slice(0,c);return
 null==d&&
+0==e.length?new g(h.NOT_PASSED,'Data matches schema from 
"not"',"","/not"):null};var 
h={INVALID_TYPE:0,ENUM_MISMATCH:1,ANY_OF_MISSING:10,ONE_OF_MISSING:11,ONE_OF_MULTIPLE:12,NOT_PASSED:13,NUMBER_MULTIPLE_OF:100,NUMBER_MINIMUM:101,NUMBER_MINIMUM_EXCLUSIVE:102,NUMBER_MAXIMUM:103,NUMBER_MAXIMUM_EXCLUSIVE:104,STRING_LENGTH_SHORT:200,STRING_LENGTH_LONG:201,STRING_PATTERN:202,OBJECT_PROPERTIES_MINIMUM:300,OBJECT_PROPERTIES_MAXIMUM:301,OBJECT_REQUIRED:302,OBJECT_ADDITIONAL_PROPERTIES:303,OBJECT_DEPENDENCY_KEY:304,
+ARRAY_LENGTH_SHORT:400,ARRAY_LENGTH_LONG:401,ARRAY_UNIQUE:402,ARRAY_ADDITIONAL_ITEMS:403};g.prototype={prefixWith:function(b,a){null!=b&&(b=b.replace("~","~0").replace("/","~1"),this.dataPath="/"+b+this.dataPath);null!=a&&(a=a.replace("~","~0").replace("/","~1"),this.schemaPath="/"+a+this.schemaPath);if(null!=this.subErrors)for(var
 c=0;c<this.subErrors.length;c++)this.subErrors[c].prefixWith(b,a);return 
this}};var n=new e;s.tv4={validate:function(b,a){var c=new 
e(n);"string"==typeof a&&(a={$ref:a});
+c.addSchema("",a);var 
d=c.validateAll(b,a);this.error=d;this.missing=c.missing;return 
this.valid=null==d},validateResult:function(){var 
b={};this.validate.apply(b,arguments);return 
b},validateMultiple:function(b,a){var c=new e(n,!0);"string"==typeof 
a&&(a={$ref:a});c.addSchema("",a);c.validateAll(b,a);var 
d={};d.errors=c.errors;d.missing=c.missing;d.valid=0==d.errors.length;return 
d},addSchema:function(b,a){return 
n.addSchema(b,a)},getSchema:function(b){return 
n.getSchema(b)},missing:[],error:null,
+normSchema:m,resolveUrl:p,errorCodes:h}})("undefined"!==typeof 
module&&module.exports?exports:this);
\ No newline at end of file

Added: airavata/sandbox/gsoc2013/launchWorkflow.html
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/launchWorkflow.html?rev=1505156&view=auto
==============================================================================
--- airavata/sandbox/gsoc2013/launchWorkflow.html (added)
+++ airavata/sandbox/gsoc2013/launchWorkflow.html Sat Jul 20 15:58:00 2013
@@ -0,0 +1,149 @@
+<!--
+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.
+-->
+<!--<form class="form-horizontal" name="launchWorkflowForm">
+    <div class="control-group" ng-class="{error: 
launchWorkflowForm.name.$invalid}">
+        <label>Name</label>
+        <input type="text" name="name" ng-model="project.name" required>
+    <span ng-show="myForm.name.$error.required" class="help-inline">
+        Required</span>
+    </div>
+
+    <div class="control-group" ng-class="{error: myForm.site.$invalid}">
+        <label>Website</label>
+        <input type="url" name="site" ng-model="project.site" required>
+    <span ng-show="myForm.site.$error.required" class="help-inline">
+        Required</span>
+    <span ng-show="myForm.site.$error.url" class="help-inline">
+        Not a URL</span>
+    </div>
+
+    <label>Description</label>
+    <textarea name="description" ng-model="project.description"></textarea>
+
+    <br>
+    <a href="#/" class="btn">Cancel</a>
+    <button ng-click="save()" ng-disabled="isClean() || myForm.$invalid"
+            class="btn btn-primary">Save</button>
+    <button ng-click="destroy()"
+            ng-show="project.$id" class="btn btn-danger">Delete</button>
+</form> -->
+
+
+<div class="modal hide fade" id="launchWorkflow" ui-if="isWorkflowOpen" 
aria-labelledby="runWorkflowModal" tabindex="-1" role="dialog" 
aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" 
aria-hidden="true">×</button>
+        <h3>Launch Workflow</h3>
+    </div>
+    <div class="modal-body">
+    <form class="form-horizontal">
+        <div class="control-group" ng-repeat="input in workflowInputs">
+            <label class="control-label" for={{input.id}}>{{input.name}}  
{{input.datatype}}</label>
+            <div class="controls">
+                <input type="text" id={{input.id}} placeholder={{input.value}} 
ng-model={{input.name}} required>
+            </div>
+        </div>
+        <div class="control-group">
+            <label class="control-label" for="inputExperimentName"><i class=" 
icon-pencil icon-white"></i></label>
+            <div class="controls">
+                <input type="text" id="inputExperimentName" 
placeholder="Experiment Name" ng-model="experimentName" required>
+            </div>
+        </div>
+        <div class="control-group">
+            <label class="control-label" for="inputWorkflowInterpreterURL"><i 
class=" icon-upload icon-white"></i></label>
+            <div class="controls">
+                <input type="url" id="inputWorkflowInterpreterURL" 
placeholder="Workflow Interpreter URL" ng-model="workflowInterpreterURL" 
required>
+            </div>
+        </div>
+        <div class="control-group">
+            <label class="control-label" for="inputGFacURL"><i class=" 
icon-upload icon-white"></i></label>
+            <div class="controls">
+                <input type="url" id="inputGFacURL" placeholder="GFac URL" 
ng-model="gfacURL" required="">
+            </div>
+        </div>
+    </form>
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn btn-primary">Run</a>
+        <a href="#" class="btn " data-dismiss="modal" 
aria-hidden="true">Cancel</a>
+    </div>
+</div>
+
+<div class="modal hide fade" id="addHost" aria-labelledby="addHostModal" 
tabindex="-1" role="dialog" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" 
aria-hidden="true">×</button>
+        <h3>Register Host</h3>
+    </div>
+    <div class="modal-body">
+        <form class="form-horizontal">
+            <div class="control-group">
+                <label class="control-label" for="inputHostId"><i class=" 
icon-pencil icon-white"></i></label>
+                <div class="controls">
+                    <input type="text" id="inputHostId" placeholder="Host Id" 
ng-model="hostId">
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label" for="inputHostAddress"><i class=" 
icon-upload icon-white"></i></label>
+                <div class="controls">
+                    <input type="url" id="inputHostAddress" placeholder="Host 
Address" ng-model="hostAddress">
+                </div>
+            </div>
+        </form>
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn btn-primary">Save</a>
+        <a href="#" class="btn " data-dismiss="modal" 
aria-hidden="true">Cancel</a>
+    </div>
+</div>
+
+
+<div class="modal hide fade" id="newApplicationDeploy" 
aria-labelledby="addHostModal" tabindex="-1" role="dialog" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" 
aria-hidden="true">×</button>
+        <h3>New Application Deployment</h3>
+    </div>
+    <div class="modal-body">
+        <form class="form-horizontal">
+            <div class="control-group">
+                <label class="control-label" for="applicationHost">Application 
Host: </label>
+                <div class="controls">
+                    <select id="applicationHost"  ng-model="applicationHost" 
ng-options="host.name for host in hostList"></select> <a href="#addHost" 
role="button" data-toggle="modal" title="Create New Host"><i 
class="icon-plus-sign icon-white"></i></a>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label" for="executablePath">Executable 
Path</label>
+                <div class="controls">
+                    <input type="url" id="executablePath" 
placeholder="Executable Path" ng-model="executablePath" required> <i class=" 
icon-folder-open icon-white"></i>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label" 
for="scratchWorkingDirectory">Scratch Working Directory</label>
+                <div class="controls">
+                    <input type="url" id="scratchWorkingDirectory" 
placeholder="Scratch Working Directory" ng-model="scratchWorkingDirectory" 
required> <i class=" icon-folder-open icon-white"></i>
+                </div>
+            </div>
+            <div>
+                <a href="#" class="btn btn-primary">Advance Application 
Configuration</a>
+            </div>
+        </form>
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn btn-primary">Add</a>
+        <a href="#" class="btn " data-dismiss="modal" 
aria-hidden="true">Cancel</a>
+    </div>
+</div>
\ No newline at end of file

Added: airavata/sandbox/gsoc2013/newApplicationDeployement.html
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/newApplicationDeployement.html?rev=1505156&view=auto
==============================================================================
--- airavata/sandbox/gsoc2013/newApplicationDeployement.html (added)
+++ airavata/sandbox/gsoc2013/newApplicationDeployement.html Sat Jul 20 
15:58:00 2013
@@ -0,0 +1,50 @@
+<!--
+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.
+-->
+<div class="modal hide fade" id="newApplicationDeploy" 
aria-labelledby="addHostModal" tabindex="-1" role="dialog" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" 
aria-hidden="true">×</button>
+        <h3>New Application Deployment</h3>
+    </div>
+    <div class="modal-body">
+        <form class="form-horizontal">
+            <div class="control-group">
+                <label class="control-label" for="applicationHost">Application 
Host: </label>
+                <div class="controls">
+                    <select id="applicationHost"  ng-model="applicationHost" 
ng-options="host.name for host in hostList"> </select><a href="#addHost" 
role="button" data-toggle="modal"><i class="icon-plus-sign"></i> Add New 
Host</a>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label" for="executablePath">Executable 
Path</label>
+                <div class="controls">
+                    <input type="url" id="executablePath" 
placeholder="Executable Path" ng-model="executablePath"> <i class=" 
icon-folder-open icon-white"></i>
+                </div>
+            </div>
+            <div class="control-group">
+                <label class="control-label" 
for="scratchWorkingDirectory">Scratch Working Directory</label>
+                <div class="controls">
+                    <input type="url" id="scratchWorkingDirectory" 
placeholder="Scratch Working Directory" ng-model="scratchWorkingDirectory"> <i 
class=" icon-folder-open icon-white"></i>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn btn-primary">Save</a>
+        <a href="#" class="btn " data-dismiss="modal" 
aria-hidden="true">Cancel</a>
+    </div>
+</div>
\ No newline at end of file

Added: airavata/sandbox/gsoc2013/project.json
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/gsoc2013/project.json?rev=1505156&view=auto
==============================================================================
--- airavata/sandbox/gsoc2013/project.json (added)
+++ airavata/sandbox/gsoc2013/project.json Sat Jul 20 15:58:00 2013
@@ -0,0 +1,54 @@
+{
+    "project":{
+            "name": "Workflow Execution Interface",
+            "description": "Execution Interface for Apache Airavata, part of 
the master project for web-based XBaya",
+            "organization": "The Apache Software Foundation",
+            "community":"Apache Airavata",
+            "url": "http://airavata.apache.org//";,
+            "program": "Google Summer of Code 2013"
+    },
+    "author": {
+            "name": "Sanchit Aggarwal",
+            "email": "[email protected]"
+    },
+    "mentor": [
+        {
+            "name": "Suresh Marru",
+            "email": "[email protected]"
+        },
+        {
+            "name": "Heshan Suriyaarachchi",
+            "email": "[email protected]"
+        }
+    ],
+    "contributors": [
+        {
+            "name": "Sanchit Aggarwal",
+            "email": "[email protected]"
+        },
+        {
+            "name": "Vijayendra R Grampurohit",
+            "email": "[email protected]"
+        },
+        {   "name": "Danushka Menikkumbura",
+            "email": "[email protected]"
+        },
+        {
+            "name": "Subho Banerjee",
+            "email": "[email protected]"
+        },
+        {
+            "name": "Shameera Rathnayaka" ,
+            "email": "[email protected]"
+        }
+    ],
+    "technologies": [
+        "HTML5",
+        "CSS3",
+        "jQuery",
+        "tv4",
+        "AngularJs",
+        "twitter bootstrap",
+        "AiravataAPI"
+    ]
+}


Reply via email to