SVOCat Documentation

Version 2.2-nocoor, Last change: March 30, 2021; Author: Carlos Rodrigo

HomeDownloadDocumentationExamplesCreditsHelp-Desk
1. Introduction
2. Download
    2.1. Extract
    2.2. Permissions
3. The files
4. Example
5. Configure
    5.1. First
    5.2. Project
    5.3. Mysql
    5.4. Web
    5.5. VO options
    5.6. Fields
    5.7. Photometry
    5.8. Search Opts.
    5.9. File Paths
    5.10. Scripts
    5.11. Registry
    5.12. Spectra
    5.13. Links
    5.14. References
6. Edit
7. Web Design
    7.1. style.css
    7.2. Colors
    7.3. header.php
    7.4. footer.php
Previous   Next

Example catalogue

When you download SVOCat you get it preconfigured with the properties of an example catalogue.

The idea is that you can get, as fast as posible, a working version of SVOCat so that you can see it at work and get tips on how to configure your own catalogue.

This example catalogue is made using a very small subset of the SVO Filter Profile Service (but only a few filters and properties).

As a very brief summary:

In the work/exfilters.csv file you have the data in csv format.

These data are equivalent to a table with 42 lines and 8 columns.

Create a MySQL database (vocats)

We need to create a MySQL table with that structure and then load the data into it (you could want to take a look at the MySQL database configuration).

First, we need a database that you must create in your own way. A typical command to create a database is:

mysqladmin -u root -p create vocats

If you decide to use other name for the database, please go to the administration application and change it too in the Mysql section.

Create a MySQL user (mycatuser)

Creating a mysql user is a little more tricky. If you don't know how to do it you should probably ask for some help from your system administrator.

In any case, we give you a simplified example.

You first open the MySQL command line interface:

mysql -u root -p

Then, under the mysql prompt, you select the "mysql" database:

mysql> use mysql;

then you create a user named "mycatuser" with all privileges in the 'vocats' database and password "mycatp@ss"

mysql> grant all privileges on vocats.* to 'mycatuser'@'locahost' identified by 'mycatp@ss';

and you exit the mysql interface:

mysql> quit;

But take this as just a tip. You maybe want to be more restrictive about catuser permissions.

Create a MySQL table (exfilters)

We now must create a table to contain the catalogue data. In the work/ folder you have a file work/create_table.my with the mysql instructions to create a table named "exfilters".

you can use this file to create the table in the database as:

cd /var/www/catalogues/exfilters/
mysql -u mycatuser -p vocats < work/create_table.my

(where "mycatuser" must be a mysql-user allowed to create a table).

You can also create the table by your own means (using phpMyAdmin, by the command line mysql interface or by any other way that you are used to). Just use the same table definition shown above.

Load data into the table

The last step is loading the catalogue data into the table.

To do this you have work/exfilters.csv.my which is a quite ugly file with instructions to load the data line by line:

You can use this script to load the data in the table as:

cd /var/www/catalogues/mycat/work/
mysql -u catuser -p vocats < exfilters.csv.my

If everything has gone right, you should have now a database table containing the catalogue data. You should be able to go to:

http://www.mylab.org/catalogues/exfilters/

where, remember, http://www.mylab.org/catalogues/exfilters/ should be the main URL that corresponds to your installation. (if you are trying to install this in a laptop or any other computer without a real internet address, try http://localhost/catalogues/exfilters/)

And search for data in the "Data Retrieval" section.

Previous   Next