You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2009/03/19 12:11:05 UTC

svn commit: r755920 [8/11] - in /camel/trunk/components/camel-web/src/main/webapp/js/dojox: json/ jsonPath/ lang/ lang/aspect/ lang/functional/ lang/oo/ layout/ layout/dnd/ layout/ext-dijit/ layout/ext-dijit/layout/ layout/nls/ layout/nls/en/ layout/nl...

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/wikipedia.smd
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/wikipedia.smd?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/wikipedia.smd (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/wikipedia.smd Thu Mar 19 11:10:58 2009
@@ -0,0 +1,49 @@
+{
+	"SMDVersion": "2.0",
+	"id": "http://en.wikipedia.org/w/api.php",
+	"description": "Wikipedia API",
+
+	transport: "JSONP",
+	envelope: "URL",
+	additionalParameters: true,
+	target: "http://en.wikipedia.org/w/api.php",
+	parameters: [
+		{ name: "format", optional: false, "default": "json" }
+	],
+
+	services: {
+
+		/*
+		 * This is a very very basic spec that just gives us a free-form API
+		 * endpoint to talk to. See http://en.wikipedia.org/w/api.php for
+		 * details on what parameters to supply and what sort of data you
+		 * should expect to see. Note that returned JSON is often somewhat
+		 * ... interesting ...:
+		 *
+		 * {
+		 *     "parse": {
+		 *         "text": {
+		 *             "*": "<table ..."
+		 *         },
+		 *         "langlinks": [
+		 *             {
+		 *                 "lang": "simple",
+		 *                 "*": ""
+		 *             },
+		 *             // etc.
+		 *         ]
+		 *     }
+		 * }
+		 * 
+		 * Not sure why we'd ever want an element to be named "*", but that's
+		 * how it is. So take care.
+		 *
+		 */
+		query: {
+			parameters: [
+				{ name: "action", type: "string", "default": "parse" }
+			]
+		}
+
+	}
+}

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/yahoo.smd
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/yahoo.smd?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/yahoo.smd (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/SMDLibrary/yahoo.smd Thu Mar 19 11:10:58 2009
@@ -0,0 +1,497 @@
+{
+	"SMDVersion": "2.0",
+	// FIXME: is this the kind of value we're supposed to use here?
+	"id": "http://developer.yahoo.com/search/", 
+	"description": "Yahoo's search API",
+
+	transport: "JSONP",
+	envelope: "URL",
+	additionalParameters: true,
+	parameters: [
+		{ name: "appid", optional: false, "default": "dojotoolkit" },
+		{ name: "output", optional: false, "default": "json" }
+	],
+
+	// FIXME: Quite a few of these APIs can take multiple entries for the same parameter, to behave
+	//        as multi-select options. How should we handle these?
+	
+	// ANSWER: JSON Schema defines this aspect of SMD, enumeration of possible values is handled
+	//	with an "options" attribute. For example:
+	//	{ name: "search_in", type: "string", optional: true, "default": "all", options:["all", "question", "best_answer"]}, // can be "all", "question", "best_answer"
+
+	services: {
+		//
+		// ANSWERS
+		//
+		// FIXME: Some of these API endpoints' names only make sense when you know they're in the
+		//        Yahoo Answers part of the API; just reading a flat listing of methods in this SMD
+		//        likely won't have enough information about what they do. Should we split this up?
+
+		// http://developer.yahoo.com/answers/V1/questionSearch.html
+		questionSearch: {
+			target: "http://answers.yahooapis.com/AnswersService/V1/questionSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "search_in", type: "string", optional: true, "default": "all" }, // can be "all", "question", "best_answer"
+				{ name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
+				{ name: "category_name", type: "string", optional: true, "default": null },
+				{ name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
+				{ name: "date_range", type: "string", optional: true, "default": "all" }, // can be "all", "7", "7-30", "30-60", "60-90", "more90"
+				{ name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "date_desc", "date_asc"
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+				{ name: "start", type: "integer", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 } // max 50
+			]
+		},
+
+		// http://developer.yahoo.com/answers/V1/getByCategory.html
+		getByCategory: {
+			target: "http://answers.yahooapis.com/AnswersService/V1/getByCategory",
+			parameters: [
+				{ name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
+				{ name: "category_name", type: "string", optional: true, "default": null },
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+				{ name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
+				{ name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
+				{ name: "start", type: "integer", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 } // max 50
+			]
+		},
+
+		// http://developer.yahoo.com/answers/V1/getQuestion.html
+		getQuestion: {
+			target: "http://answers.yahooapis.com/AnswersService/V1/getQuestion",
+			parameters: [
+				{ name: "question_id", type: "string", optional: true, "default": null }
+			]
+		},
+
+		// http://developer.yahoo.com/answers/V1/getByUser.html
+		getByUser: {
+			target: "http://answers.yahooapis.com/AnswersService/V1/getByUser",
+			parameters: [
+				{ name: "user_id", type: "string", optional: false, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+				{ name: "filter", type: "string", optional: true, "default": "question" }, // can be "question", "answer", "best_answer"
+				{ name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
+				{ name: "start", type: "integer", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 } // max 50
+			]
+		},
+
+		//
+		// AUDIO SEARCH
+		//
+
+		// http://developer.yahoo.com/search/audio/V1/artistSearch.html
+		artistSearch: {
+			target: "http://search.yahooapis.com/AudioSearchService/V1/artistSearch",
+			parameters: [
+				{ name: "artist", type: "string", optional: true, "default": "" }, // one of (artist, artistid) is required
+				{ name: "artistid", type: "string", optional: true, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/search/audio/V1/albumSearch.html
+		albumSearch: {
+			target: "http://search.yahooapis.com/AudioSearchService/V1/albumSearch",
+			parameters: [
+				{ name: "artist", type: "string", optional: true, "default": "" },
+				{ name: "artistid", type: "string", optional: true, "default": "" },
+				{ name: "album", type: "string", optional: true, "default": "" },
+				{ name: "albumid", type: "string", optional: true, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/search/audio/V1/songSearch.html
+		songSearch: {
+			// beware, this method has returned many a JSON string containing syntax error(s)
+			target: "http://search.yahooapis.com/AudioSearchService/V1/songSearch",
+			parameters: [
+				{ name: "artist", type: "string", optional: true, "default": "" },
+				{ name: "artistid", type: "string", optional: true, "default": "" },
+				{ name: "album", type: "string", optional: true, "default": "" },
+				{ name: "albumid", type: "string", optional: true, "default": "" },
+				{ name: "song", type: "string", optional: true, "default": "" },
+				{ name: "songid", type: "string", optional: true, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/search/audio/V1/songDownloadLocation.html
+		songDownloadLocation: {
+			target: "http://search.yahooapis.com/AudioSearchService/V1/songDownloadLocation",
+			parameters: [
+				{ name: "songid", type: "string", optional: false, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "source", type: "string", optional: true, "default": "" } // can be "audiolunchbox", "artistdirect", "buymusic", "dmusic", "emusic", "epitonic", "garageband", "itunes", "yahoo", "livedownloads", "mp34u", "msn", "musicmatch", "mapster", "passalong", "rhapsody", "soundclick", "theweb"
+			]
+		},
+
+		//
+		// CONTENT ANALYSIS
+		//
+		
+		// http://developer.yahoo.com/search/content/V1/termExtraction.html
+		contextSearch: {
+			// FIXME: the API docs say to submit this as a POST, but we need JSONP for cross-domain, right?
+			// transport: "POST",
+			target: "http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction",
+			parameters: [
+				{ name: "context", type: "string", optional: false, "default": "" },
+				{ name: "query", type: "string", optional: true, "default": "" }
+			]
+		},
+
+		//
+		// IMAGE SEARCH
+		//
+
+		// http://developer.yahoo.com/search/image/V1/imageSearch.html
+		imageSearch: {
+			target: "http://search.yahooapis.com/ImageSearchService/V1/imageSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "bmp", "gif", "jpeg", "png"
+				{ name: "adult_ok", type: "boolean", optional: true, "default": null },
+				{ name: "coloration", type: "string", optional: true, "default": "any" }, // can be "any", "color", "bw"
+				{ name: "site", type: "string", optional: true, "default": null }
+			]
+		},
+
+		//
+		// LOCAL SEARCH
+		//
+
+		// http://developer.yahoo.com/search/local/V3/localSearch.html
+		localSearch: {
+			target: "http://local.yahooapis.com/LocalSearchService/V3/localSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: true, "default": "" }, // optional, but one of (query, listing_id) is required
+				{ name: "listing_id", type: "string", optional: true, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 20
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "title", "distance", "rating"
+				{ name: "radius", type: "float", optional: true }, // the default varies according to location
+				{ name: "street", type: "string", optional: true, "default": null },
+				{ name: "city", type: "string", optional: true, "default": null },
+				{ name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
+				{ name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
+				{ name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
+				{ name: "latitude", type: "float", optional: true }, // -90 to 90
+				{ name: "longitude", type: "float", optional: true }, // -180 to 180
+				{ name: "category", type: "integer", optional: true },
+				{ name: "omit_category", type: "integer", optional: true },
+				{ name: "minimum_rating", type: "integer", optional: true }
+			]
+		},
+
+		// http://developer.yahoo.com/local/V1/collectionSearch.html
+		collectionSearch: {
+			target: "http://collections.local.yahooapis.com/LocalSearchService/V1/collectionSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: true, "default": "" }, // optional, but at least one of (query, username) is required
+				{ name: "username", type: "string", optional: true, "default": "" },
+				{ name: "city", type: "string", optional: true, "default": null },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/local/V1/getCollection.html
+		getCollection: {
+			target: "http://collections.local.yahooapis.com/LocalSearchService/V1/getCollection",
+			parameters: [
+				{ name: "collection_id", type: "integer", optional: false, "default": "" }
+			]
+		},
+
+		//
+		// MY WEB 2.0
+		//
+
+		// http://developer.yahoo.com/search/myweb/V1/urlSearch.html
+		urlSearch: {
+			target: "http://search.yahooapis.com/MyWebService/V1/urlSearch",
+			parameters: [
+				{ name: "tag", type: "string", optional: true, "default": "" },
+				{ name: "yahooid", type: "string", optional: true, "default": "" },
+				{ name: "sort", type: "string", optional: true, "default": "date" }, // can be "date", "title", "url"
+				{ name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/search/myweb/V1/tagSearch.html
+		tagSearch: {
+			target: "http://search.yahooapis.com/MyWebService/V1/tagSearch",
+			parameters: [
+				{ name: "url", type: "string", optional: true, "default": "" },
+				{ name: "yahooid", type: "string", optional: true, "default": "" },
+				{ name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
+				{ name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/search/myweb/V1/relatedTags.html
+		relatedTags: {
+			target: "http://search.yahooapis.com/MyWebService/V1/relatedTags",
+			parameters: [
+				{ name: "tag", type: "string", optional: false, "default": "" },
+				{ name: "yahooid", type: "string", optional: true, "default": "" },
+				{ name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
+				{ name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		//
+		// NEWS SEARCH
+		//
+
+		// http://developer.yahoo.com/search/news/V1/newsSearch.html
+		newsSearch: {
+			target: "http://search.yahooapis.com/NewsSearchService/V1/newsSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "sort", type: "string", optional: true, "default": "rank" }, // can be "rank", "date"
+				{ name: "language", type: "string", optional: true, "default": null },
+				{ name: "site", type: "string", optional: true, "default": null }
+			]
+		},
+
+		//
+		// SHOPPING
+		//
+
+		// http://developer.yahoo.com/shopping/V2/catalogListing.html
+		catalogListing: {
+			target: "http://shopping.yahooapis.com/ShoppingService/V2/catalogListing",
+			parameters: [
+				{ name: "catalogid", type: "integer", optional: true, "default": null }, // required if idtype,idvalue are not specified
+				{ name: "getlisting", type: "boolean", optional: true, "default": 1 },
+				{ name: "getreview", type: "boolean", optional: true, "default": 0 },
+				{ name: "getspec", type: "boolean", optional: true, "default": 0 },
+				{ name: "idtype", type: "string", optional: true, "default": null }, // can be "upc", "brand,model", "brand,partnum"; required if catalogid is not specified
+				{ name: "idvalue", type: "string", optional: true, "default": null }, // required if catalogid is not specified
+				{ name: "onlynew", type: "boolean", optional: true, "default": 1 },
+				{ name: "reviewstart", type: "integer", optional: true, "default": 1 },
+				{ name: "reviewsort", type: "string", optional: true, "default": "mostRecommended_descending" }, // can be "mostRecommended_descending", "mostRecommended_ascending", "latest_descending", "latest_ascending", "highestRated_descending", "highestRated_ascending"
+				{ name: "zip", type: "string", optional: true, "default": null }
+			]
+		},
+
+
+		// http://developer.yahoo.com/shopping/V1/merchantSearch.html
+		merchantSearch: {
+			target: "http://api.shopping.yahoo.com/ShoppingService/V1/merchantSearch",
+			parameters: [
+				{ name: "merchantid", type: "integer", optional: false, "default": null }
+			]
+		},
+
+
+		// http://developer.yahoo.com/shopping/V3/productSearch.html
+		productSearch: {
+			target: "http://shopping.yahooapis.com/ShoppingService/V3/productSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: true, "default": "" }, // required if category is not specified
+				{ name: "category", type: "any", optional: true, "default": "" }, // required if query is not specified
+				{ name: "class", type: "string", optional: true, "default": null }, // can be "catalogs", "freeoffers", "paidoffers"; defaults to all three of these
+				{ name: "department", type: "integer", optional: true, "default": null },
+				{ name: "highestprice", type: "float", optional: true, "default": null },
+				{ name: "lowestprice", type: "float", optional: true, "default": null },
+				{ name: "merchantId", type: "integer", optional: true, "default": null },
+				{ name: "refinement", type: "string", optional: true, "default": null }, // used only if category is specified
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // 1-50
+				{ name: "show_numratings", type: "boolean", optional: true, "default": 0 },
+				{ name: "show_narrowing", type: "boolean", optional: true, "default": 1 },
+				{ name: "sort", type: "string", optional: true }, // can be "price_ascending", "price_descending", "userrating_ascending", "userrating_descending"; omitted, the default is to sort by relevance
+				{ name: "start", type: "integer", optional: true, "default": 1 } // 1-300
+			]
+		},
+
+		//
+		// SITE EXPLORER
+		//
+
+		// http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html
+		inlinkData: {
+			target: "http://search.yahooapis.com/SiteExplorerService/V1/inlinkData",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 50 }, // max 100
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "entire_site", type: "boolean", optional: true, "default": null },
+				{ name: "omit_inlinks", type: "string", optional: true, "default": "none" } // can be "none", "domain", "subdomain"
+			]
+		},
+
+		// http://developer.yahoo.com/search/siteexplorer/V1/pageData.html
+		pageData: {
+			target: "http://search.yahooapis.com/SiteExplorerService/V1/pageData",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 50 }, // max 100
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "domain_only", type: "boolean", optional: true, "default": null }
+			]
+		},
+
+		// http://developer.yahoo.com/search/siteexplorer/V1/ping.html
+		ping: {
+			target: "http://search.yahooapis.com/SiteExplorerService/V1/ping",
+			parameters: [
+				{ name: "sitemap", type: "string", optional: false, "default": "" }
+			]
+		},
+
+		// http://developer.yahoo.com/search/siteexplorer/V1/updateNotification.html
+		updateNotification: {
+			target: "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification",
+			parameters: [
+				{ name: "url", type: "string", optional: false, "default": "" }
+			]
+		},
+
+		//
+		// TRAFFIC
+		//
+
+		// http://developer.yahoo.com/traffic/rest/V1/index.html
+		trafficData: {
+			target: "http://local.yahooapis.com/MapsService/V1/trafficData",
+			parameters: [
+				{ name: "street", type: "string", optional: true, "default": "" },
+				{ name: "city", type: "string", optional: true, "default": "" },
+				{ name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
+				{ name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
+				{ name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
+				{ name: "latitude", type: "float", optional: true }, // -90 to 90
+				{ name: "longitude", type: "float", optional: true }, // -180 to 180
+				{ name: "severity", type: "integer", optional: true, "default": 1 }, // can be 1-5
+				{ name: "zoom", type: "integer", optional: true, "default": 6 }, // can be 1-12
+				{ name: "radius", type: "float", optional: true }, // in miles, default varies with location; ignored if zoom is specified
+				{ name: "include_map", type: "boolean", optional: true, "default": 0 },
+				{ name: "image_type", type: "string", optional: true, "default": "png" }, // can be "png" or "gif"
+				{ name: "image_height", type: "integer", optional: true, "default": 500 }, // in pixels, can be 10-2000
+				{ name: "image_width", type: "integer", optional: true, "default": 620 } // in pixels, can be 10-2000
+			]
+		},
+
+		//
+		// TRAVEL
+		//
+
+		// http://developer.yahoo.com/travel/tripservice/V1.1/tripSearch.html
+		tripSearch: {
+			target: "http://travel.yahooapis.com/TripService/V1.1/tripSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: true, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 }
+			]
+		},
+
+		// http://developer.yahoo.com/travel/tripservice/V1.1/getTrip.html
+		getTrip: {
+			target: "http://travel.yahooapis.com/TripService/V1.1/getTrip",
+			parameters: [
+				{ name: "id", type: "integer", optional: false, "default": null }
+			]
+		},
+
+		//
+		// UTILITY SERVICES
+		//
+
+		// http://developer.yahoo.com/util/timeservice/V1/getTime.html
+		/* RGG: commented out because it refuses to return JSON format even when you tell it
+		        to do so (it returns a <script> tag)
+		getTime: {
+			target: "http://developer.yahooapis.com/TimeService/V1/getTime",
+			parameters: [
+				{ name: "format", type: "string", optional: true, "default": "unix" } // can be "unix" for unix timestamp, "ms" for milliseconds
+			]
+		},
+		*/
+
+		//
+		// VIDEO SEARCH
+		//
+
+		// http://developer.yahoo.com/search/video/V1/videoSearch.html
+		videoSearch: {
+			target: "http://search.yahooapis.com/VideoSearchService/V1/videoSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "avi", "flash", "mpeg", "msmedia", "quicktime", "realmedia"
+				{ name: "adult_ok", type: "boolean", optional: true, "default": null },
+				{ name: "site", type: "string", optional: true, "default": null }
+			]
+		},
+
+		//
+		// WEB SEARCH
+		//
+
+		// http://developer.yahoo.com/search/web/V1/webSearch.html
+		webSearch: {
+			target: "http://search.yahooapis.com/WebSearchService/V1/webSearch",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" }, // must be less than 1kb
+				{ name: "region", type: "string", optional: true, "default": "us" },
+				{ name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+				{ name: "results", type: "integer", optional: true, "default": 10 }, // max 100
+				{ name: "start", type: "integer", optional: true, "default": 1 },
+				{ name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "html", "msword", "pdf", "ppt", "rss", "txt", "xls"
+				{ name: "adult_ok", type: "boolean", optional: true, "default": null },
+				{ name: "similar_ok", type: "boolean", optional: true, "default": null },
+				{ name: "language", type: "string", optional: true, "default": null },
+				{ name: "country", type: "string", optional: true, "default": null },
+				{ name: "site", type: "string", optional: true, "default": null },
+				{ name: "subscription", type: "string", optional: true, "default": null },
+				{ name: "license", type: "string", optional: true, "default": "any" } // can be "any", "cc_any", "cc_commercial", "cc_modifiable"
+			]
+		},
+
+		// http://developer.yahoo.com/search/web/V1/spellingSuggestion.html
+		spellingSuggestion: {
+			target: "http://search.yahooapis.com/WebSearchService/V1/spellingSuggestion",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" }
+			]
+		},
+
+		// http://developer.yahoo.com/search/web/V1/relatedSuggestion.html
+		relatedSuggestion: {
+			target: "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion",
+			parameters: [
+				{ name: "query", type: "string", optional: false, "default": "" },
+				{ name: "results", type: "integer", optional: true, "default": 10 } // max 50
+			]
+		}
+	}
+}

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/Service.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/Service.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/Service.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/Service.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,217 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.rpc.Service"]){
+dojo._hasResource["dojox.rpc.Service"]=true;
+dojo.provide("dojox.rpc.Service");
+dojo.require("dojo.AdapterRegistry");
+dojo.declare("dojox.rpc.Service",null,{constructor:function(_1,_2){
+var _3;
+var _4=this;
+function _5(_6){
+_6._baseUrl=new dojo._Url(location.href,_3||".")+"";
+_4._smd=_6;
+for(var _7 in _4._smd.services){
+var _8=_7.split(".");
+var _9=_4;
+for(var i=0;i<_8.length-1;i++){
+_9=_9[_8[i]]||(_9[_8[i]]={});
+}
+_9[_8[_8.length-1]]=_4._generateService(_7,_4._smd.services[_7]);
+}
+};
+if(_1){
+if((dojo.isString(_1))||(_1 instanceof dojo._Url)){
+if(_1 instanceof dojo._Url){
+_3=_1+"";
+}else{
+_3=_1;
+}
+var _b=dojo._getText(_3);
+if(!_b){
+throw new Error("Unable to load SMD from "+_1);
+}else{
+_5(dojo.fromJson(_b));
+}
+}else{
+_5(_1);
+}
+}
+this._options=(_2?_2:{});
+this._requestId=0;
+},_generateService:function(_c,_d){
+if(this[_d]){
+throw new Error("WARNING: "+_c+" already exists for service. Unable to generate function");
+}
+_d.name=_c;
+var _e=dojo.hitch(this,"_executeMethod",_d);
+var _f=dojox.rpc.transportRegistry.match(_d.transport||this._smd.transport);
+if(_f.getExecutor){
+_e=_f.getExecutor(_e,_d,this);
+}
+var _10=_d.returns||(_d._schema={});
+var _11="/"+_c+"/";
+_10._service=_e;
+_e.servicePath=_11;
+_e._schema=_10;
+_e.id=dojox.rpc.Service._nextId++;
+return _e;
+},_getRequest:function(_12,_13){
+var smd=this._smd;
+var _15=dojox.rpc.envelopeRegistry.match(_12.envelope||smd.envelope||"NONE");
+if(_15.namedParams){
+if((_13.length==1)&&dojo.isObject(_13[0])){
+_13=_13[0];
+}else{
+var _16={};
+for(var i=0;i<_12.parameters.length;i++){
+if(typeof _13[i]!="undefined"||!_12.parameters[i].optional){
+_16[_12.parameters[i].name]=_13[i];
+}
+}
+_13=_16;
+}
+var _18=(_12.parameters||[]).concat(smd.parameters||[]);
+if(_12.strictParameters||smd.strictParameters){
+for(i in _13){
+var _19=false;
+for(var j=0;j<_18.length;j++){
+if(_18[i].name==i){
+_19=true;
+}
+}
+if(!_19){
+delete _13[i];
+}
+}
+}
+for(i=0;i<_18.length;i++){
+var _1b=_18[i];
+if(!_1b.optional&&_1b.name&&!_13[_1b.name]){
+if(_1b["default"]){
+_13[_1b.name]=_1b["default"];
+}else{
+if(!(_1b.name in _13)){
+throw new Error("Required parameter "+_1b.name+" was omitted");
+}
+}
+}
+}
+}else{
+if(_12.parameters&&_12.parameters[0]&&_12.parameters[0].name&&(_13.length==1)&&dojo.isObject(_13[0])){
+if(_15.namedParams===false){
+_13=dojox.rpc.toOrdered(_12,_13);
+}else{
+_13=_13[0];
+}
+}
+}
+if(dojo.isObject(this._options)){
+_13=dojo.mixin(_13,this._options);
+}
+var _1c=_12._schema||_12.returns;
+var _1d=_15.serialize.apply(this,[smd,_12,_13]);
+_1d._envDef=_15;
+var _1e=(_12.contentType||smd.contentType||_1d.contentType);
+return dojo.mixin(_1d,{sync:dojox.rpc._sync,contentType:_1e,headers:{},target:_1d.target||dojox.rpc.getTarget(smd,_12),transport:_12.transport||smd.transport||_1d.transport,envelope:_12.envelope||smd.envelope||_1d.envelope,timeout:_12.timeout||smd.timeout,callbackParamName:_12.callbackParamName||smd.callbackParamName,schema:_1c,handleAs:_1d.handleAs||"auto",preventCache:_12.preventCache||smd.preventCache,frameDoc:this._options.frameDoc||undefined});
+},_executeMethod:function(_1f){
+var _20=[];
+var i;
+for(i=1;i<arguments.length;i++){
+_20.push(arguments[i]);
+}
+var _22=this._getRequest(_1f,_20);
+var _23=dojox.rpc.transportRegistry.match(_22.transport).fire(_22);
+_23.addBoth(function(_24){
+return _22._envDef.deserialize.call(this,_24);
+});
+return _23;
+}});
+dojox.rpc.getTarget=function(smd,_26){
+var _27=smd._baseUrl;
+if(smd.target){
+_27=new dojo._Url(_27,smd.target)+"";
+}
+if(_26.target){
+_27=new dojo._Url(_27,_26.target)+"";
+}
+return _27;
+};
+dojox.rpc.toOrdered=function(_28,_29){
+if(dojo.isArray(_29)){
+return _29;
+}
+var _2a=[];
+for(var i=0;i<_28.parameters.length;i++){
+_2a.push(_29[_28.parameters[i].name]);
+}
+return _2a;
+};
+dojox.rpc.transportRegistry=new dojo.AdapterRegistry(true);
+dojox.rpc.envelopeRegistry=new dojo.AdapterRegistry(true);
+dojox.rpc.envelopeRegistry.register("URL",function(str){
+return str=="URL";
+},{serialize:function(smd,_2e,_2f){
+var d=dojo.objectToQuery(_2f);
+return {data:d,transport:"POST"};
+},deserialize:function(_31){
+return _31;
+},namedParams:true});
+dojox.rpc.envelopeRegistry.register("JSON",function(str){
+return str=="JSON";
+},{serialize:function(smd,_34,_35){
+var d=dojo.toJson(_35);
+return {data:d,handleAs:"json",contentType:"application/json"};
+},deserialize:function(_37){
+return _37;
+}});
+dojox.rpc.envelopeRegistry.register("PATH",function(str){
+return str=="PATH";
+},{serialize:function(smd,_3a,_3b){
+var i;
+var _3d=dojox.rpc.getTarget(smd,_3a);
+if(dojo.isArray(_3b)){
+for(i=0;i<_3b.length;i++){
+_3d+="/"+_3b[i];
+}
+}else{
+for(i in _3b){
+_3d+="/"+i+"/"+_3b[i];
+}
+}
+return {data:"",target:_3d};
+},deserialize:function(_3e){
+return _3e;
+}});
+dojox.rpc.transportRegistry.register("POST",function(str){
+return str=="POST";
+},{fire:function(r){
+r.url=r.target;
+r.postData=r.data;
+return dojo.rawXhrPost(r);
+}});
+dojox.rpc.transportRegistry.register("GET",function(str){
+return str=="GET";
+},{fire:function(r){
+r.url=r.target+(r.data?"?"+r.data:"");
+return dojo.xhrGet(r);
+}});
+dojox.rpc.transportRegistry.register("JSONP",function(str){
+return str=="JSONP";
+},{fire:function(r){
+r.url=r.target+((r.target.indexOf("?")==-1)?"?":"&")+r.data;
+r.callbackParamName=r.callbackParamName||"callback";
+return dojo.io.script.get(r);
+}});
+dojox.rpc.Service._nextId=1;
+dojo._contentHandlers.auto=function(xhr){
+var _46=dojo._contentHandlers;
+var _47=xhr.getResponseHeader("Content-Type");
+var _48=!_47?_46.text(xhr):_47.match(/\/.*json/)?_46.json(xhr):_47.match(/\/javascript/)?_46.javascript(xhr):_47.match(/\/xml/)?_46.xml(xhr):_46.text(xhr);
+return _48;
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/Service.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/test.txt
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/test.txt?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/test.txt (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/test.txt Thu Mar 19 11:10:58 2009
@@ -0,0 +1 @@
+this is a test file i'm updating. Again, 11.

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/rpc/test.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/DOM.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/DOM.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/DOM.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/DOM.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,235 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.secure.DOM"]){
+dojo._hasResource["dojox.secure.DOM"]=true;
+dojo.provide("dojox.secure.DOM");
+dojo.require("dojox.lang.observable");
+dojox.secure.DOM=function(_1){
+function _2(_3){
+if(!_3){
+return _3;
+}
+var _4=_3;
+do{
+if(_4==_1){
+return _5(_3);
+}
+}while((_4=_4.parentNode));
+return null;
+};
+function _5(_6){
+if(_6){
+if(_6.nodeType){
+var _7=_8(_6);
+if(_6.nodeType==1&&typeof _7.style=="function"){
+_7.style=_9(_6.style);
+_7.ownerDocument=_a;
+_7.childNodes={__get__:function(i){
+return _5(_6.childNodes[i]);
+},length:0};
+}
+return _7;
+}
+if(_6&&typeof _6=="object"){
+if(_6.__observable){
+return _6.__observable;
+}
+_7=_6 instanceof Array?[]:{};
+_6.__observable=_7;
+for(var i in _6){
+if(i!="__observable"){
+_7[i]=_5(_6[i]);
+}
+}
+_7.data__=_6;
+return _7;
+}
+if(typeof _6=="function"){
+var _d=function(_e){
+if(typeof _e=="function"){
+return function(){
+for(var i=0;i<arguments.length;i++){
+arguments[i]=_5(arguments[i]);
+}
+return _d(_e.apply(_5(this),arguments));
+};
+}
+return dojox.secure.unwrap(_e);
+};
+return function(){
+if(_6.safetyCheck){
+_6.safetyCheck.apply(_d(this),arguments);
+}
+for(var i=0;i<arguments.length;i++){
+arguments[i]=_d(arguments[i]);
+}
+return _5(_6.apply(_d(this),arguments));
+};
+}
+}
+return _6;
+};
+unwrap=dojox.secure.unwrap;
+function _11(css){
+css+="";
+if(css.match(/behavior:|content:|javascript:|binding|expression|\@import/)){
+throw new Error("Illegal CSS");
+}
+var id=_1.id||(_1.id="safe"+(""+Math.random()).substring(2));
+return css.replace(/(\}|^)\s*([^\{]*\{)/g,function(t,a,b){
+return a+" #"+id+" "+b;
+});
+};
+function _17(url){
+if(url.match(/:/)&&!url.match(/^(http|ftp|mailto)/)){
+throw new Error("Unsafe URL "+url);
+}
+};
+function _19(el){
+if(el&&el.nodeType==1){
+if(el.tagName.match(/script/i)){
+var src=el.src;
+if(src&&src!=""){
+el.parentNode.removeChild(el);
+dojo.xhrGet({url:src,secure:true}).addCallback(function(_1c){
+_a.evaluate(_1c);
+});
+}else{
+var _1d=el.innerHTML;
+el.parentNode.removeChild(el);
+_5.evaluate(_1d);
+}
+}
+if(el.tagName.match(/link/i)){
+throw new Error("illegal tag");
+}
+if(el.tagName.match(/style/i)){
+var _1e=function(_1f){
+if(el.styleSheet){
+el.styleSheet.cssText=_1f;
+}else{
+var _20=doc.createTextNode(_1f);
+if(el.childNodes[0]){
+el.replaceChild(_20,el.childNodes[0]);
+}else{
+el.appendChild(_20);
+}
+}
+};
+src=el.src;
+if(src&&src!=""){
+alert("src"+src);
+el.src=null;
+dojo.xhrGet({url:src,secure:true}).addCallback(function(_21){
+_1e(_11(_21));
+});
+}
+_1e(_11(el.innerHTML));
+}
+if(el.style){
+_11(el.style.cssText);
+}
+if(el.href){
+_17(el.href);
+}
+if(el.src){
+_17(el.src);
+}
+var _22,i=0;
+while((_22=el.attributes[i++])){
+if(_22.name.substring(0,2)=="on"&&_22.value!="null"&&_22.value!=""){
+throw new Error("event handlers not allowed in the HTML, they must be set with element.addEventListener");
+}
+}
+var _24=el.childNodes;
+for(var i=0,l=_24.length;i<l;i++){
+_19(_24[i]);
+}
+}
+};
+function _26(_27){
+var div=document.createElement("div");
+if(_27.match(/<object/i)){
+throw new Error("The object tag is not allowed");
+}
+div.innerHTML=_27;
+_19(div);
+return div;
+};
+var doc=_1.ownerDocument;
+var _a={getElementById:function(id){
+return _2(doc.getElementById(id));
+},createElement:function(_2b){
+return _5(doc.createElement(_2b));
+},createTextNode:function(_2c){
+return _5(doc.createTextNode(_2c));
+},write:function(str){
+var div=_26(str);
+while(div.childNodes.length){
+_1.appendChild(div.childNodes[0]);
+}
+}};
+_a.open=_a.close=function(){
+};
+var _2f={innerHTML:function(_30,_31){
+
+_30.innerHTML=_26(_31).innerHTML;
+}};
+_2f.outerHTML=function(_32,_33){
+throw new Error("Can not set this property");
+};
+function _34(_35,_36){
+return function(_37,_38){
+_19(_38[_36]);
+return _37[_35](_38[0]);
+};
+};
+var _39={appendChild:_34("appendChild",0),insertBefore:_34("insertBefore",0),replaceChild:_34("replaceChild",1),cloneNode:function(_3a,_3b){
+return _3a.cloneNode(_3b[0]);
+},addEventListener:function(_3c,_3d){
+dojo.connect(_3c,"on"+_3d[0],this,function(_3e){
+_3e=_8(_3e||window.event);
+_3d[1].call(this,_3e);
+});
+}};
+_39.childNodes=_39.style=_39.ownerDocument=function(){
+};
+function _3f(_40){
+return dojox.lang.makeObservable(function(_41,_42){
+var _43;
+return _41[_42];
+},_40,function(_44,_45,_46,_47){
+for(var i=0;i<_47.length;i++){
+_47[i]=unwrap(_47[i]);
+}
+if(_39[_46]){
+return _5(_39[_46].call(_44,_45,_47));
+}
+return _5(_45[_46].apply(_45,_47));
+},_39);
+};
+var _8=_3f(function(_49,_4a,_4b){
+if(_2f[_4a]){
+_2f[_4a](_49,_4b);
+}
+_49[_4a]=_4b;
+});
+var _4c={behavior:1,MozBinding:1};
+var _9=_3f(function(_4d,_4e,_4f){
+if(!_4c[_4e]){
+_4d[_4e]=_11(_4f);
+}
+});
+_5.safeHTML=_26;
+_5.safeCSS=_11;
+return _5;
+};
+dojox.secure.unwrap=function unwrap(_50){
+return (_50&&_50.data__)||_50;
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/DOM.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/README?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/README (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/README Thu Mar 19 11:10:58 2009
@@ -0,0 +1,50 @@
+-------------------------------------------------------------------------------
+DojoX Secure
+-------------------------------------------------------------------------------
+Version 0.1
+Release date: 07/04/2008
+-------------------------------------------------------------------------------
+Project state:
+alpha
+-------------------------------------------------------------------------------
+Project authors
+	Kris Zyp (kris@sitepen.com)
+-------------------------------------------------------------------------------
+Project description
+
+DojoX Secure is a collection of tools for security, in particular for working with
+untrusted data and code. The following tools are a part of DojoX Secure:
+
+dojox.secure.capability - Object-capability JavaScript validation. This is 
+a validator to run before eval to ensure that a script can't access or modify
+any objects outside of those specifically provided to it.
+
+dojox.secure.sandbox - Provides support for loading web pages, JSON, and scripts 
+from other domains using XHR (and XHR plugins) with a safe subset library and 
+sandboxed access to the DOM.
+
+dojox.secure.DOM - Provides a DOM facade that restricts access to
+a specified subtree of the DOM. The DOM facade uses getters/setters
+and lettables to emulate the DOM API.
+
+dojox.secure.OAuth - Future project to provide an implementation of OAuth.
+
+
+-------------------------------------------------------------------------------
+Dependencies:
+
+Dojo Core (package loader).
+-------------------------------------------------------------------------------
+Documentation
+
+-------------------------------------------------------------------------------
+Installation instructions
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/secure/*
+
+Install into the following directory structure:
+/dojox/secure/
+
+...which should be at the same level as your Dojo checkout.
+

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/capability.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/capability.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/capability.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/capability.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,102 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.secure.capability"]){
+dojo._hasResource["dojox.secure.capability"]=true;
+dojo.provide("dojox.secure.capability");
+dojox.secure.badProps=/^__|^(apply|call|callee|caller|constructor|eval|prototype|this|unwatch|valueOf|watch)$|__$/;
+dojox.secure.capability={keywords:["break","case","catch","const","continue","debugger","default","delete","do","else","enum","false","finally","for","function","if","in","instanceof","new","null","yield","return","switch","throw","true","try","typeof","var","void","while"],validate:function(_1,_2,_3){
+var _4=this.keywords;
+for(var i=0;i<_4.length;i++){
+_3[_4[i]]=true;
+}
+var _6="|this| keyword in object literal without a Class call";
+var _7=[];
+if(_1.match(/[\u200c-\u200f\u202a-\u202e\u206a-\u206f\uff00-\uffff]/)){
+throw new Error("Illegal unicode characters detected");
+}
+if(_1.match(/\/\*@cc_on/)){
+throw new Error("Conditional compilation token is not allowed");
+}
+_1=_1.replace(/\\["'\\\/bfnrtu]/g,"@").replace(/\/\/.*|\/\*[\w\W]*?\*\/|\/(\\[\/\\]|[^*\/])(\\.|[^\/\n\\])*\/[gim]*|("[^"]*")|('[^']*')/g,function(t){
+return t.match(/^\/\/|^\/\*/)?" ":"0";
+}).replace(/\.\s*([a-z\$_A-Z][\w\$_]*)|([;,{])\s*([a-z\$_A-Z][\w\$_]*\s*):/g,function(t,_a,_b,_c){
+_a=_a||_c;
+if(/^__|^(apply|call|callee|caller|constructor|eval|prototype|this|unwatch|valueOf|watch)$|__$/.test(_a)){
+throw new Error("Illegal property name "+_a);
+}
+return (_b&&(_b+"0:"))||"~";
+});
+_1.replace(/([^\[][\]\}]\s*=)|((\Wreturn|\S)\s*\[\s*\+?)|([^=!][=!]=[^=])/g,function(_d){
+if(!_d.match(/((\Wreturn|[=\&\|\:\?\,])\s*\[)|\[\s*\+$/)){
+throw new Error("Illegal operator "+_d.substring(1));
+}
+});
+_1=_1.replace(new RegExp("("+_2.join("|")+")[\\s~]*\\(","g"),function(_e){
+return "new(";
+});
+function _f(_10,_11){
+var _12={};
+_10.replace(/#\d/g,function(b){
+var _14=_7[b.substring(1)];
+for(var i in _14){
+if(i==_6){
+throw i;
+}
+if(i=="this"&&_14[":method"]&&_14["this"]==1){
+i=_6;
+}
+if(i!=":method"){
+_12[i]=2;
+}
+}
+});
+_10.replace(/(\W|^)([a-z_\$A-Z][\w_\$]*)/g,function(t,a,_18){
+if(_18.charAt(0)=="_"){
+throw new Error("Names may not start with _");
+}
+_12[_18]=1;
+});
+return _12;
+};
+var _19,_1a;
+function _1b(t,_1d,a,b,_20,_21){
+_21.replace(/(^|,)0:\s*function#(\d)/g,function(t,a,b){
+var _25=_7[b];
+_25[":method"]=1;
+});
+_21=_21.replace(/(^|[^_\w\$])Class\s*\(\s*([_\w\$]+\s*,\s*)*#(\d)/g,function(t,p,a,b){
+var _2a=_7[b];
+delete _2a[_6];
+return (p||"")+(a||"")+"#"+b;
+});
+_1a=_f(_21,_1d);
+function _2b(t,a,b,_2f){
+_2f.replace(/,?([a-z\$A-Z][_\w\$]*)/g,function(t,_31){
+if(_31=="Class"){
+throw new Error("Class is reserved");
+}
+delete _1a[_31];
+});
+};
+if(_1d){
+_2b(t,a,a,_20);
+}
+_21.replace(/(\W|^)(var) ([ \t,_\w\$]+)/g,_2b);
+return (a||"")+(b||"")+"#"+(_7.push(_1a)-1);
+};
+do{
+_19=_1.replace(/((function|catch)(\s+[_\w\$]+)?\s*\(([^\)]*)\)\s*)?{([^{}]*)}/g,_1b);
+}while(_19!=_1&&(_1=_19));
+_1b(0,0,0,0,0,_1);
+for(i in _1a){
+if(!(i in _3)){
+throw new Error("Illegal reference to "+i);
+}
+}
+}};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/capability.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/sandbox.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/sandbox.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/sandbox.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/sandbox.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,231 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.secure.sandbox"]){
+dojo._hasResource["dojox.secure.sandbox"]=true;
+dojo.provide("dojox.secure.sandbox");
+dojo.require("dojox.secure.DOM");
+dojo.require("dojox.secure.capability");
+dojo.require("dojo.NodeList-fx");
+(function(){
+var _1=setTimeout;
+var _2=setInterval;
+if({}.__proto__){
+var _3=function(_4){
+var _5=Array.prototype[_4];
+if(_5&&!_5.fixed){
+(Array.prototype[_4]=function(){
+if(this==window){
+throw new TypeError("Called with wrong this");
+}
+return _5.apply(this,arguments);
+}).fixed=true;
+}
+};
+_3("concat");
+_3("reverse");
+_3("sort");
+_3("slice");
+_3("forEach");
+_3("filter");
+_3("reduce");
+_3("reduceRight");
+_3("every");
+_3("map");
+_3("some");
+}
+var _6=function(){
+return dojo.xhrGet.apply(dojo,arguments);
+};
+dojox.secure.sandbox=function(_7){
+var _8=dojox.secure.DOM(_7);
+_7=_8(_7);
+var _9=_7.ownerDocument;
+var _a,_b=dojox.secure._safeDojoFunctions(_7,_8);
+var _c=[];
+var _d=["isNaN","isFinite","parseInt","parseFloat","escape","unescape","encodeURI","encodeURIComponent","decodeURI","decodeURIComponent","alert","confirm","prompt","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","Date","RegExp","Number","Object","Array","String","Math","setTimeout","setInterval","clearTimeout","clearInterval","dojo","get","set","forEach","load","evaluate"];
+for(var i in _b){
+_d.push(i);
+_c.push("var "+i+"=dojo."+i);
+}
+eval(_c.join(";"));
+function _f(obj,_11){
+_11=""+_11;
+if(dojox.secure.badProps.test(_11)){
+throw new Error("bad property access");
+}
+if(obj.__get__){
+return obj.__get__(_11);
+}
+return obj[_11];
+};
+function set(obj,_14,_15){
+_14=""+_14;
+_f(obj,_14);
+if(obj.__set){
+return obj.__set(_14);
+}
+obj[_14]=_15;
+return _15;
+};
+function _16(obj,fun){
+if(typeof fun!="function"){
+throw new TypeError();
+}
+if("length" in obj){
+if(obj.__get__){
+var len=obj.__get__("length");
+for(var i=0;i<len;i++){
+if(i in obj){
+fun.call(obj,obj.__get__(i),i,obj);
+}
+}
+}else{
+len=obj.length;
+for(i=0;i<len;i++){
+if(i in obj){
+fun.call(obj,obj[i],i,obj);
+}
+}
+}
+}else{
+for(i in obj){
+fun.call(obj,_f(obj,i),i,obj);
+}
+}
+};
+function _1b(_1c,_1d,_1e){
+var _1f,_20,_21;
+var arg;
+for(var i=0,l=arguments.length;typeof (arg=arguments[i])=="function"&&i<l;i++){
+if(_1f){
+_a(_1f,arg.prototype);
+}else{
+_20=arg;
+var F=function(){
+};
+F.prototype=arg.prototype;
+_1f=new F;
+}
+}
+if(arg){
+for(var j in arg){
+var _27=arg[j];
+if(typeof _27=="function"){
+arg[j]=function(){
+if(this instanceof _1b){
+return arguments.callee.__rawMethod__.apply(this,arguments);
+}
+throw new Error("Method called on wrong object");
+};
+arg[j].__rawMethod__=_27;
+}
+}
+if(arg.hasOwnProperty("constructor")){
+_21=arg.constructor;
+}
+}
+_1f=_1f?_a(_1f,arg):arg;
+function _1b(){
+if(_20){
+_20.apply(this,arguments);
+}
+if(_21){
+_21.apply(this,arguments);
+}
+};
+_a(_1b,arguments[i]);
+_1f.constructor=_1b;
+_1b.prototype=_1f;
+return _1b;
+};
+function _28(_29){
+if(typeof _29!="function"){
+throw new Error("String is not allowed in setTimeout/setInterval");
+}
+};
+function _2a(_2b,_2c){
+_28(_2b);
+return _1(_2b,_2c);
+};
+function _2d(_2e,_2f){
+_28(_2e);
+return _2(_2e,_2f);
+};
+function _30(_31){
+return _8.evaluate(_31);
+};
+var _32=_8.load=function(url){
+if(url.match(/^[\w\s]*:/)){
+throw new Error("Access denied to cross-site requests");
+}
+return _6({url:(new _b._Url(_8.rootUrl,url))+"",secure:true});
+};
+_8.evaluate=function(_34){
+dojox.secure.capability.validate(_34,_d,{document:1,element:1});
+if(_34.match(/^\s*[\[\{]/)){
+var _35=eval("("+_34+")");
+}else{
+eval(_34);
+}
+};
+return {loadJS:function(url){
+_8.rootUrl=url;
+return _6({url:url,secure:true}).addCallback(function(_37){
+_30(_37,_7);
+});
+},loadHTML:function(url){
+_8.rootUrl=url;
+return _6({url:url,secure:true}).addCallback(function(_39){
+_7.innerHTML=_39;
+});
+},evaluate:function(_3a){
+return _8.evaluate(_3a);
+}};
+};
+})();
+dojox.secure._safeDojoFunctions=function(_3b,_3c){
+var _3d=["mixin","require","isString","isArray","isFunction","isObject","isArrayLike","isAlien","hitch","delegate","partial","trim","disconnect","subscribe","unsubscribe","Deferred","toJson","style","attr"];
+var doc=_3b.ownerDocument;
+var _3f=dojox.secure.unwrap;
+dojo.NodeList.prototype.addContent.safetyCheck=function(_40){
+_3c.safeHTML(_40);
+};
+dojo.NodeList.prototype.style.safetyCheck=function(_41,_42){
+if(_41=="behavior"){
+throw new Error("Can not set behavior");
+}
+_3c.safeCSS(_42);
+};
+dojo.NodeList.prototype.attr.safetyCheck=function(_43,_44){
+if(_44&&(_43=="src"||_43=="href"||_43=="style")){
+throw new Error("Illegal to set "+_43);
+}
+};
+var _45={query:function(_46,_47){
+return _3c(dojo.query(_46,_3f(_47||_3b)));
+},connect:function(el,_49){
+var obj=el;
+arguments[0]=_3f(el);
+if(obj!=arguments[0]&&_49.substring(0,2)!="on"){
+throw new Error("Invalid event name for element");
+}
+return dojo.connect.apply(dojo,arguments);
+},body:function(){
+return _3b;
+},byId:function(id){
+return _3b.ownerDocument.getElementById(id);
+},fromJson:function(str){
+dojox.secure.capability.validate(str,[],{});
+return dojo.fromJson(str);
+}};
+for(var i=0;i<_3d.length;i++){
+_45[_3d[i]]=dojo[_3d[i]];
+}
+return _45;
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/secure/sandbox.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Anchor.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Anchor.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Anchor.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Anchor.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,69 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.Anchor"]){
+dojo._hasResource["dojox.sketch.Anchor"]=true;
+dojo.provide("dojox.sketch.Anchor");
+dojo.require("dojox.gfx");
+(function(){
+var ta=dojox.sketch;
+ta.Anchor=function(an,id,_4){
+var _5=this;
+var _6=4;
+var _7=null;
+this.type=function(){
+return "Anchor";
+};
+this.annotation=an;
+this.id=id;
+this._key="anchor-"+ta.Anchor.count++;
+this.shape=null;
+this.isControl=(_4!=null)?_4:true;
+this.beginEdit=function(){
+this.annotation.beginEdit(ta.CommandTypes.Modify);
+};
+this.endEdit=function(){
+this.annotation.endEdit();
+};
+this.zoom=function(_8){
+if(this.shape){
+var rs=Math.floor(_6/_8);
+var _a=dojox.gfx.renderer=="vml"?1:1/_8;
+this.shape.setShape({x:an[id].x-rs,y:an[id].y-rs,width:rs*2,height:rs*2}).setStroke({color:"black",width:_a});
+}
+};
+this.setBinding=function(pt){
+an[id]={x:an[id].x+pt.dx,y:an[id].y+pt.dy};
+an.draw();
+an.drawBBox();
+};
+this.setUndo=function(){
+an.setUndo();
+};
+this.enable=function(){
+if(!an.shape){
+return;
+}
+an.figure._add(this);
+_7={x:an[id].x-_6,y:an[id].y-_6,width:_6*2,height:_6*2};
+this.shape=an.shape.createRect(_7).setFill([255,255,255,0.35]);
+this.shape.getEventSource().setAttribute("id",_5._key);
+this.shape.getEventSource().setAttribute("shape-rendering","crispEdges");
+this.zoom(an.figure.zoomFactor);
+};
+this.disable=function(){
+an.figure._remove(this);
+if(an.shape){
+an.shape.remove(this.shape);
+}
+this.shape=null;
+_7=null;
+};
+};
+ta.Anchor.count=0;
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Anchor.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Annotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Annotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Annotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Annotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,249 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.Annotation"]){
+dojo._hasResource["dojox.sketch.Annotation"]=true;
+dojo.provide("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+dojo.require("dojox.sketch._Plugin");
+(function(){
+var ta=dojox.sketch;
+dojo.declare("dojox.sketch.AnnotationTool",ta._Plugin,{onMouseDown:function(e){
+this._omd=true;
+},onMouseMove:function(e,_4){
+if(!this._omd){
+return;
+}
+if(this._cshape){
+this._cshape.setShape(_4);
+}else{
+this._cshape=this.figure.surface.createRect(_4).setStroke({color:"#999",width:1,style:"ShortDot"}).setFill([255,255,255,0.7]);
+this._cshape.getEventSource().setAttribute("shape-rendering","crispEdges");
+}
+},onMouseUp:function(e){
+if(!this._omd){
+return;
+}
+this._omd=false;
+var f=this.figure;
+if(this._cshape){
+f.surface.remove(this._cshape);
+delete this._cshape;
+}
+if(!(f._startPoint.x==e.pageX&&f._startPoint.y==e.pageY)){
+var _7=10;
+if(Math.max(_7,Math.abs(f._absEnd.x-f._start.x),Math.abs(f._absEnd.y-f._start.y))>_7){
+this._create(f._start,f._end);
+}
+}
+},_create:function(_8,_9){
+var f=this.figure;
+var _=f.nextKey();
+var a=new (this.annotation)(f,_);
+a.transform={dx:_8.x/f.zoomFactor,dy:_8.y/f.zoomFactor};
+a.end={x:_9.x/f.zoomFactor,y:_9.y/f.zoomFactor};
+if(a.control){
+a.control={x:Math.round((_9.x/2)/f.zoomFactor),y:Math.round((_9.y/2)/f.zoomFactor)};
+}
+f.onBeforeCreateShape(a);
+a.initialize();
+f.select(a);
+f.onCreateShape(a);
+f.history.add(ta.CommandTypes.Create,a);
+}});
+ta.Annotation=function(_d,id){
+this.id=this._key=id;
+this.figure=_d;
+this.mode=ta.Annotation.Modes.View;
+this.shape=null;
+this.boundingBox=null;
+this.hasAnchors=true;
+this.anchors={};
+this._properties={"stroke":{color:"blue",width:2},"font":{family:"Arial",size:16,weight:"bold"},"fill":"blue","label":""};
+if(this.figure){
+this.figure.add(this);
+}
+};
+var p=ta.Annotation.prototype;
+p.constructor=ta.Annotation;
+p.type=function(){
+return "";
+};
+p.getType=function(){
+return ta.Annotation;
+};
+p.onRemove=function(_10){
+this.figure.history.add(ta.CommandTypes.Delete,this,this.serialize());
+};
+p.property=function(_11,_12){
+var r;
+_11=_11.toLowerCase();
+if(this._properties[_11]!==undefined){
+r=this._properties[_11];
+}
+if(arguments.length>1){
+this._properties[_11]=_12;
+if(r!=_12){
+this.onPropertyChange(_11,r);
+}
+}
+return r;
+};
+p.onPropertyChange=function(_14,_15){
+};
+p.onCreate=function(){
+this.figure.history.add(ta.CommandTypes.Create,this);
+};
+p.onDblClick=function(e){
+var l=prompt("Set new text:",this.property("label"));
+if(l!==false){
+this.beginEdit(ta.CommandTypes.Modify);
+this.property("label",l);
+this.draw();
+this.endEdit();
+}
+};
+p.initialize=function(){
+};
+p.destroy=function(){
+};
+p.draw=function(){
+};
+p.apply=function(obj){
+};
+p.serialize=function(){
+};
+p.getBBox=function(){
+};
+p.beginEdit=function(_19){
+if(!this._type){
+this._type=_19||ta.CommandTypes.Move;
+this._prevState=this.serialize();
+}
+};
+p.endEdit=function(){
+if(this._prevState!=this.serialize()){
+this.figure.history.add(this._type,this,this._prevState);
+}
+this._type=this._prevState="";
+};
+p.calculate={slope:function(p1,p2){
+if(!(p1.x-p2.x)){
+return 0;
+}
+return ((p1.y-p2.y)/(p1.x-p2.x));
+},dx:function(p1,p2,dy){
+var s=this.slope(p1,p2);
+if(s==0){
+return s;
+}
+return dy/s;
+},dy:function(p1,p2,dx){
+return this.slope(p1,p2)*dx;
+}};
+p.drawBBox=function(){
+var r=this.getBBox();
+if(!this.boundingBox){
+this.boundingBox=this.shape.createRect(r).moveToBack().setStroke({color:"#999",width:1,style:"Dash"}).setFill([238,238,238,0.3]);
+this.boundingBox.getEventSource().setAttribute("id",this.id+"-boundingBox");
+this.boundingBox.getEventSource().setAttribute("shape-rendering","crispEdges");
+this.figure._add(this);
+}else{
+this.boundingBox.setShape(r);
+}
+};
+p.setBinding=function(pt){
+this.transform.dx+=pt.dx;
+this.transform.dy+=pt.dy;
+this.draw();
+};
+p.getTextBox=function(_25){
+var fp=this.property("font");
+var f={fontFamily:fp.family,fontSize:fp.size,fontWeight:fp.weight};
+if(_25){
+f.fontSize=Math.floor(f.fontSize/_25);
+}
+return dojox.gfx._base._getTextBox(this.property("label"),f);
+};
+p.setMode=function(m){
+if(this.mode==m){
+return;
+}
+this.mode=m;
+var _29="disable";
+if(m==ta.Annotation.Modes.Edit){
+_29="enable";
+}
+if(_29=="enable"){
+this.drawBBox();
+this.figure._add(this);
+}else{
+if(this.boundingBox){
+if(this.shape){
+this.shape.remove(this.boundingBox);
+}
+this.boundingBox=null;
+}
+}
+for(var p in this.anchors){
+this.anchors[p][_29]();
+}
+};
+p.zoom=function(pct){
+pct=pct||this.figure.zoomFactor;
+if(this.labelShape){
+var f=dojo.clone(this.property("font"));
+f.size=Math.ceil(f.size/pct)+"px";
+this.labelShape.setFont(f);
+}
+for(var n in this.anchors){
+this.anchors[n].zoom(pct);
+}
+if(dojox.gfx.renderer=="vml"){
+pct=1;
+}
+if(this.pathShape){
+var s=dojo.clone(this.property("stroke"));
+s.width=pct>1?s.width:Math.ceil(s.width/pct)+"px";
+this.pathShape.setStroke(s);
+}
+};
+p.writeCommonAttrs=function(){
+return "id=\""+this.id+"\" dojoxsketch:type=\""+this.type()+"\""+" transform=\"translate("+this.transform.dx+","+this.transform.dy+")\""+(this.data?(" ><![CDATA[data:"+dojo.toJson(this.data)+"]]"):"");
+};
+p.readCommonAttrs=function(obj){
+var i=0,cs=obj.childNodes,c;
+while((c=cs[i++])){
+if(c.nodeType==4){
+if(c.nodeValue.substr(0,11)=="properties:"){
+this._properties=dojo.fromJson(c.nodeValue.substr(11));
+}else{
+if(c.nodeValue.substr(0,5)=="data:"){
+this.data=dojo.fromJson(c.nodeValue.substr(5));
+}else{
+console.error("unknown CDATA node in node ",obj);
+}
+}
+}
+}
+if(obj.getAttribute("transform")){
+var t=obj.getAttribute("transform").replace("translate(","");
+var pt=t.split(",");
+this.transform.dx=parseFloat(pt[0],10);
+this.transform.dy=parseFloat(pt[1],10);
+}
+};
+ta.Annotation.Modes={View:0,Edit:1};
+ta.Annotation.register=function(_35,_36){
+var cls=ta[_35+"Annotation"];
+ta.registerTool(_35,function(p){
+dojo.mixin(p,{shape:_35,annotation:cls});
+return new (_36||ta.AnnotationTool)(p);
+});
+};
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Annotation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/DoubleArrowAnnotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/DoubleArrowAnnotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/DoubleArrowAnnotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/DoubleArrowAnnotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,178 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.DoubleArrowAnnotation"]){
+dojo._hasResource["dojox.sketch.DoubleArrowAnnotation"]=true;
+dojo.provide("dojox.sketch.DoubleArrowAnnotation");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+(function(){
+var ta=dojox.sketch;
+ta.DoubleArrowAnnotation=function(_2,id){
+ta.Annotation.call(this,_2,id);
+this.transform={dx:0,dy:0};
+this.start={x:0,y:0};
+this.control={x:100,y:-50};
+this.end={x:200,y:0};
+this.textPosition={x:0,y:0};
+this.textOffset=6;
+this.textYOffset=10;
+this.textAlign="middle";
+this.startRotation=0;
+this.endRotation=0;
+this.labelShape=null;
+this.pathShape=null;
+this.startArrow=null;
+this.startArrowGroup=null;
+this.endArrow=null;
+this.endArrowGroup=null;
+this.anchors.start=new ta.Anchor(this,"start");
+this.anchors.control=new ta.Anchor(this,"control");
+this.anchors.end=new ta.Anchor(this,"end");
+};
+ta.DoubleArrowAnnotation.prototype=new ta.Annotation;
+var p=ta.DoubleArrowAnnotation.prototype;
+p.constructor=ta.DoubleArrowAnnotation;
+p.type=function(){
+return "DoubleArrow";
+};
+p.getType=function(){
+return ta.DoubleArrowAnnotation;
+};
+p._rot=function(){
+var _5=this.control.y-this.start.y;
+var _6=this.control.x-this.start.x;
+this.startRotation=Math.atan2(_5,_6);
+_5=this.end.y-this.control.y;
+_6=this.end.x-this.control.x;
+this.endRotation=Math.atan2(_5,_6);
+};
+p._pos=function(){
+var _7=this.textOffset;
+if(this.control.y<this.end.y){
+_7*=-1;
+}else{
+_7+=this.textYOffset;
+}
+var ab={x:((this.control.x-this.start.x)*0.5)+this.start.x,y:((this.control.y-this.start.y)*0.5)+this.start.y};
+var bc={x:((this.end.x-this.control.x)*0.5)+this.control.x,y:((this.end.y-this.control.y)*0.5)+this.control.y};
+this.textPosition={x:((bc.x-ab.x)*0.5)+ab.x,y:(((bc.y-ab.y)*0.5)+ab.y)+_7};
+};
+p.apply=function(_a){
+if(!_a){
+return;
+}
+if(_a.documentElement){
+_a=_a.documentElement;
+}
+this.readCommonAttrs(_a);
+for(var i=0;i<_a.childNodes.length;i++){
+var c=_a.childNodes[i];
+if(c.localName=="text"){
+this.property("label",c.childNodes.length?c.childNodes[0].nodeValue:"");
+}else{
+if(c.localName=="path"){
+var d=c.getAttribute("d").split(" ");
+var s=d[0].split(",");
+this.start.x=parseFloat(s[0].substr(1),10);
+this.start.y=parseFloat(s[1],10);
+s=d[1].split(",");
+this.control.x=parseFloat(s[0].substr(1),10);
+this.control.y=parseFloat(s[1],10);
+s=d[2].split(",");
+this.end.x=parseFloat(s[0],10);
+this.end.y=parseFloat(s[1],10);
+var _f=this.property("stroke");
+var _10=c.getAttribute("style");
+var m=_10.match(/stroke:([^;]+);/);
+if(m){
+_f.color=m[1];
+this.property("fill",m[1]);
+}
+m=_10.match(/stroke-width:([^;]+);/);
+if(m){
+_f.width=m[1];
+}
+this.property("stroke",_f);
+}
+}
+}
+};
+p.initialize=function(obj){
+var _13=(ta.Annotation.labelFont)?ta.Annotation.labelFont:{family:"Times",size:"16px"};
+this.apply(obj);
+this._rot();
+this._pos();
+var rot=this.startRotation;
+var _15=dojox.gfx.matrix.rotate(rot);
+rot=this.endRotation;
+var _16=dojox.gfx.matrix.rotateAt(rot,this.end.x,this.end.y);
+this.shape=this.figure.group.createGroup();
+this.shape.getEventSource().setAttribute("id",this.id);
+this.pathShape=this.shape.createPath("M"+this.start.x+" "+this.start.y+"Q"+this.control.x+" "+this.control.y+" "+this.end.x+" "+this.end.y+" l0,0");
+this.startArrowGroup=this.shape.createGroup().setTransform({dx:this.start.x,dy:this.start.y});
+this.startArrowGroup.applyTransform(_15);
+this.startArrow=this.startArrowGroup.createPath();
+this.endArrowGroup=this.shape.createGroup().setTransform(_16);
+this.endArrow=this.endArrowGroup.createPath();
+this.labelShape=this.shape.createText({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label"),align:this.textAlign}).setFill(this.property("fill"));
+this.labelShape.getEventSource().setAttribute("id",this.id+"-labelShape");
+this.draw();
+};
+p.destroy=function(){
+if(!this.shape){
+return;
+}
+this.startArrowGroup.remove(this.startArrow);
+this.endArrowGroup.remove(this.endArrow);
+this.shape.remove(this.startArrowGroup);
+this.shape.remove(this.endArrowGroup);
+this.shape.remove(this.pathShape);
+this.shape.remove(this.labelShape);
+this.figure.group.remove(this.shape);
+this.shape=this.pathShape=this.labelShape=this.startArrowGroup=this.startArrow=this.endArrowGroup=this.endArrow=null;
+};
+p.draw=function(obj){
+this.apply(obj);
+this._rot();
+this._pos();
+var rot=this.startRotation;
+var _19=dojox.gfx.matrix.rotate(rot);
+rot=this.endRotation;
+var _1a=dojox.gfx.matrix.rotateAt(rot,this.end.x,this.end.y);
+this.shape.setTransform(this.transform);
+this.pathShape.setShape("M"+this.start.x+" "+this.start.y+" Q"+this.control.x+" "+this.control.y+" "+this.end.x+" "+this.end.y+" l0,0");
+this.startArrowGroup.setTransform({dx:this.start.x,dy:this.start.y}).applyTransform(_19);
+this.startArrow.setFill(this.property("fill"));
+this.endArrowGroup.setTransform(_1a);
+this.endArrow.setFill(this.property("fill"));
+this.labelShape.setShape({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label")}).setFill(this.property("fill"));
+this.zoom();
+};
+p.zoom=function(pct){
+if(this.startArrow){
+pct=pct||this.figure.zoomFactor;
+ta.Annotation.prototype.zoom.call(this,pct);
+var l=pct>1?20:Math.floor(20/pct),w=pct>1?5:Math.floor(5/pct),h=pct>1?3:Math.floor(3/pct);
+this.startArrow.setShape("M0,0 l"+l+",-"+w+" -"+h+","+w+" "+h+","+w+" Z");
+this.endArrow.setShape("M"+this.end.x+","+this.end.y+" l-"+l+",-"+w+" "+h+","+w+" -"+h+","+w+" Z");
+}
+};
+p.getBBox=function(){
+var x=Math.min(this.start.x,this.control.x,this.end.x);
+var y=Math.min(this.start.y,this.control.y,this.end.y);
+var w=Math.max(this.start.x,this.control.x,this.end.x)-x;
+var h=Math.max(this.start.y,this.control.y,this.end.y)-y;
+return {x:x,y:y,width:w,height:h};
+};
+p.serialize=function(){
+var s=this.property("stroke");
+return "<g "+this.writeCommonAttrs()+">"+"<path style=\"stroke:"+s.color+";stroke-width:"+s.width+";fill:none;\" d=\""+"M"+this.start.x+","+this.start.y+" "+"Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+"\" />"+"<g transform=\"translate("+this.start.x+","+this.start.y+") "+"rotate("+(Math.round((this.startRotation*(180/Math.PI))*Math.pow(10,4))/Math.pow(10,4))+")\">"+"<path style=\"fill:"+s.color+";\" d=\"M0,0 l20,-5, -3,5, 3,5 Z\" />"+"</g>"+"<g transform=\"rotate("+(Math.round((this.endRotation*(180/Math.PI))*Math.pow(10,4))/Math.pow(10,4))+", "+this.end.x+", "+this.end.y+")\">"+"<path style=\"fill:"+s.color+";\" d=\"M"+this.end.x+","+this.end.y+" l-20,-5, 3,5, -3,5 Z\" />"+"</g>"+"<text style=\"fill:"+s.color+";text-anchor:"+this.textAlign+"\" font-weight=\"bold\" "+"x=\""+this.textPosition.x+"\" "+"y=\""+this.textPosition.y+"\">"+this.property("label")+"</text>"+"</g>";
+};
+ta.Annotation.register("DoubleArrow");
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/DoubleArrowAnnotation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Figure.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Figure.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Figure.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Figure.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,462 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.Figure"]){
+dojo._hasResource["dojox.sketch.Figure"]=true;
+dojo.provide("dojox.sketch.Figure");
+dojo.experimental("dojox.sketch");
+dojo.require("dojox.gfx");
+dojo.require("dojox.sketch.UndoStack");
+(function(){
+var ta=dojox.sketch;
+ta.tools={};
+ta.registerTool=function(_2,fn){
+ta.tools[_2]=fn;
+};
+ta.Figure=function(_4){
+var _5=this;
+this.annCounter=1;
+this.shapes=[];
+this.image=null;
+this.imageSrc=null;
+this.size={w:0,h:0};
+this.surface=null;
+this.group=null;
+this.node=null;
+this.zoomFactor=1;
+this.tools=null;
+this.obj={};
+dojo.mixin(this,_4);
+this.selected=[];
+this.hasSelections=function(){
+return this.selected.length>0;
+};
+this.isSelected=function(_6){
+for(var i=0;i<_5.selected.length;i++){
+if(_5.selected[i]==_6){
+return true;
+}
+}
+return false;
+};
+this.select=function(_8){
+if(!_5.isSelected(_8)){
+_5.clearSelections();
+_5.selected=[_8];
+}
+_8.setMode(ta.Annotation.Modes.View);
+_8.setMode(ta.Annotation.Modes.Edit);
+};
+this.deselect=function(_9){
+var _a=-1;
+for(var i=0;i<_5.selected.length;i++){
+if(_5.selected[i]==_9){
+_a=i;
+break;
+}
+}
+if(_a>-1){
+_9.setMode(ta.Annotation.Modes.View);
+_5.selected.splice(_a,1);
+}
+return _9;
+};
+this.clearSelections=function(){
+for(var i=0;i<_5.selected.length;i++){
+_5.selected[i].setMode(ta.Annotation.Modes.View);
+}
+_5.selected=[];
+};
+this.replaceSelection=function(n,o){
+if(!_5.isSelected(o)){
+_5.select(n);
+return;
+}
+var _f=-1;
+for(var i=0;i<_5.selected.length;i++){
+if(_5.selected[i]==o){
+_f=i;
+break;
+}
+}
+if(_f>-1){
+_5.selected.splice(_f,1,n);
+}
+};
+this._c=null;
+this._ctr=null;
+this._lp=null;
+this._action=null;
+this._prevState=null;
+this._startPoint=null;
+this._ctool=null;
+this._start=null;
+this._end=null;
+this._absEnd=null;
+this._cshape=null;
+this._dblclick=function(e){
+var o=_5._fromEvt(e);
+if(o){
+_5.onDblClickShape(o,e);
+}
+};
+this._keydown=function(e){
+var _14=false;
+if(e.ctrlKey){
+if(e.keyCode===90){
+_5.undo();
+_14=true;
+}else{
+if(e.keyCode===89){
+_5.redo();
+_14=true;
+}
+}
+}
+if(e.keyCode===46||e.keyCode===8){
+_5._delete(_5.selected);
+_14=true;
+}
+if(_14){
+dojo.stopEvent(e);
+}
+};
+this._md=function(e){
+var o=_5._fromEvt(e);
+_5._startPoint={x:e.pageX,y:e.pageY};
+_5._ctr=dojo._abs(_5.node);
+_5._ctr={x:_5._ctr.x,y:_5._ctr.y};
+var X=e.clientX-_5._ctr.x,Y=e.clientY-_5._ctr.y;
+_5._lp={x:X,y:Y};
+_5._start={x:X,y:Y};
+_5._end={x:X,y:Y};
+_5._absEnd={x:X,y:Y};
+if(!o){
+_5.clearSelections();
+_5._ctool.onMouseDown(e);
+}else{
+if(o.type&&o.type()!="Anchor"){
+if(!_5.isSelected(o)){
+_5.select(o);
+_5._sameShapeSelected=false;
+}else{
+_5._sameShapeSelected=true;
+}
+}
+o.beginEdit();
+_5._c=o;
+}
+};
+this._mm=function(e){
+if(!_5._ctr){
+return;
+}
+var x=e.clientX-_5._ctr.x;
+var y=e.clientY-_5._ctr.y;
+var dx=x-_5._lp.x;
+var dy=y-_5._lp.y;
+_5._absEnd={x:x,y:y};
+if(_5._c){
+_5._c.setBinding({dx:dx/_5.zoomFactor,dy:dy/_5.zoomFactor});
+_5._lp={x:x,y:y};
+}else{
+_5._end={x:dx,y:dy};
+var _1e={x:Math.min(_5._start.x,_5._absEnd.x),y:Math.min(_5._start.y,_5._absEnd.y),width:Math.abs(_5._start.x-_5._absEnd.x),height:Math.abs(_5._start.y-_5._absEnd.y)};
+if(_1e.width&&_1e.height){
+_5._ctool.onMouseMove(e,_1e);
+}
+}
+};
+this._mu=function(e){
+if(_5._c){
+_5._c.endEdit();
+}else{
+_5._ctool.onMouseUp(e);
+}
+_5._c=_5._ctr=_5._lp=_5._action=_5._prevState=_5._startPoint=null;
+_5._cshape=_5._start=_5._end=_5._absEnd=null;
+};
+this.initUndoStack();
+};
+var p=ta.Figure.prototype;
+p.initUndoStack=function(){
+this.history=new ta.UndoStack(this);
+};
+p.setTool=function(t){
+this._ctool=t;
+};
+p._delete=function(arr,_23){
+for(var i=0;i<arr.length;i++){
+arr[i].setMode(ta.Annotation.Modes.View);
+arr[i].destroy(_23);
+this.remove(arr[i]);
+this._remove(arr[i]);
+if(!_23){
+arr[i].onRemove();
+}
+}
+arr.splice(0,arr.length);
+};
+p.onDblClickShape=function(_25,e){
+if(_25["onDblClick"]){
+_25.onDblClick(e);
+}
+};
+p.onCreateShape=function(_27){
+};
+p.onBeforeCreateShape=function(_28){
+};
+p.initialize=function(_29){
+this.node=_29;
+this.surface=dojox.gfx.createSurface(_29,this.size.w,this.size.h);
+this.group=this.surface.createGroup();
+this._cons=[];
+var es=this.surface.getEventSource();
+this._cons.push(dojo.connect(es,"ondraggesture",dojo.stopEvent),dojo.connect(es,"ondragenter",dojo.stopEvent),dojo.connect(es,"ondragover",dojo.stopEvent),dojo.connect(es,"ondragexit",dojo.stopEvent),dojo.connect(es,"ondragstart",dojo.stopEvent),dojo.connect(es,"onselectstart",dojo.stopEvent),dojo.connect(es,"onmousedown",this._md),dojo.connect(es,"onmousemove",this._mm),dojo.connect(es,"onmouseup",this._mu),dojo.connect(es,"onclick",this,"onClick"),dojo.connect(es,"ondblclick",this._dblclick),dojo.connect(es.ownerDocument,"onkeydown",this._keydown));
+this.image=this.group.createImage({width:this.size.w,height:this.size.h,src:this.imageSrc});
+};
+p.destroy=function(_2b){
+if(!this.node){
+return;
+}
+if(!_2b){
+if(this.history){
+this.history.destroy();
+}
+if(this._subscribed){
+dojo.unsubscribe(this._subscribed);
+delete this._subscribed;
+}
+}
+dojo.forEach(this._cons,dojo.disconnect);
+this._cons=[];
+dojo.empty(this.node);
+this.group=this.surface=null;
+this.obj={};
+this.shapes=[];
+};
+p.nextKey=function(){
+return "annotation-"+this.annCounter++;
+};
+p.draw=function(){
+};
+p.zoom=function(pct){
+this.zoomFactor=pct/100;
+var w=this.size.w*this.zoomFactor;
+var h=this.size.h*this.zoomFactor;
+this.surface.setDimensions(w,h);
+this.group.setTransform(dojox.gfx.matrix.scale(this.zoomFactor,this.zoomFactor));
+for(var i=0;i<this.shapes.length;i++){
+this.shapes[i].zoom(this.zoomFactor);
+}
+};
+p.getFit=function(){
+var wF=(this.node.parentNode.clientWidth-5)/this.size.w;
+var hF=(this.node.parentNode.clientHeight-5)/this.size.h;
+return Math.min(wF,hF)*100;
+};
+p.unzoom=function(){
+this.zoomFactor=1;
+this.surface.setDimensions(this.size.w,this.size.h);
+this.group.setTransform();
+};
+p._add=function(obj){
+this.obj[obj._key]=obj;
+};
+p._remove=function(obj){
+if(this.obj[obj._key]){
+delete this.obj[obj._key];
+}
+};
+p._get=function(key){
+if(key&&key.indexOf("bounding")>-1){
+key=key.replace("-boundingBox","");
+}else{
+if(key&&key.indexOf("-labelShape")>-1){
+key=key.replace("-labelShape","");
+}
+}
+return this.obj[key];
+};
+p._keyFromEvt=function(e){
+var key=e.target.id+"";
+if(key.length==0){
+var p=e.target.parentNode;
+var _38=this.surface.getEventSource();
+while(p&&p.id.length==0&&p!=_38){
+p=p.parentNode;
+}
+key=p.id;
+}
+return key;
+};
+p._fromEvt=function(e){
+return this._get(this._keyFromEvt(e));
+};
+p.add=function(_3a){
+for(var i=0;i<this.shapes.length;i++){
+if(this.shapes[i]==_3a){
+return true;
+}
+}
+this.shapes.push(_3a);
+return true;
+};
+p.remove=function(_3c){
+var idx=-1;
+for(var i=0;i<this.shapes.length;i++){
+if(this.shapes[i]==_3c){
+idx=i;
+break;
+}
+}
+if(idx>-1){
+this.shapes.splice(idx,1);
+}
+return _3c;
+};
+p.get=function(id){
+for(var i=0;i<this.shapes.length;i++){
+if(this.shapes[i].id==id){
+return this.shapes[i];
+}
+}
+return null;
+};
+p.convert=function(ann,t){
+var _43=t+"Annotation";
+if(!ta[_43]){
+return;
+}
+var _44=ann.type(),id=ann.id,_46=ann.label,_47=ann.mode,_48=ann.tokenId;
+var _49,end,_4b,_4c;
+switch(_44){
+case "Preexisting":
+case "Lead":
+_4c={dx:ann.transform.dx,dy:ann.transform.dy};
+_49={x:ann.start.x,y:ann.start.y};
+end={x:ann.end.x,y:ann.end.y};
+var cx=end.x-((end.x-_49.x)/2);
+var cy=end.y-((end.y-_49.y)/2);
+_4b={x:cx,y:cy};
+break;
+case "SingleArrow":
+case "DoubleArrow":
+_4c={dx:ann.transform.dx,dy:ann.transform.dy};
+_49={x:ann.start.x,y:ann.start.y};
+end={x:ann.end.x,y:ann.end.y};
+_4b={x:ann.control.x,y:ann.control.y};
+break;
+case "Underline":
+_4c={dx:ann.transform.dx,dy:ann.transform.dy};
+_49={x:ann.start.x,y:ann.start.y};
+_4b={x:_49.x+50,y:_49.y+50};
+end={x:_49.x+100,y:_49.y+100};
+break;
+case "Brace":
+}
+var n=new ta[_43](this,id);
+if(n.type()=="Underline"){
+n.transform={dx:_4c.dx+_49.x,dy:_4c.dy+_49.y};
+}else{
+if(n.transform){
+n.transform=_4c;
+}
+if(n.start){
+n.start=_49;
+}
+}
+if(n.end){
+n.end=end;
+}
+if(n.control){
+n.control=_4b;
+}
+n.label=_46;
+n.token=dojo.lang.shallowCopy(ann.token);
+n.initialize();
+this.replaceSelection(n,ann);
+this._remove(ann);
+this.remove(ann);
+ann.destroy();
+n.setMode(_47);
+};
+p.setValue=function(_50){
+var obj=dojox.xml.DomParser.parse(_50);
+var _52=this.node;
+this.load(obj,_52);
+this.zoom(this.zoomFactor*100);
+};
+p.load=function(obj,n){
+if(this.surface){
+this.destroy(true);
+}
+var _55=obj.documentElement;
+this.size={w:parseFloat(_55.getAttribute("width"),10),h:parseFloat(_55.getAttribute("height"),10)};
+var g=_55.childrenByName("g")[0];
+var img=g.childrenByName("image")[0];
+this.imageSrc=img.getAttribute("xlink:href");
+this.initialize(n);
+var ann=g.childrenByName("g");
+for(var i=0;i<ann.length;i++){
+this._loadAnnotation(ann[i]);
+}
+if(this._loadDeferred){
+this._loadDeferred.callback(this);
+this._loadDeferred=null;
+}
+this.onLoad();
+};
+p.onLoad=function(){
+};
+p.onClick=function(){
+};
+p._loadAnnotation=function(obj){
+var _5b=obj.getAttribute("dojoxsketch:type")+"Annotation";
+if(ta[_5b]){
+var a=new ta[_5b](this,obj.id);
+a.initialize(obj);
+this.nextKey();
+a.setMode(ta.Annotation.Modes.View);
+this._add(a);
+return a;
+}
+return null;
+};
+p.onUndo=function(){
+};
+p.onBeforeUndo=function(){
+};
+p.onRedo=function(){
+};
+p.onBeforeRedo=function(){
+};
+p.undo=function(){
+if(this.history){
+this.onBeforeUndo();
+this.history.undo();
+this.onUndo();
+}
+};
+p.redo=function(){
+if(this.history){
+this.onBeforeRedo();
+this.history.redo();
+this.onRedo();
+}
+};
+p.serialize=function(){
+var s="<svg xmlns=\"http://www.w3.org/2000/svg\" "+"xmlns:xlink=\"http://www.w3.org/1999/xlink\" "+"xmlns:dojoxsketch=\"http://dojotoolkit.org/dojox/sketch\" "+"width=\""+this.size.w+"\" height=\""+this.size.h+"\">"+"<g>"+"<image xlink:href=\""+this.imageSrc+"\" x=\"0\" y=\"0\" width=\""+this.size.w+"\" height=\""+this.size.h+"\" />";
+for(var i=0;i<this.shapes.length;i++){
+s+=this.shapes[i].serialize();
+}
+s+="</g></svg>";
+return s;
+};
+p.getValue=p.serialize;
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Figure.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/LeadAnnotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/LeadAnnotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/LeadAnnotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/LeadAnnotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,151 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.LeadAnnotation"]){
+dojo._hasResource["dojox.sketch.LeadAnnotation"]=true;
+dojo.provide("dojox.sketch.LeadAnnotation");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+(function(){
+var ta=dojox.sketch;
+ta.LeadAnnotation=function(_2,id){
+ta.Annotation.call(this,_2,id);
+this.transform={dx:0,dy:0};
+this.start={x:0,y:0};
+this.control={x:100,y:-50};
+this.end={x:200,y:0};
+this.textPosition={x:0,y:0};
+this.textOffset=4;
+this.textAlign="middle";
+this.textYOffset=10;
+this.pathShape=null;
+this.labelShape=null;
+this.anchors.start=new ta.Anchor(this,"start");
+this.anchors.control=new ta.Anchor(this,"control");
+this.anchors.end=new ta.Anchor(this,"end");
+};
+ta.LeadAnnotation.prototype=new ta.Annotation;
+var p=ta.LeadAnnotation.prototype;
+p.constructor=ta.LeadAnnotation;
+p.type=function(){
+return "Lead";
+};
+p.getType=function(){
+return ta.LeadAnnotation;
+};
+p._pos=function(){
+var _5=this.textOffset,x=0,y=0;
+var _8=this.calculate.slope(this.control,this.end);
+if(Math.abs(_8)>=1){
+x=this.end.x+this.calculate.dx(this.control,this.end,_5);
+if(this.control.y>this.end.y){
+y=this.end.y-_5;
+}else{
+y=this.end.y+_5+this.textYOffset;
+}
+}else{
+if(_8==0){
+x=this.end.x+_5;
+y=this.end.y+this.textYOffset;
+}else{
+if(this.start.x>this.end.x){
+x=this.end.x-_5;
+this.textAlign="end";
+}else{
+x=this.end.x+_5;
+this.textAlign="start";
+}
+if(this.start.y<this.end.y){
+y=this.end.y+this.calculate.dy(this.control,this.end,_5)+this.textYOffset;
+}else{
+y=this.end.y+this.calculate.dy(this.control,this.end,-_5);
+}
+}
+}
+this.textPosition={x:x,y:y};
+};
+p.apply=function(_9){
+if(!_9){
+return;
+}
+if(_9.documentElement){
+_9=_9.documentElement;
+}
+this.readCommonAttrs(_9);
+for(var i=0;i<_9.childNodes.length;i++){
+var c=_9.childNodes[i];
+if(c.localName=="text"){
+this.property("label",c.childNodes.length?c.childNodes[0].nodeValue:"");
+}else{
+if(c.localName=="path"){
+var d=c.getAttribute("d").split(" ");
+var s=d[0].split(",");
+this.start.x=parseFloat(s[0].substr(1),10);
+this.start.y=parseFloat(s[1],10);
+s=d[1].split(",");
+this.control.x=parseFloat(s[0].substr(1),10);
+this.control.y=parseFloat(s[1],10);
+s=d[2].split(",");
+this.end.x=parseFloat(s[0],10);
+this.end.y=parseFloat(s[1],10);
+var _e=this.property("stroke");
+var _f=c.getAttribute("style");
+var m=_f.match(/stroke:([^;]+);/);
+if(m){
+_e.color=m[1];
+this.property("fill",m[1]);
+}
+m=_f.match(/stroke-width:([^;]+);/);
+if(m){
+_e.width=m[1];
+}
+this.property("stroke",_e);
+}
+}
+}
+};
+p.initialize=function(obj){
+this.apply(obj);
+this._pos();
+this.shape=this.figure.group.createGroup();
+this.shape.getEventSource().setAttribute("id",this.id);
+this.pathShape=this.shape.createPath("M"+this.start.x+","+this.start.y+" Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+" l0,0");
+this.labelShape=this.shape.createText({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label"),align:this.textAlign});
+this.labelShape.getEventSource().setAttribute("id",this.id+"-labelShape");
+this.draw();
+};
+p.destroy=function(){
+if(!this.shape){
+return;
+}
+this.shape.remove(this.pathShape);
+this.shape.remove(this.labelShape);
+this.figure.group.remove(this.shape);
+this.shape=this.pathShape=this.labelShape=null;
+};
+p.getBBox=function(){
+var x=Math.min(this.start.x,this.control.x,this.end.x);
+var y=Math.min(this.start.y,this.control.y,this.end.y);
+var w=Math.max(this.start.x,this.control.x,this.end.x)-x;
+var h=Math.max(this.start.y,this.control.y,this.end.y)-y;
+return {x:x,y:y,width:w,height:h};
+};
+p.draw=function(obj){
+this.apply(obj);
+this._pos();
+this.shape.setTransform(this.transform);
+this.pathShape.setShape("M"+this.start.x+","+this.start.y+" Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+" l0,0");
+this.labelShape.setShape({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label")}).setFill(this.property("fill"));
+this.zoom();
+};
+p.serialize=function(){
+var _17=this.property("stroke");
+return "<g "+this.writeCommonAttrs()+">"+"<path style=\"stroke:"+_17.color+";stroke-width:"+_17.width+";fill:none;\" d=\""+"M"+this.start.x+","+this.start.y+" "+"Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+"\" />"+"<text style=\"fill:"+_17.color+";text-anchor:"+this.textAlign+"\" font-weight=\"bold\" "+"x=\""+this.textPosition.x+"\" "+"y=\""+this.textPosition.y+"\">"+this.property("label")+"</text>"+"</g>";
+};
+ta.Annotation.register("Lead");
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/LeadAnnotation.js
------------------------------------------------------------------------------
    svn:eol-style = native