Adding extra folders to distribute in the DBpedia plugin

In order to make extra folders accessible via http, the following files need to be adapted:

  • the makefiles
  • dbpedia_init.sql
  • dbpedia_local.sql

Suppose you add an extra sibling directory of the “statics” directory and want it to have the same behavior (publicly accessible via http), you need to

  • add it to the list of EXTRA_DIST in the makefiles
  • create the folders in make_vad.sh:
directory_init() {
...
mkdir vad/vsp/dbpedia/js
...
}
  • add the path to vhost in dbpedia_local.sql, in the same way as “statics” is done. It looks something like:
DB.DBA.VHOST_REMOVE (lpath=>'/js');
DB.DBA.VHOST_DEFINE (lpath=>'/js', ppath=>registry_get('_dbpedia_path_')||'js/',
    is_dav=>atoi (registry_get('_dbpedia_dav_')));
  • add the path to vhost in dbpedia_init.sql, in the same way as “statics” is added. It looks something like:
DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/js');
...
...
DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/js',
     ppath=>'/DAV/VAD/dbpedia/js/',
     is_dav=>1
);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s