 		public static const PARAMS_CKAN_FORMAT:String = 'ckan_format';
 		public static const PARAMS_CKAN_FIELD:String = 'ckan_field';
 		public static const DATASTORE_FORMAT:String = 'ckan_datastore';
+		
+		public function getBaseURL():String
+		{
+			var baseurl:String = this.url.value || '';
+			var i:int = baseurl.lastIndexOf('/api');
+			if (i >= 0)
+				baseurl = baseurl.substr(0, i);
+			if (baseurl.charAt(baseurl.length - 1) != '/')
+				baseurl += '/';
+			return baseurl;
+		}
+		public function getFullURL(relativeURL:String):String
+		{
+			return URLUtil.getFullURL(getBaseURL(), relativeURL);
+		}
 		
 		/**
 		 * @private

				{
					node.action = DATASTORE_SEARCH;
					node.metadata = resource;
					node.params = {"resource_id": resource['id'], "limit": 0};
				}
				else
				{

			var cmd:String = 'api/' + source.apiVersion.value + '/rest/' + action.split('_')[0];
			if (params && params.hasOwnProperty('id'))
				cmd += '/' + params['id'];
			request = new URLRequest(source.getFullURL(cmd));
		}
		return request;
	}
