wiki:AntoinePuget

Version 5 (modified by joshuadf, 7 years ago) (diff)

--

Spatial Query Processor

Real more about the project: http://sig.biostr.washington.edu/projects/spatial-symbolic/index.html

Web service: http://axon.biostr.washington.edu:8080/QueryProcessor/Test?category=load

The web demo interface is currently at http://axon.biostr.washington.edu/application/

September 2011 notes from Joshua

Basically I did this on axon:

1. A while back I loaded your spatial_complete_rdf_3 into MySQL with details from your/Todd's ds-config.ttl
which I put in /usr/share/tomcat5/
I think some VSparql queries have been directly access this RDF store to perform spatial queries.

2. I created tomcat webapp "QueryProcessor" that's your latest "Server" files. The structure lists loads:
http://axon.biostr.washington.edu:8080/QueryProcessor/Test?category=load
I noticed it also prints the Sparql queries to /var/log/tomcat5/catalina.out

3. Unzipped your OpenLaszlo app to /var/www/html/application from your "solo_deploy_Jul_16_2011_23_22_59.zip" file:
I had to clear my browser cache in Chrome to get the new version to load, but now the demo works great.
http://axon.biostr.washington.edu/application/

I used your sample query of Object "Lower lobe of left lung", Relation "posterior" from the "help" link:
http://sig.biostr.washington.edu/projects/spatial-symbolic/application/index.html

Old notes from Antoine, please ask Joshua if you have any questions.

Date: Sun, 20 Jul 2008 19:54:39 -0700
From: "Antoine Puget" <antoine puget at gmail>
To: "Joshua Daniel Franklin" <joshuadf at u>
Subject: Server - help

Hi Joshua,

here is some help so that you can set up all the different applications for
the web page. Eclipse on the atlas machine is set up with all the eclipse
projects you need (worskpace2) if you want to have a look.

The code for the web pages is in the folder: C:\Documents and
Settings\apuget\Desktop\xampp\htdocs\main on atlas.
The code for the Eclipse projects is in the folder: C:\Documents and
Settings\apuget\Desktop\Projects-Antoine Puget\Eclipse projects

Two databases are needed :

   -  The first one for the applet is named 'spatial_sql' on the mysql
   server installed on Atlas. I have no copy of this one since I have a
   Microsoft Access database and I used the software DBTOOLS to convert it to a
   MySQL database. The MS Access db is the file Points-VirtualSoldier.mdb in
   the folder C:\Documents and Settings\apuget\Desktop\Projects-Antoine
   Puget\Datasources. But, of course, you can export it from the current MySQL
   database. I'm using Virtual Soldier dataset for the database but I'm using
   the Voxel Man data for the second database.
   - The other database needed for the symbolic-spatial query engine is a
   jena database. You can get it from the file: spatial_VoxelMan_Jena.sql in
   the folder C:\Documents and Settings\apuget\Desktop\Projects-Antoine
   Puget\Datasources. On atlas, this database is named 'spatial'.


The web page applet.html deals with the applet and as you may notice if you
have a look at the code, the applet uses the jar files:
projectmaster.jar,mysql-connector-java-5.1.6-bin.jar in the folder
../applet.

   - projectmaster.jar is a jar file of the Eclipse project named 'Spatial
   Query Processor' in the folder C:\Documents and
   Settings\apuget\Desktop\Projects-Antoine Puget\Eclipse projects\Spatial
   Query Processor.


   - In the project, you can set up which database you are using:
   data/Database.java. By setting the variable name _dbms, you can use either
   SQL or Access. The jar file is just the project Spatial Query Processor with
   no main class. The project is set up to use MySQL but you still need to
   define the name of the table, you can do that in the method 'getConnection'.
   Its argument is the host. Thanks to the method getCodeBase().getHost() in
   the class applet/Applet, the program finds the host itself and there is no
   need to define any IP address.

The server (web service) that accepts queries is an Eclipse Tomcat project
called Server. The code is available at C:\Documents and
Settings\apuget\Desktop\Projects-Antoine Puget\Eclipse projects. I just run
the plugin Tomcat with Eclipse and everything is configured. Important: the
configuration file ds-config.ttl MUST BE in the main directory of Tomcat
(i.e. C:\Program Files\apache-tomcat-6.0.16 on the machine) so that queries
to databases are possible.

The OpenLazslo web application. You need to hard code the address of the
server (web service). It is done at the beginning of the file: C:\Program
Files\OpenLaszlo Server
4.0.12\Server\lps-4.0.12\my-apps\master\webinterface.lzx. (Openlazslo file)
There is the address of the web service and the address of the web page for
the help of the tool. I tried not to hard code the IP address but I didn't
succeed. Once you hard coded both addresses, you need to compile the code.
To do that, you visualize the web page:make sure the OpenLaszlo server is
running and then with your web browser, access the web page:
http://127.0.0.1:8080/lps-4.0.12/my-apps/master/webinterface.lzx . At the
bottom of the web page, you can compile the code with Solo. You will be
asked what to do, you can save the zip folder and inside, there will be a
folder lps, a file named webinterface.lzx.lzr=swf8.swf, another file named
webinterface.lzx.lzr=swf7.swf and the html file. Those are the files you
need for a web page and I put them in the folder C:\Documents and
Settings\apuget\Desktop\xampp\htdocs\main\webapplication.

I hope that will be helpful. If you have any questions or if it is not
clear, please let me know.

Thanks,
Antoine.

The code mentioned above is at http://trac.biostr.washington.edu/trac/browser/antoine-thesis-code