DB.DBA.VHOST_REMOVE (
	 lhost=>'192.168.11.2:80',
	 vhost=>'www.openlinksw.com',
	 lpath=>'/schemas/external/googlevocab'
);
DB.DBA.VHOST_REMOVE (
	 lhost=>'192.168.11.2:80',
	 vhost=>'www.openlinksw.com',
	 lpath=>'/rdfdesc'
);

DB.DBA.VHOST_DEFINE (
	 lhost=>'192.168.11.2:80',
	 vhost=>'www.openlinksw.com',
	 lpath=>'/schemas/external/googlevocab',
	 ppath=>'/DAV/schemas/googlevoc.n3',
	 is_dav=>1,
	 vsp_user=>'dba',
	 opts=>vector ('url_rewrite', 'gv_rule_list')
);

DB.DBA.VHOST_DEFINE (
	 lhost=>'192.168.11.2:80',
	 vhost=>'www.openlinksw.com',
	 lpath=>'/rdfdesc',
	 ppath=>'/DAV/VAD/rdf_mappers/rdfdesc/',
	 is_dav=>1,
	 vsp_user=>'dba'
);


    
DB.DBA.URLREWRITE_CREATE_RULELIST ( 'gv_rule_list', 1, 
    	vector (
	  	'gv_rule_1',
	  	'gv_rule_2',
	  	'gv_rule_3',
	  	'gv_rule_4'
		)
	);

DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 
'gv_rule_1', 1, '/schemas/external/googlevocab/(.*)\x24', vector ('par1'), 0, 
'/rdfdesc/description.vsp?g=http%%3A%%2F%%2Fwww.openlinksw.com%%2Fschemas%%2Fexternal%%2Fgooglevocab%%2F%U&p=googlevoc' , 
vector ('par1'), NULL, NULL, 2, 0);

DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 
'gv_rule_2', 1, '/schemas/external/googlevocab/([^\\.]*)\x24', vector ('par1'), 0, 
'/schemas/external/googlevocab/%U.xml' , 
vector ('par1'), NULL, 'application/rdf.xml', 2, 303);

DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 
'gv_rule_3', 1, '/schemas/external/googlevocab/([^\\.]*)\x24', vector ('par1'), 0, 
'/schemas/external/googlevocab/%U.n3' , 
vector ('par1'), NULL, 'text/rdf.n3', 2, 303);

DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 
'gv_rule_4', 1, '/schemas/external/googlevocab/([^\\.]*)\\.(rdf|xml|n3)\x24', vector ('par1'), 0, 
'/sparql?query='||
'describe%%20%%3Chttp%%3A%%2F%%2Fwww.openlinksw.com%%2Fschemas%%2Fexternal%%2Fgooglevocab%%2F%U%%3E&format=%U' , 
vector ('par1', '*accept*'), NULL, '(text/rdf.n3)|(application/rdf.xml)', 2, 0);


create procedure googlevoc_get_proxy_iri (in x any)
{
  return x;
};
