Geonetwork Developer Manual Release 2.10.4-0
Total Page:16
File Type:pdf, Size:1020Kb
GeoNetwork Developer Manual Release 2.10.4-0 GeoNetwork September 23, 2021 CONTENTS 1 Software development 3 1.1 System Requirements..........................................3 1.2 Tools...................................................4 1.3 Check out source code..........................................4 1.4 Build GeoNetwork............................................5 1.5 Creating the installer...........................................7 1.6 Running tests...............................................7 1.7 Eclipse setup...............................................7 2 Create a release 13 2.1 Call for vote............................................... 13 2.2 Release committee............................................ 13 2.3 Notify developer lists........................................... 13 2.4 Prerequisites............................................... 14 2.5 Add release to trac............................................ 14 2.6 Making the release............................................ 14 2.7 Updating the master branch version number............................... 16 2.8 Upload and release on SourceForge................................... 17 2.9 Update geonetwork-opensource website................................. 18 2.10 Announce the release........................................... 18 3 Harvesting 21 3.1 Structure................................................. 21 3.2 Data storage............................................... 22 3.3 Guidelines................................................ 23 4 Schema Plugins 25 5 Metadata schemas and profiles 27 6 Implementing a metadata schema or profile 29 7 Schema Plugins 31 7.1 Contents of a GeoNetwork schema................................... 31 7.2 Preparation................................................ 33 7.3 Example - ISO19115/19139 Marine Community Profile (MCP).................... 33 8 Metadata Exchange Format 61 8.1 Introduction............................................... 61 8.2 MEF v1 file format............................................ 61 8.3 MEF v2 file format............................................ 62 i 8.4 The info.xml file............................................. 63 9 XML Services 67 9.1 Calling specifications........................................... 67 9.2 Login and Logout services........................................ 70 9.3 Group services.............................................. 72 9.4 User services............................................... 77 9.5 Category services............................................. 89 9.6 Search and Retrieve Metadata services................................. 94 9.7 Metadata insert, update and delete services............................... 105 9.8 Metadata Select services......................................... 112 9.9 Metadata Privilege services....................................... 114 9.10 Metadata Ownership services...................................... 118 9.11 Metadata Status services......................................... 125 9.12 Metadata Category services....................................... 130 9.13 Metadata Versioning services...................................... 133 9.14 Metadata Processing services...................................... 136 9.15 Metadata Relation services........................................ 142 9.16 Metadata Validation services....................................... 147 9.17 System configuration........................................... 152 9.18 Site Information and Request Forwarding Services........................... 158 9.19 File download services.......................................... 167 9.20 Harvesting services............................................ 170 9.21 Schema Services............................................. 183 9.22 MEF services............................................... 189 9.23 CSW service............................................... 191 9.24 Java development with XML services.................................. 201 10 Settings hierarchy 209 10.1 Introduction............................................... 209 10.2 System node............................................... 209 10.3 Harvesting nodes............................................. 211 11 User Interface 233 11.1 Classic.................................................. 233 11.2 Search.................................................. 234 11.3 TabSearch................................................ 236 11.4 HTML5UI................................................ 236 Index 243 ii GeoNetwork Developer Manual, Release 2.10.4-0 Welcome to the GeoNetwork Developer Manual v2.10.4-0. The manual is for those who want to help with the devel- opment process, including source code, software releasing, and other administrative work. Other documents: GeoNetwork User Manual GeoNetwork Developer Manual (PDF) CONTENTS 1 GeoNetwork Developer Manual, Release 2.10.4-0 2 CONTENTS CHAPTER ONE SOFTWARE DEVELOPMENT 1.1 System Requirements GeoNetwork is a Java application that runs as a servlet so the Java Runtime Environment (JRE) must be installed in order to run it. You can get the JRE from http://www.oracle.com/technetwork/java/javase/downloads and you have to download the Java 6 Standard Edition (SE). GeoNetwork won’t run with Java 1.4. It will run with: • Java 5 - but few people should be using that now as it is unsupported. • Java 6 - most testing has taken place under Java 6, so we recommend Java 6. • OpenJDK 7 - note: problems have been reported with OpenJDK 6. Being written in Java, GeoNetwork can run on any platform that supports Java, so it can run on Windows, Linux and Mac OSX. For MacOSX, make sure you use version 10.4 (Tiger) or newer. Version 10.3 (Panther) has only Java 1.4 so it cannot run GeoNetwork. Next, you need a servlet container. GeoNetwork comes with an embedded container (Jetty) which is fast and well suited for most applications. If you need a stronger one, you can install Tomcat from the Apache Software Foundation (http://tomcat.apache.org). It provides load balancing, fault tolerance and other production features. If you work for an organisation, it is probable that you already use Tomcat. The tested version is 6.0.x but GeoNetwork should work with all other versions (>= 5.5). Regarding storage, you need a Database Management System (DBMS) like Oracle, MySQL, Postgresql etc. GeoNet- work comes with an embedded DBMS (H2) which is used by default during installation. This DBMS can be used for small or desktop installations of no more than a few thousand metadata records with one or two users. If you have heavier demands then you should use a professional, stand alone DBMS. GeoNetwork does not require a powerful machine. Good performance can be obtained even with 1GB of RAM. The suggested amount is 2GB. For hard disk space, you have to consider the space required for the application itself (about 350 MB) and the space required for data, which can require 50 GB or more. A simple disk of 250 GB should be OK. You also need some space for the search index which is located in GEONETWORK_DATA_DIR/index (by default GEONETWORK_DATA_DIR is INSTALL_DIR/web/geonetwork/WEB_INF/data. However, even with a few thousand metadata records, the index is small so usually 500 MB of space is more than enough. The software is run in different ways depending on the servlet container you are using: • Tomcat - GeoNetwork is available as a WAR file which you can put into the Tomcat webapps directory. Tomcat will deploy the WAR file when it is started. You can then use the Tomcat manager web application to stop/start GeoNetwork. You can also use the startup.* and shutdown.* scripts located in the Tomcat bin directory (.* means .sh or .bat depending on your OS) but if you have other web applications in the tomcat container, then they will also be affected. • Jetty - If you use the provided container you can use the scripts in GeoNetwork’s bin directory. The scripts are start-geonetwork.* and stop-geonetwork.* and you must be inside the bin directory to run them. You can use these scripts just after installation. 3 GeoNetwork Developer Manual, Release 2.10.4-0 1.2 Tools The following tools are required to be installed to setup a development environment for GeoNetwork: • Java - Developing with GeoNetwork requires Java Development Kit (JDK) 1.6 or greater (scroll down to find 1.6) OR the OpenJDK (version 7 or higher only) for Linux users. • Maven - GeoNetwork uses Maven to manage the build process and the dependencies. Once is installed, you should have the mvn command in your path (on Windows systems, you have to open a shell to check). • Git - GeoNetwork source code is stored and versioned in a Git repository on Github. Depending on your operating system a variety of git clients are avalaible. Check in http://git-scm.com/downloads/guis for some alternatives. Good documentation can be found on the git website: http://git-scm.com/documentation and on the Github website https://help.github.com/. • Ant - GeoNetwork uses Ant to build the installer. Version 1.6.5 works but any other recent version should be OK. Once installed, you should have the ant command in your path (on Windows systems, you have to open a shell to check). • Sphinx - To create the GeoNetwork documentation in a nice format Sphinx is used. 1.3 Check out source code If you just want to quickly get the code the fastest way is to download the zip bundle: https://github.com/geonetwork/ core-geonetwork/zipball/master However, it is recommended that if you want to contribute back to Geonetwork you create a Github account, fork the Geonetwork