Developer manual
Note: This is the print view with all the Reference Manual pages on one page. The paginated version is available here, if you prefer that.
1. Introduction
- Provide feedback and contribute to this site wherever you feel information is lacking, out of synch or incorrect. This is essential to successful development and use of the application. Don't hesitate to ask if things are not clear, an honest question is NEVER stupid! However, read first to avoid asking the same questions many others did before you.
- Subscribe to the mailing lists and/or browse through the mailing list archives at http://sourceforge.net/mail/?group_id=72096
- Report bugs, feature requests, support requests et cetera on the sourceforge project site: GeoNetwork opensource
- Make sure you refer to the other sections on this site to fully understand the functionality offered by the software. The other sections provide essential information for a developer to use, test and further develop the application.
- To better understand the application's architecture we suggest you read the Jeeves manual. This manual explains how to develop an application based on the Jeeves library, also maintained on SourceForge. GeoNetwork opensource is build using this library for most of its functionality. Jeeves takes care of managing data sources, XML transformations through XSL and stuff like starting web services.
2. Overview
Platforms
GeoNetwork opensource has been developed, tested and should run on Windows (2000 and above), Linux and Mac OS X (FreeBSD) operating systems.
Servlet engine
The application is running as a servlet on a servlet engine like Apache Tomcat or Jetty. This requires that both a Java environment as well as a servlet engine are in place before installing GeoNetwork opensource. We are working on a version of GeoNetwork opensource that comes with its own embedded servlet engine.
Database
GeoNetwork opensource uses a DBMS to store metadata and information related to these metadata. It therefor needs a DBMS in place. By default the installer comes with an embedded DBMS, McKoiDB. This database can be used in test environments and for desktop installations but is not recommended for server installations. In fact, version 1 of GeoNetwork opensource does not support multi user access to the embedded database, making it absolutely unsuitable for server installations.
As an alternative to the embedded DBMS, the user can choose to install GeoNetwork opensource with any other DBMS with JDBC support. We have currently added support for MySQL and Oracle. While installing the GeoNetwork opensource software you are given the option to select a DBMS to be used. You need the JDBC driver for that DBMS at hand so you can copy it into its proper place during the completion of the installation process. You will be warned when you have to copy the driver and in what location you should put it. The installer will then generate the database schema and insert the necessary content into the database.
Language support
GeoNetwork opensource comes with a number of languages preconfigured. However, it is easy to add your own translation in order to make a localized version of the Graphical User Interface. All you have to do is create a new language folder (using the 2 letter ISO code) inside the \web\loc (on Windows) or /web/loc (on UNIX) folder. This could be done by copying the English folder (/web/loc/en) and renaming it. The XML files contained inside the xml folder need translation as well as the (few) graphics inside the images folder. To effectively contribute translations for inclusion in a next GeoNetwork opensource release please read the instructions that can be found here in the How-to section.
3. Setting up the development environment
Protocol: Password server (:pserver:)
Protocol parameters:
Server: geonetwork.cvs.sourceforge.net
Port:
Repository folder: /cvsroot/geonetwork
User name: anonymous
Module: geonetwork
Using the above, I was able to retrieve (via context-menu right-click in Windows Explorer) the source.
However, as I stated, Eclipse is my preferred IDE – and so I prefer to use that as my CVS/checkout tool. I don’t believe it is necessary to install/configure TortoiseCVS if you plan to use Eclipse. To open and configure Eclipse for the GeoNetwork project, open Eclipse and use the following steps…
create a new project (File/New Project/CVS/Checkout project from CVS)
set ‘Host’ to geonetwork.cvs.sourceforge.net
set ‘Repository path’ to /cvsroot/geonetwork
set ‘User’ to anonymous
leave ‘Password’ blank
set ‘Connection type’ to pserver
check ‘Use default port
click Next
You should now be able to click on ‘Use an existing module…” and it will load the module names.
select ‘geonetwork’ from the modules
click Next
click “Check out as a project in the workspace” and set ‘Project Name’ to geonetwork
click Next
Choose your workspace location (for reference, I use e:\BlueNet\geonetwork)
Click Next
Select the ‘tag’ (this is the CVS’s ‘marked code’ that you want. Typically this will be HEAD)
Click Finish
The IDE should now be busy for a while, checking out the files from the CVS at SourceForge.
I also found it useful to retrieve ‘jeeves’ (upon which geonetwork is dependant) from SourceForge via CVS. To import Jeeves into your Eclipse project , follow the above steps (from “create a new project”), replacing ‘geonetwork’ with “jeeves”
If you wish to retrieve the JDOM code/binaries (another code dependency), you can visit www.jdom.org -- you might like to add the JAR file (if you download the binary only) as a dependency (external JAR) to the geonetwork project.