Home
GeoNetwork Developer Manual
Contents
1. Purpose Credit BES University of Tasmania Suggestions UTAS Rp Status UTAS Point of contact UB UQ Individual name LE en rCantarct Tnfarmatian V More on strings xml A localized copy of strings xml is made available on an XPath to the presentation XSLTs eg root gui schemas iso19139 strings for the iso19139 schema After adding the localized strings our new GeoNetwork plugin schema for MCP contains extract date modified xsl extract gml xsd extract uuid xsl loc present schema conversions xml schema ident xml schema xsd schema 7 3 6 Creating the presentations XSLTs in the present directory Each metadata schema should contain XSLTs that display and possibly edit metadata records that belong to the schema These XSLTs are held in the present directory To be be used in the XSLT include import hierarchy these XSLTs must follow a naming conven tion metadata lt schema name gt xsl So for example the presentation xslt for the iso19139 schema is metadata isol9139 xsl For the MCP since our schema name is iso19139 mcp the presentation XSLT would be called metadata isol19193 mcp xsl Any XSLTs included by the presentation XSLT should also be in the present directory this is a conven tion for clarity it is not mandatory as include import URLs can be mapped in the oasis catalog xml for the schema to other locations There are certain XSLT templates that the presentation
2. found missing Name of the parameter XML container where the parameter should parameter have been present object not found x Object name operation Reason of abort If present the object that caused the abort aborted operation not X x allowed resource not xX Resource name found service not x Service name allowed service not x Service name found user login User login failed message User name user not found x User id or name metadata not The requested metadata was Metadata id not found Below is an example of exception generated by the mef export service The service complains about a missing parameter as you can see from the content of the id attribute The object element contains the xml request with an unknown test parameter while the mandatory UUID parameter as specified by the message element is missing An example of generated exception lt error gt lt message gt UUID lt message gt lt class gt MissingParameterEx lt class gt lt stack gt lt at class jeeves utils Util file Util java line 66 method getParam gt lt at class org fao geonet services mef Export line 60 method exec gt ves server dispatchers ServiceInfo lt at class j file Export java 9 1 Calling specifications 67 file ServicelInfo java GeoNetwork Developer Manual Release 2 10 4 0 line 226 method execService
3. end if return matched schema As an example suppose we have three schemas iso19139 mcp iso19139 mep 1 4 and iso19139 mep cmar with the following autodetect elements iso19139 mcp 1 4 7 3 Example ISO19115 19139 Marine Community Profile MCP 35 GeoNetwork Developer Manual Release 2 10 4 0 lt autodetect xmins mcp http bluenet3 antcrc utas edu au mcp xmlns gmd http www isote211l org 2005 gmd xmlns gco http www isote211l org 2005 geo gt lt elements gt lt gmd metadataStandardName gt lt gco CharacterString gt Australian Marine Community Profile of ISO 19115 2005 19139 lt gco CharacterString gt lt gmd metadataStandardName gt lt gmd metadataStandardVersion gt lt gco CharacterString gt MCP BlueNet V1 4 lt gco CharacterString gt lt gmd metadataStandardVersion gt lt elements gt lt autodetect gt iso19139 mcp cmar lt autodetect gt lt attributes xmlns mcp cmar http www marine csiro au schemas mcp cmar gt lt autodetect gt iso19139 mcp lt autodetect xmins mcp http bluenet3 antcrc utas edu au mcp gt lt elements type root gt lt mcp MD_Metadata gt lt elements gt lt autodetect gt A record going through autodetect processing eg on import would be checked against e isol9139 mcp cmar first as it has an attributes rule e then isol9139 mcp 1 4 as it has an elements rules e then finally against iso19139 mcp as it has a root
4. Install xcheckstylexx Now Restart Open preferences xxWindow gt Preferences Select Java gt Code Style gt Code Templates Select both Comments and Code elements Click Import x and import code_quality codetemplates xmlx Select xJava gt Code Style gt Formatterxx w i Click Import and import code_quality formatter xmlxx Select xJava gt Code Style gt Clean Up Click Import and import code_quality cleanup xmlx Select xCheckstylex Click Newxx Select x External Configurationx Enter any name IE Geonetwork For location choose code_quality checkstyle_checks xml x Press OK x Select New configuration Press xSet as Default Select Java gt FindBugs x Set xxanalysis effort x to Maximumx Set x Minimum rank to report to 2xx Set x Minimum confidence to report to x Medium Check enable all bug categories Set all Mark bugs with rank asxx to xxWarning Change to Filter files tab Add x code_quality findbugs excludes xmlx file to the Exclude filter filesxx Close Prefences Right click on project in Projects View x select xxCheckstyle gt Activate Checkstyle Rebuild full project Project gt Clean xx Checkstyle violations will show up as warnings Right click on project in Projects Viewxx select
5. 164 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Request Called with a metadata id or uuid one or more file names if more than one file is attached to the metadata record as data for download access which is almost always private and details of the user who has accepted the license and wants to download the files Example lt request gt lt uuid gt d8c8call ecc8 45dc b424 171a9e212220 lt uuid gt lt fname gt roam rsf aus bathy topo contours sff lt fname gt lt fname gt mse09_M8 nc lt fname gt lt access gt private lt access gt lt name gt Aloyisus Wankania lt name gt lt org gt Allens Butter Factory lt org gt lt email gt A Wankania allens org lt email gt lt comments gt Gimme the data buddy lt comments gt lt request gt Response The service returns HTTP status code 200 along with a zip archive containing e the file resources requested in the fname parameter s e a copy of the metadata record as a mef called metadata zip e a copy of the html license generated as provided by the xm1 file disclaimer service called License annex html If an exception occurs or the xml file disclaimer service has not been executed by the same user then a zero length file will be returned Unlike other GeoNetwork services no other indication of an exception is given 9 20 Harvesting services This section describes the services used to create update and manage
6. 11 4 HTMLSUI 235 GeoNetwork Developer Manual Release 2 10 4 0 Results view templates They are on web src main resources apps html5ui js Templates js Add more tabs To add more tabs just look on search xsl around line 240 id main navigation and add a new element like this lt li gt lt a id new tab href TODO gt lt xsl value of select root gui strings new tab gt lt a gt lt li gt The value of the string will be taken from the strings xml file that corresponds to the language used Add a footer link Look for the div element with id footer and just add it lt li gt lt a href http geonetwork opensource org gt GeoNetwork OpenSource lt a gt lt li gt Maps and other elements change display behaviour Maps are always loaded even if they are not displayed You can change this behaviour and allow for example the big map to be shown at all times This is the same for all elements you see that disappear To change this behaviour you should take a look at GlobalFunctions js file For each view you have one function that shows it and hides it You can change them to allow for example that the big map is not hidden when results are shown e showBrowse e hideBrowse e showAdvancedSearch e hideAdvancedSearch e showBigMap If you add a new view you should update all this functions so the view is hidden or shown when you want Settings There are a few c
7. gt lt xsl with param name tabLink select StabLink gt lt xsl call template gt lt xsl call template name displayTab gt lt xsl with param name tab select mcpCore gt lt xsl with param name text select root gui strings isol9139 mcp mcpCore gt lt xsl with param name indent select amp xA0 amp xA0 amp xA0 gt lt xsl with param name tabLink select StabLink gt lt xsl call template gt lt xsl call templa name displayTab gt lt xsl with param name tab select complete gt lt xsl with param name text select root gui strings isol9139 mcp mcpAl1 gt lt xsl with param name indent select amp xA0 amp xA0 amp xA0 gt lt xsl with param name tabLink select StabLink gt lt xsl call template gt pists same as for isol9139CompleteTab in GEONETWORK_DATA_DIR schema_plugins isol9139 present metadata isol9139 xsl lt xsl template gt This template is called by the template named tab which also adds the default and XML View tabs in INSTALL_DIR web geonetwork xsl metadata tab utils xsl using the schema name That XSLT also has the code for the display Tab template 44 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 mcpMinimum mcpCore complete etc are the names of the tabs T
8. lt error id service not allowed gt lt message gt Service not allowed lt message gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code 9 13 Metadata Versioning services 9 13 1 Start versioning a metadata record xml metadata version The xml metadata version service creates an initial version of the metadata record and its properties categories status privileges in the subversion repository 9 13 Metadata Versioning services 129 GeoNetwork Developer Manual Release 2 10 4 0 Requires authentication Yes Request Parameters e id or uuid Identifier of metadata to version Request example POST Urls http localhost 8080 geonetwork srv eng xml metadata version Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata version id 6 Response Successful response HTTP status code 200 contains the identifier of the metadata for which versioning has been enabled Example lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt request gt If the service was not completed successfully then HTTP status code 50
9. p On this example we just have to set up four properties on the constructor the catalogue variable which makes all the query which will be sent to the server to provide the items to show the renderTo id of the div where the tag cloud will be drawn and the onSuccess function which will decorate and give style to the results of the tag cloud search You can find the whole API of widgets here Create a new widget You can create new widgets to add to your customized user interface Using the same example as before you can see that you can easily create new widgets You just have to take care of two things e Visualization define an html div where your widget will display information e Manipulation of information add some functionality like a search connector so the visualization has data to show Using outside GeoNetwork Although it is a testing functionality in fact you can use this same widgets on your own webpage You just have to make sure that all dependencies are fulfilled and the settings are properly set up 11 3 TabSearch 231 GeoNetwork Developer Manual Release 2 10 4 0 _ Nationaal Georegister bo S G O natinmminangee NGR Natonal an mal Catalogus LE Welkom op het Nationaal georegister d vindplaats van geo informatie van Nederland Door een zoekterm in te voeren krijgt u een overzicht van beschikbare datasets en services Deze datasets kunt u in veel geval
10. ERROR insert or update on table usergroups violates foreign key constraint user groups_groupid_fkey when group identifier is not an existing group identifier Returns 500 HTTP code ERROR tried to add group id XX to user XXXX not allowed because you are not a mem ber of that group when the authenticated user has profile UserAdmin and tries to add the user to a group they do not manage Returns 500 HTTP code ERROR you don t have rights to do this when the authenticated user has a profile that is not Administrator or UserAdmin Returns 500 HTTP code Update user information xml user update The xml user update service can be used to create new users update user information and reset user password depending on the value of the operation parameter Only users with profiles Administrator or UserAdmin can update users information Users with profile Administrator can update any user while users with profile UserAdmin can update users only in the groups where they belong Requires authentication Yes Request Parameters operation mandatory editinfo id mandatory Identifier of the user to update username mandatory User login name password mandatory User password profile mandatory User profile surname User surname name User name address User physical address city User address city state User address state zip User address zip country User address country 80 Chapter 9
11. Request Parameters e group Container for group information e id mandatory Group identifier to update e label mandatory This is just a container to hold the group names translated in the languages supported by GeoNetwork Each translated label is enclosed in a tag that identifies the language code Group label update request example Url http localhost 8080 geonetwork srv eng xml group update Mime type application xml Post request lt request gt lt group id 2 gt lt label gt lt es gt Grupo de ejemplo lt es gt lt label gt lt group gt lt request gt Response Group label update response example lt xml version 1 0 encoding UTF 8 gt lt ok gt 72 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code Get a group xml group get The xml group get service can be used to retrieve information on an existing group Requires authentification Yes Request Parameters id mandatory Group identifier to retrieve Group get request example Urls http localhost 8080 geonetwork srv eng xml group get ime type application xml Post request lt reque
12. git commit m Update version to version SNAPSHOT Push to github could be done at the end of the process git submodule foreach git push origin S devversion for i in S modules do 2 6 Making the release 15 cd GeoNetwork Developer Manual Release 2 10 4 0 ed Si git add git push origin S devversion cd done git push origin devversion Publish in sourceforge sftp Ssourceforge_username geonetwork frs sourceforge net For stable release cd home frs project g ge geonetwork GeoNetwork_opensource or for RC release cd home frs project g ge geonetwork cd GeoNetwork_unstable_development_versions mkdir 2 10 0 ed 2 10 0 put docs changes txt put geonetworkx jar put web target geonetwork war Publish on the website TODO 2 7 Updating the master branch version number After a new development branch is created it is required to update master version number The following procedure could be applied masterversion 2 9 0 version 2 11 0 modules docs gast geoserver installer Get the code git clone recursive https github com geonetwork core geonetwork git geonetwork Svers cd geonetwork S version Update version update version sh masterversion version SNAPSHOT Update some SQL TODO git checkout web src main webapp WEB INF classes setup sql migrate v masterversion mkdir web src main webapp WEB INF classes setup sql migrate v versio
13. lt southBL gt lt xsl value of select dataset coverage geographicCtoverage boundingCoorc lt northBL gt lt xsl value of select dataset coverage geographicCoverage boundingCoorc lt geoBox gt lt xsl copy of select geonet info gt lt metadata gt lt xsl for each gt lt xsl template gt Analyzing this template 1 The template matches on an element eml gbifBrief created by the mode brief template in metadata utils xsl The metadata record will be the first child in the metadata XPath 2 Then process metadata elements to produce a flat XML structure that is used by search results xhtml xsl to display a summary of the metadata record found by a search Once again for profiles of an existing schema it makes sense to use a slighlty different approach so that the profile need not duplicate templates Here is an example from metadata iso19139 mcp xsl lt xsl template match is019139 mcpBrief gt lt metadata gt lt xsl for each select metadata x 1 gt lt call isol9139 brief gt lt xsl call template name isol19139 brief gt lt now brief elements for mcp specific elements gt lt xsl call template name is019139 mep brief gt lt xsl for each gt lt metadata gt lt xsl template gt This template splits the processing between the base iso19139 schema and a brief template that handles elements specific to the profile
14. schemaLocation http www openarchives org OAI 2 0 oai_dce xsd xslt oai de xsl gt lt converter name xml_isol9139 mcpTorifcs nsUri http ands org au standards rif cs registryObjects schemaLocation http services ands org au home orca schemata registryOb xslt rif xsl gt lt conversions gt Each converter has the following attributes name The name of the converter This name is used for UI localization you will have an element using this name in Lloc lt LANG gt strings xml file example here service Optional If not defined it will be set equal to the name The service attribute is the service name of the GeoNetwork Jeeves service and should be unique prefixing the service name with xml_ lt schema_name gt is a good way to make this name unique If you don t need any special server side processing and an XSL transformation is enough you can use the xml_csw record service since it simply applies the XSL without any further transformation nsUri The primary namespace of the schema produced by the converter eg xml_isol9139 mcpTorifcs transforms metadata records from iso19139 mep to the RIFCS schema Metadata records in the RIFCS metadata schema have primary namespace URI of http ands org au standards rif cs registryObjects schemaLocation The location URL of the XML schema definition XSD corresponding to the nsURI xslt The name of the XSLT file that actually carries out t
15. 0 return result HttpStatus SC_OK catch Exception ex ex printStackTrace return false finally Release current connection to the connection pool once you are done post releaseConnection public static void main String args CreateUserClientAuth request new CreateUserClientAuth request sendRequest 200 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Output Login response status code 200 Authentication session cookie Creat JSESSIONID 0z j8iyvalagv status code 200 user respons Trying to run again the program as the user it s just created we get an exception Login response status code 200 Authentication session cookie Create user respons JSESSIONID 1q0 9kwg0r6 fge status code 500 Error response lt xml version 1 0 encoding UTF 8 gt lt error id error gt lt message gt ERROR duplicate key violates unique constraint users_username_key lt message lt class gt PSQLException lt class gt lt stack gt lt at class org postgresql core v3 QueryExecutorImpl file QueryExecutorImpl java lt at class org postgresql core v3 QueryExecutorImpl file QueryExecutorImpl java lt at class org postgresql core v3 QueryExecutorImpl file QueryExecutorImpl java lt at class org postgresql jdbc2 Abstr
16. C Category identifier integer A list of categories and identifiers is stored in the categories table It can be retrieved using the Site Information xml info service Example request POST Url http localhost 8080 geonetwork srv eng xml metadata batch update categories Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt 128 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt _1 gt lt _2 gt lt request gt GET Urls http localhost 8080 geonetwork srv eng xml metadata batch update categories _1 amp _2 Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully updated e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the request fails an HTTP status code error is returned and the response is an XML document with the exception An example of such a response is shown below
17. Error gt WARNING lt typeOfError gt lt errorNumber gt 1 lt errorNumber gt lt message gt lt message gt lt xpath gt lt xpath gt lt error gt lt xsderrors gt lt object gt lt request gt lt language gt eng lt language gt lt service gt xml metadata validation lt service gt lt request gt lt error gt Note XML parseable description of the validation problems is in the object container Validation may also fail when schematrons are applied to the metadata record An HTTP error response code is returned along with an XML document describing the validation problems An example is lt xml version 1 0 encoding UTF 8 gt lt error id schematron validation error gt M lt message gt Schematron errors detected lt message gt lt stack gt lt stack gt lt object gt lt geonet schematronerrors xmlns geonet http www fao org geonetwork gt lt geonet report geonet ru lt svrl schematron output lt svr lt svrl lt svr lt svr lt svrl lt svr lt svrl lt svr lt svr lt svr lt svr lt svr lt svr lt svr lt svr hare SE SETE sfr far frr space le schematron rules iso gt t xmlns svrl http purl oclc org dsdl svrl xmlns xlink I ns prefix in attribute values uri http www opengis net gml prefix gml ns prefix in attribute values uri http w
18. GeoNetwork pensource GeoNetwork Developer Manual Release 2 10 4 0 GeoNetwork Contents 1 Software development 3 1d System Requirements s s ssu er ane deken dek add ak da ERE AOR AE 3 MD MOOIS Atte eee te enk eo dede Beda aen eee ee A BOE one ptm tom dee ah a earn Arte 4 1 3 Checkout source Code mi A set amedee er ee a a a de dh 4 LA Buld GeoNetwork s sis a sa Gv ble art on ante ee erde ee we wa an A AC ct 5 15 Creatump the installer ss nn ee a Eat a a i 7 16 Running tests i na aa en bw ae we LAS EA ER LAS Ree ek ed 7 157 Eclipse setlips i 264 2 ee GRY EEA DEA EER See Eee RS 8 2 Create a release 13 Zl SCANLOEVOIE i 4 x ace a Gal oat ote a ae GA A Sh Oe a A al of lar wt 13 22 ReleasescOmimittee oie e a gate arn ke a Hee Ge Hh Sa Ho GH GE Rok ete a GE 13 2 3 Notify developer lists an ee ee ee ee eae bee ed 13 24 Prerequisites ss un gt wack bk teen ol der a eae A RE RE ER es 13 25 Add teleasstO HAT o 8 kb a et Eee ad a ee a a oa i 14 26 Making therelease ua ar anar oa a Ra thew a ede a DR BA Ha Ra 14 2 7 Updating the master branch version number ee 16 2 8 Uploadand release on SourceForge oo os ee a er ae a ee er a ee a 17 2 9 Update geonetwork opensource website eee 18 2 10 Announce the release a aans ats ce ereen a ee PE Se en a lala E 18 3 Harvesting 19 Sill SUCUS ras a eh Ge GH aL we ok Bk a aE a we re oade 19 32 Dat
19. Harvester settings in XML are used by the harvester services see Harvesting services Example of Filesystem harvester settings in XML 10 3 Harvesting nodes 219 GeoNetwork Developer Manual Release 2 10 4 0 lt node id 1234 type filesystem gt lt site gt lt name gt Users filesystem harvester lt name gt lt uuid gt c7b7660a 337a 4aal 843b 648280ad8d86 lt uuid gt lt account gt lt use gt false lt use gt lt username gt lt password gt lt account gt lt directory gt Users lt directory gt lt recurse gt true lt recurse gt lt nodelete gt true lt nodelete gt lt icon gt filesystem gif lt icon gt lt site gt lt content gt lt validate gt true lt validate gt lt importxslt gt DIF to 1IS019139 xsl lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt lt privileges gt lt group id 1 gt lt operation name view gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt 10 3 9 Harvesting node arcsde This harvester type is capable of harvesting metadata from an arcsde server The settings for the arcsde harvester type are e node string arcsde site server str
20. Request Each service accepts a set of parameters which must be embedded in the request A service can be called using different HTTP methods depending on the structure of its request e GET The parameters are sent as part of the URL address On the server side these parameters are grouped into a flat XML document with one root and several simple children A service can be called this way only if the parameters it accepts are not structured An example of such a request and the parameters encoded in XML is Url Request http localhost 8080 geonetwork srv eng main search hitsPerPage 10 any Encoding lt request gt lt hitsPerPage gt 10 lt hitsPerPage gt lt any gt lt request gt 65 GeoNetwork Developer Manual Release 2 10 4 0 POST There are 3 variants of this method 1 ENCODED The request has one of the following content types application x www form urlencoded or multipart form data The first case is very common when sending web forms while the second one is used to send binary data usually files to the server In these cases the parameters are not structured so the rules of the GET method applies Even if the second case could be used to send XML documents this possibility is not considered on the server side 2 XML The content type is application xml This is the common case when the client is not a browser but a specialised client The request is a pure XML document in string form encoded u
21. The namespace of the specified prefix was not found not found The requested element codelist was not found 9 21 3 Add a metadata schema xml metadata schema add The xml metadata schema add service can be used to add a metadata schema to GeoNetwork The details of what the schema should contain are covered in the Schema Plugins section of this manual Only Administrator users can run this service Requires authentification Yes Request Parameters e schema mandatory Name of the schema to add One of the following parameters e fname Server file name full path to metadata schema zip archive e url Http URL of metadata schema zip archive e uuid Uuid of metadata record in current catalog that has a metadata schema zip archive uploaded and stored with it Schema add request example Url http localhost 8080 geonetwork srv eng xml metadata schema add Mime type application xml Post request lt request gt lt schema gt isol19139 mcp lt schema gt lt fname gt usr local src git schemaPlugins 2 8 x dist isol19139 mcp zip lt fname gt lt request gt 9 21 Schema Services 181 GeoNetwork Developer Manual Release 2 10 4 0 Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document confirming success is returned An example response is lt response status ok message Schema isol9139 mcp has been added updated gt If the request fails then an
22. bluenet3 antcrc utas edu au mep http bluenet3 antcrc utas edu au mcp 1 5 experimental schema xsd http www isotc211 org 2005 gmd http www isotc211 org 2005 gmd gmd xsd http www isotc211 org 2005 srv http schemas opengis net iso 19139 20060504 srv srv xsd lt schemaLocation gt lt autodetect xmins mcp http bluenet3 antcrc utas edu au mcp xmlns gmd http www isotc211 org 2005 gmd xmlns gco http www isotc211 o0rg 2005 gco gt lt elements gt lt gmd metadataStandardName gt lt gco CharacterString gt Australian Marine Community Profile of ISO 19115 2005 19139 Marine Community Profile of ISO 19115 2005 19139 lt gco CharacterString gt lt gmd metadataStandardName gt lt gmd metadataStandardVersion gt lt gco CharacterString gt 1 5 experimental MCP BlueNet V1 5 experimental MCP BlueNet V1 5 lt gco CharacterString gt lt gmd metadataStandardVersion gt lt elements gt lt autodetect gt lt schema gt Each of the elements is as follows 32 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 e name the name by which the schema will be known in GeoNetwork If the schema is a pro file of a base schema already added to GeoNetwork then the convention is to call the schema lt base_ schema _name gt lt namespace of _profile gt e id a unique identifier for the schema e version the version number of the schema Multiple versions of the s
23. icon next to the element name This can be tedious especially as some metadata standards have elements nested in others ie complex elements The schema suggestions xml file allows you to specify elements that should be automatically expanded by the editor An example of this is the online resource information in the ISO19115 19139 standard If the following XML was added to the schema suggestions xml file lt field name gmd CI_OnlineResource gt lt suggest name gmd protocol gt lt suggest name gmd name gt lt suggest name gmd description gt lt field gt The effect of this would be that when an online resource element was expanded then input fields for the protocol a drop down select list name and description would automatically appear in the editor Once again a good place to start when building a schema suggestions xml file for the MCP is the schema suggestions xml file for the iso19139 schema e schema substitutes xml Recall from the earlier Creating the schema directory and schema xsd file section that the method we used to extend the base ISO19115 19139 schemas is to extend the base type define a new element with the extended base type and allow the new element to substitute for the base element So for example in the MCP we want to add a new resource constraint element that holds Creative Commons and other commons type licensing information This requires that the MD_Constraints type be extended and a new mcp
24. lt request gt Response If the request executed successfully then an HTTP 200 status code is returned along with an XML document that confirms the operation that has taken place An example of a response to an update request is lt response gt lt operation gt updated lt operation gt lt response gt An example of a response to a create request is lt response gt lt operation gt added lt operation gt lt response gt If the request fails then a HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example of such a response is lt error id missing parameter gt lt message gt name lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile is not permitted to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter name when name it s empty Returns 500 HTTP code e ERROR duplicate key violates unique constraint categories_name_key when trying to create a new category using an existing category name Returns 500 HTTP code Update label translations xml category update The xml category update service can
25. lt request gt Response If the request executed without an exception then an HTTP 200 status code is returned and an XML document giving status is returned An example response is 9 21 Schema Services 183 GeoNetwork Developer Manual Release 2 10 4 0 lt response status ok message Schema isol9139 mcp has been deleted gt Other responses may describe errors in which case the status is set to error An example error response is lt response status error message Cannot remove schema isol9139 because ther If the request fails due to an exception in the service then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id operation aborted gt lt message gt Schema doesn t exist lt message gt lt class gt OperationAbortedEx lt class gt lt error gt See Exception handling for more details 9 22 MEF services This section describes the services related to the Metadata Exchange Format These services allow import export metadata using the MEF Metadata Exchange Format format Note before using these services please review the section on the MEF format at Metadata Exchange Format 9 22 1 mef export This service exports GeoNetwork metadata using the MEF file format The metadata record can be specified using a uuid or the currently selected set of metadata
26. lt requestedLanguage gt lt config gt 9 17 System configuration 153 GeoNetwork Developer Manual Release 2 10 4 0 9 17 3 xml config set This service is used to update the system configuration It is restricted to users with the Administrator profile Request The request format is the same as the XML document produced by the xml config get service To use the xml config set service in the simplest way 1 Call xml config get to obtain an XML document describing the current configuration 2 Update the content of the elements you want to change 3 POST the modified XML document describing the new configuration to xml config set So a typical POST request would look like Url http localhost 8080 geonetwork srv eng xml config set lt request gt lt config gt lt config gt lt request gt Response If the request executed successfully then HTTP status code 200 is returned along with an XML document confirming success The success response is lt response gt ok lt response gt If an exception occurred then an XML document with the details of the exception is returned See Exception handling for more details 9 18 Site Information and Request Forwarding Services Services in this section provide information about the site eg name users groups schemas etc and access to the site forwarding service which can be used by JavaScrip
27. lt site gt lt content gt lt validate gt true lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 3 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt lt search gt lt freeText gt lt title gt lt abstract gt lt keywords gt lt digital gt false lt digital gt lt hardcopy gt false lt hardcopy gt lt source gt lt UUID gt 0619cc50 708b 11da 8202 000d9335906e lt uuid gt lt name gt Food and Agriculture organisation lt name gt lt source gt lt search gt lt searches gt lt groupsCopyPolicy gt lt group name all policy copy gt lt group name mygroup policy createAndCopy gt lt groupsCopyPolicy gt lt categories gt lt category id 4 gt 166 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt lt nodes gt If you specify a harvester id parameter in the request then the XML document returned has a node root element that describes the harvester Example of an xml harvesting get response for a WebDAV harvester lt node id 165 type webdav gt lt site gt lt name gt test 1 lt name gt lt UUID gt 0619cc50 708b 11da 8202 000d9335aaae lt uuid gt lt url gt http www
28. lt error id service not allowed gt lt message gt Service not allowed lt message gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code 9 14 Metadata Processing services These services allow processing of one or more metadata records using an XSLT 9 14 1 Rules for constructing a process XSLT for use with these services Typically an XSLT used with this service will accept some parameters then filter the elements of the metadata record being processed changing some elements and copying the rest So the rules for con structing such an XSLT are e Accept parameters using xs1 param values for these will be specified as part of the request eg lt xsl param name url gt e Add templates that match and process the required metadata elements For example 132 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt xsl template match gmd identificationInfo x gt lt Do some work processing and or copying contents of this element gt lt xsl template gt e Include a template that matches all content refers any specific matches to templates provided in the previous step or just copies the metadata elements nodes and attributes without changing them lt xsl template match x node gt l
29. lt privileges gt lt group id 1 gt lt operation name view gt lt operation name dynamic gt lt operation name featured gt lt group gt lt privileges gt lt categories gt lt category id 3 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt 10 3 11 Harvesting node geoPREST This harvester type is capable of querying a GeoPortal 9 3 x site and harvesting metadata using the GeoPortal REST API e node string geoPREST 10 3 Harvesting nodes 223 GeoNetwork Developer Manual Release 2 10 4 0 site x baseUrl string Base URL of the GeoPortal server site eg http yoursite com geoportal REST URLs will be built from this URL icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons search 0 n Contains search parameters If this element is missing no re sults will be returned You can use the Lucene query syntax documented at http webhelp esri com geoportal_extension 9 3 1 index htm srch_lucene htm x freeText string XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of geoPREST harvester
30. lt report M6l gt Hierarchy level name is lt report M61 gt collectionSession lt svrl text gt lt svrl successful report gt lt svrl schematron output gt 146 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt geonet report gt lt geonet report geonet rule schematron rules geonetwork gt lt svrl schematron output xmlns svrl http purl oclc org dsdl svrl xmlns xlink 1 lt svrlins prefix in attribute values uri http www opengis net gml prefix gm1 lt svrlins prefix in attribute values uri http www isotc211 org 2005 gmda pref lt svrlins prefix in attribute values uri http www isotc21l org 2005 srv pref lt svrl ins prefix in attribute values uri http www isotc21l org 2005 gco pref lt svrl ins prefix in attribute values uri http www fao org geonetwork prefix lt svrl ins prefix in attribute values uri http www w3 org 1999 xlink prefix 3 lt svrl active pattern document name Language Metadata language is not de lt svrl fired rule context gmd MD_Metadata gco isoType gmd MD Metadata lt svrl successful report ref _1 test SlocaleAndNoLanguage location local lt svrl text gt lt report M500 gt Main metadata language is lt report M500 gt eng lt svrl text gt lt svrl successful report gt lt svrl successful report ref 1 test SduplicateLanguage location x lo
31. 1 0 encoding UTF 8 gt lt request gt Response Logout response example lt ok gt 9 3 Group services 9 3 1 Group List xml info amp type groups The xml info service can be used to retrieve the user groups available in GeoNetwork See Site Infor mation xml info 9 3 2 Group maintenance Create update a group xml group create update The xml group create update service can be used to create a new group and update the information about an existing group Only users with Administrator profile can create update groups Requires authentication Yes 70 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Request Parameters e id Group identifier to update If not provided a new group is created with the name description and email parameters provided e name mandatory Name of the group e description Group description e email email address for group notifications Group update request example Url http localhost 8080 geonetwork srv eng xml group create update Mime type application xml Post request lt request gt lt id gt 2 lt id gt lt name gt sample lt name gt lt description gt Demo group lt description gt lt email gt group mail net lt email gt lt request gt Response If the request executed successfully then an HTTP 200 status code is returned along with an XML document that confirms the operation that has taken place An example of a resp
32. ErrorEx lt class gt ETADATZ lt stack gt lt at class org fao geonet services metadata ImportFromDir file ImportFromDir java line 297 method validateIt gt lt at class org fao geonet services metadata ImportFromDir file ImportFromDir java line 281 method validatelt gt lt at class org fao geonet services metadata Insert file Insert java line 102 method exec gt lt at class jeeves server dispatchers ServiceInfo file Servicelnfo java line 238 method execService gt lt at class jeeves server dispatchers ServiceInfo file Servicelnfo java line 141 method execServices gt lt at class jeeves server dispatchers ServiceManager file ServiceManager java line 377 method dispatch gt lt at class jeeves server JeevesEngine file JeevesEngine java line 621 method dispatch gt lt at class jeeves server sources http JeevesServlet file JeevesServlet java line 174 method execute gt lt at class jeeves server sources http JeevesServlet file JeevesServlet java line 99 method doPost gt lt at class Jjavax servlet http HttpServlet file HttpServlet java line 727 method service gt lt stack gt lt object gt lt xsderrors gt lt error gt lt message gt ERROR 1 org xml sax SAXParseException cvc datatype valid 1 2 1 is lt xpath gt gmd identificationInf
33. Example of WFS Features harvester settings in XML lt node id 1201 type wfsfeatures gt lt site gt lt name gt test wfs lt name gt lt uuid gt 588ea4fa al05 40fd 9697 8082d23cc967 lt uuid gt lt account gt lt use gt true lt use gt lt username gt lt password gt lt account gt lt url gt http localhost 6060 deegree services lt url gt lt icon gt wfs gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt IMPORTXSLT lt importxslt gt lt content gt lt options gt lt every gt 0 00 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt lang gt eng lt lang gt lt query gt lt wfs GetFeature service WFS version 1 1 0 xmlns wfs http www opengis net wfs gt amp lt wts lt outputSchema gt isol9139 lt outputSchema gt lt stylesh Query typeName gboundaries amp gt amp lt wfs GetFeature amp gt lt query gt t gt geoserver_boundary_fragments xsl lt stylesheet gt lt streamFeatures gt false lt streamFeatures gt lt createSubtemplates gt true lt createSubtemplates gt lt templateId gt 2 lt templatelId gt lt recordsCategory gt 2 lt recordsCategory gt 218 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 lt options gt lt privileges gt lt group id 1 gt lt operation name
34. Examples agriculture irrigation aquaculture plantations herding pests and diseases affecting crops livestock lt description gt lt entry gt 7 3 Example ISO19115 19139 Marine Community Profile MCP 41 GeoNetwork Developer Manual Release 2 10 4 0 lt gt lt entry gt lt code gt biota lt code gt lt label gt Biota lt label gt lt description gt Flora and or fauna in natural environment Examples wildlife vegetati biological sciences ecology wilderness sealife wetlands habitat lt description gt lt entry gt lt gt lt entry gt lt code gt boundaries lt code gt lt label gt Boundaries lt label gt lt description gt Legal land descriptions Examples political and administrative boundaries lt description gt lt entry gt lt codelist gt The codelists xml file maps the enumerated values from the XSD to a localized label and a description via the code element A localized copy of codelists xml is made available on an XPath to the presentation XSLTs eg root gui schemas iso19139 codelist for the iso19139 schema The XSLT metadata xsl which contains templates used by all metadata schema presentation XSLTs handles the creation of a select list drop down menu in the editor and display of the code and description in the metadata viewer The isol9139 schema has additional codelists that are managed external to the XSDs in cata log voca
35. If successful the service returns HTTP status code 200 and the response is a MEF file with name as follows e prefix is export e MEF format simple partial full e current time in milliseconds since 1970 e zip extension eg export full 1357949862822 zip If an exception occurred then service returns HTTP status code 500 and an XML document describing what went wrong An example of such a response is 9 22 MEF services 185 GeoNetwork Developer Manual Release 2 10 4 0 lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt error gt See Exception handling for more details 9 22 2 mef import This service is used to import a metadata record in the MEF format Only users with the Administrator profile can run this service Request The service accepts a multipart form data POST request with a single mefFile parameter that must contain the MEF information Response If the import is successful the service returns HTTP status code 200 along with an XML document containing the GeoNetwork integer id of the created metadata Example lt ok gt 123 lt ok gt If an exception occurred then service returns HTTP status code 500 and an XML document describing what went wrong An example of such a response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class
36. The xml group remove service can be used to remove an existing group Only users with Administra tor profile can delete groups Requires authentification Yes Request Parameters e id mandatory Group identifier to delete Group remove request example Urls http localhost 8080 geonetwork srv eng xml group remove ime type application xml Post request lt request gt lt id gt 2 lt id gt lt request gt 74 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document confirming the remove operation is returned An example response is lt response gt lt operation gt removed lt operation gt lt response gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parame
37. This assumes that 1 The base schema has separated the lt metadata gt element from the remainder of its brief processing so that it can be called by profiles 2 The profile includes links to equivalent elements that can be used by the base schema to process common elements eg for ISO19139 elements in the profile have gco isoType at tributes that give the name of the base element and can be used in XPath matches such as gmd MD_Dataldentification gco isoType gmd MD _Dataldentification e templates that match on elements specific to the schema Here is an example from the eml gbif schema lt keywords are processed to add thesaurus name in brackets afterwards in view mode gt lt xsl template mode eml gbif match keywordSet gt lt xsl param name schema gt lt xsl param name edit gt lt xsl choose gt lt xsl when test Sedit false gt lt xsl variable name keyword gt lt xsl for each select keyword gt 46 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 lt xsl if test position amp gt 1 gt lt xsl if gt lt xsl value of select gt lt xsl for each gt lt xsl if test keywordThesaurus gt lt xsl text gt lt xsl text gt lt xsl value of select keywordThesaurus gt lt xsl text gt lt xsl text gt lt xsl if gt lt xsl variable gt lt xsl apply templates mode simpleElement s
38. XML Services GeoNetwork Developer Manual Release 2 10 4 0 e email User email e org User organisation departament e kind Kind of organisation e groups Group identifier to set for the user can be multiple groups elements e groupid Group identifier Note If an optional parameter is not provided the value is updated in the database with an empty string Update user information request example Uri http localhost 8080 geonetwork srv eng xml user update ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt operation gt editinfo lt operation gt lt id gt 5 lt id gt lt username gt samantha lt username gt lt password gt editor2 lt password gt lt profile gt Editor lt profile gt lt name gt Samantha lt name gt lt city gt Rotterdam lt city gt lt country gt Netherlands lt country gt lt email gt samantha mail net lt email gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id missing parameter gt lt message gt username lt message gt lt class gt MissingParameterEx lt class gt lt stack gt lt stack gt lt error gt Se
39. find information about the schema elements and codelists should use the xml schema info service described in this section of the manual 178 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e add delete update schema plugins in GeoNetwork should use the xml metadata schema add xml metadata schema delete and xml metadata schema update services described in this section of the manual 9 21 1 Metadata Schema Information xml info type schemas See Site Information xml info for more details 9 21 2 Schema Element and Codelist Information xml schema info This service returns information about a set of schema elements or codelists The returned information consists of a localised label a description conditions that the element must satisfy etc Request Requests to this service can only be made using the HTTP POST binding with application XML content type Requests can ask for information on multiple elements and codelists from different schemas Description of the request fields is as follows e element Must contain a schema and a name attribute The schema attribute must be the name of a schema currently registered in GeoNetwork see Site Information xml info for more details The name attribute must be the qualified name of the metadata schema element on which information is required Other optional attributes can be specified to help determine the appropriate context for the metadata
40. if a metadata record with the identifier provided does not exist Only the owner of the metadata can set the status User is not the owner of the metadata if the user does not have ownership rights over the metadata record 9 11 2 Batch update status xml metadata batch update status The xml metadata batch update status service updates the status on a selected set of metadata using the status and changeMessage sent as parameters Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select metadata records Note Only those metadata records for which the user running the service has ownership rights on will be updated and all status values previously assigned will be deleted If metadata versioning is on then status changes will be recorded in the version history Requires authentication Yes Request Parameters e status One of the status identifiers take from the database table statusvalues Status iden tifiers can be retrieved using the Site Information xml info service The core status identifiers are e 0 unknown e draft 9 11 Metadata Status services 123 GeoNetwork Developer Manual Release 2 10 4 0 e 2 approved e 3 retired e 4 submitted e 5 rejected e changeMessage description of why the status has changed Example request POST Url http localhost 8080 geonetwork srv eng xml metadata bat
41. lt gmd MD_BrowseGraphic gt lt gmd fileName gt lt gco CharacterString gt bluenet_s png lt gco CharacterString gt lt gmd fileName gt lt gmd fileDescription gt lt gco CharacterString gt thumbnail lt gco CharacterString gt lt gmd fileDescription gt lt gmd fileType gt lt gco CharacterString gt png lt gco CharacterString gt lt gmd fileType gt lt gmd MD_BrowseGraphic gt lt gmd graphicOverview gt lt gmd graphicOverview gt lt gmd MD_BrowseGraphic gt lt gmd fileName gt lt gco CharacterString gt bluenet png lt gco CharacterString gt lt gmd fileName gt lt gmd fileDescription gt lt gco CharacterString gt large_thumbnail lt gco CharacterString gt lt gmd fileDescription gt lt gmd fileType gt lt gco CharacterString gt png lt gco CharacterString gt lt gmd fileType gt lt gmd MD_BrowseGraphic gt lt gmd graphicOverview gt When ext ract thumbnails xs1 is run it creates a small XML hierarchy from this information which looks something like the following lt thumbnail gt lt large gt bluenet png lt large gt lt small gt bluenet_s png lt small gt lt thumbnail gt e set thumbnail xsl this XSLT does the opposite of extract thumbnails xsl It takes the simplified common XML structure used by GeoNetwork to describe the large and small thumbnails and creates the elements of the metadata record that are needed to represent them This is a slightly
42. set simple partial full localld This is an optional element If present indicates the id used locally by the sourceld actor to store the metadata Its purpose is just to allow the reuse of the same local id when reimporting a metadata isTemplate A boolean field that indicates if this metadata is a template used to create new ones There is no real distinction between a real metadata and a template but some actors use it to allow fast metadata creation The value must be true false 8 4 The info xml file 61 GeoNetwork Developer Manual Release 2 10 4 0 e rating This is an optional element If present indicates the users rating of the metadata ranging from 1 a bad rating to 5 an excellent rating The special value 0 means that the metadata has not been rated yet Can be used to sort search results e popularity Another optional value If present indicates the popularity of the metadata The value must be positive and high values mean high popularity The criteria used to set the popularity is left to the writer Its main purpose is to provide a metadata ordering during a search 2 categories a container for categories associated to this metadata A category is just a name like audio video that classifies the metadata to allow an easy search Each category is specified by a category element which must have a name attribute This attribute is used to store the category s name If there are no cate
43. 0 lt xlinkResolver gt lt autofixing gt lt enable gt true lt enable gt lt autofixing gt lt searchStats gt lt enable gt false lt enable gt lt searchStats gt lt indexoptimizer gt lt enable gt true lt enable gt lt at gt lt hour gt 0 lt hour gt lt min gt 0 lt min gt lt sec gt 0 lt sec gt lt at gt lt interval gt lt day gt 0 lt day gt lt hour gt 24 lt hour gt lt min gt 0 lt min gt lt interval gt lt indexoptimizer gt lt oai gt lt mdmode gt 1 lt mdmode gt lt tokentimeout gt 3600 lt tokentimeout gt lt cachesize gt 60 lt cachesize gt lt oai gt lt inspire gt lt enable gt false lt enable gt lt enableSearchPanel gt false lt enableSearchPanel gt lt inspire gt lt harvester gt lt enableEditing gt false lt enableEditing gt lt harvester gt lt metadata gt lt enableSimpleView gt true lt enableSimpleView gt lt enablelIsoView gt true lt enableIsoView gt lt enableInspireView gt false lt enableInspireView gt lt enableXmlView gt true lt enableXmlView gt lt defaultView gt simple lt defaultView gt lt metadata gt lt metadataprivs gt lt usergrouponly gt false lt usergrouponly gt lt metadataprivs gt lt threadedindexing gt lt maxthreads gt 1 lt maxthreads gt lt threadedindexing gt lt autodetect gt lt enable gt false lt enable gt lt autodetect gt lt requestedLanguage gt lt only gt prefer_locale lt only gt
44. 06 jsr 305 update http www klocwork com blog static analysis jsr 305 a silver bullet or not a bullet at all http minds coremedia com 2012 10 31 jsr 305 nonnull and guava preconditions http findbugs sourceforge net manual annotations html the package names are outof date and should be java annotation instead of edu umd cs findbugs annotation but the descriptions are ac curate 1 7 Eclipse setup 11 GeoNetwork Developer Manual Release 2 10 4 0 12 Chapter 1 Software development CHAPTER 2 Create a release This guide details the process of performing a release Note e BRANCH Branches are created for major stables releases and end with x for example 2 8 x e VERSION for tag version to release for example 2 8 1 or 2 8 1RCO 2 1 Call for vote In order to make a release ask the PSC to vote for the new release 2 2 Release committee To create new releases a committee of 2 4 persons should be chosen The members of the committee are responsible for creating the releases following the steps described in this section A rotation policy can be use to select a person from the committee who will be responsible for creating each release 2 3 Notify developer lists It is good practice to notify the GeoNetwork developer list of the intention to make the release a few days in advance On the day the release is being made a warning mail must be sent to the list asking that developers refrain fro
45. 1 1 amp REQUE lt link href http localhost 8080 geonetwork srv eng google kml uuid 5df54bf0 3a7 lt description gt GeoNetwork opensource provides Internet access to interactive maps sat lt guid gt http localhost 8080 geonetwork uuid 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt lt media content url geonetwork srv eng resources get id 11l fname thumbnail_s gif lt media text gt Major hydrological basins and their sub basins lt media text gt lt Bounding box in georss simplepoint format default http georss org gt lt georss point gt 16 9 1 8 lt georss point gt lt item gt lt channel gt lt rss gt 9 6 5 RSS latest Get latest updated metadata rss latest The rss latest service can be used to retrieve the most recently modified metadata records in RSS format This service can be configured in WEB INF config xml file with the following parameters e maxltems Maximum number of RSS records to retrieve default 20 e timeBetweenUpdates Minimum time in seconds between queries for latest updated metadata If a request is received less than timeBetween Updates seconds after the last request it will receive the same response Requires authentication Optional If not provided only public metadata records are retrieved 100 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Request Parameters e georss valid values are simple simplepoint and defau
46. 10 4 0 Procedure for adding schematron rules working within the schematrons directory 1 Place your schematron rules in rules Naming convetion is schematron rules lt suffix gt sch eg schematron rules iso mep sch Place localized strings for the rule assertions into rules loc lt language_prefix gt 2 Edit build xml 3 Add a clean schema dir target for your plugin schema directory This target will remove the schematron rules from plugin schema directory basically removes all files with pattern schematron rules xsl 4 Add a compile schematron target for your rules value attribute is the suffix used in the rules name eg for schematron rules iso mcp sch the value attribute should be iso mcp This target will turn the sch schematron rules into an XSLT using the saxon XSLT engine and resources iso_svrl_for_xslt2 xsl 5 Add a publish schematron target This target copies the compiled rules in XSLT form into the plugin schema directory 6 Run ant to create the schematron XSLTs At this stage our new GeoNetwork plugin schema for MCP contains extract date modified xsl extract gml xsd extract uuid xsl index fields xsl loc present sample data schema conversions xml schema ident xml schema xsd schema schematron rules iso mcp xsl 7 3 10 Adding the components necessary to create and edit MCP metadata So far we have added all the components necessary for GeoNetwork
47. 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document confirming success is returned An example response is lt response status ok message Schema isol9139 mcp has been added updated gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id operation aborted gt lt message gt Schema doesn t exist lt message gt lt class gt OperationAbortedEx lt class gt lt error gt See Exception handling for more details 9 21 5 Delete a metadata schema xml metadata schema delete The xml metadata schema delete service can be used to delete a metadata schema in GeoNetwork A metadata schema can only be deleted if e there are no metadata records in the catalog that use it e no other metadata schema is dependent on it Only Administrator users can run this service Requires authentification Yes Request Parameters e schema mandatory Name of the schema to delete Must be the name of a currently registered metadata schema in GeoNetwork Schema delete request example edie http localhost 8080 geonetwork srv eng xml metadata schema delete Mime type application xml Post request lt request gt lt schema gt isol19139 mcp lt schema gt
48. 9 0 153 64 9 0 153 64 43 8 112 9 43 8 112 9 9 0 lt gml coordinates gt lt gml LinearRing gt lt gml exterior gt lt gml Polygon gt lt gml GeometryCollection gt If there is more than one extent in the metadata record then they should also appear in this gml GeometryCollection element To find out more about gml see Lake Burggraf Trninic and Rae GML Geography Mark Up Lan guage Foundation for the Geo Web Wiley 2004 Finally a note on projections It is possible to have bounding polygons in an MCP record in a projection other than EPSG 4326 GeoNetwork transforms all projections known to GeoTools and encoded in a form that GeoTools understands to EPSG 4326 when writing the spatial extents to the shapefile or spatial database e extract uuid xsl this XSLT processes the metadata record and extracts the identifier for the record For the MCP and base ISO standard this information is held in the gmd fileldentifier element which is a child of mcp MD_Metadata These xslts can be tested by running them on a metadata record from the schema You should use the saxon xslt processor For example java jar INSTALL DIR web geonetwork WEB INF lib saxon 9 1 0 8b patch jar s testmcp xml o output xml extract gml xsl At this stage our new GeoNetwork plugin schema for MCP contains extract date modified xsl extract gml xsd extract uuid xsl schema conversions xml schema ident xml schema xsd schema 7 3 5 Cr
49. CEST 2010 and your local maven repository should contain the GeoNetwork artifacts created SHOME m2 repository org geonetwork opensource Note Many Maven build options are available Please refer to the maven documentation for any other options Maven The Complete Reference For instance you might like to use following options Skip test mvn install Dmaven test skip true Offline use mvn install o Please refer to the maven documentation for any other options Maven The Complete Reference 1 4 1 Run embedded jetty server Maven comes with built in support for Jetty via a plug in To run GeoNetwork with embedded jetty server you have to change directory to the root of the web module and then execute the following maven command mvn jetty run After a moment GeoNetwork should be accessible at http localhost 8080 geonetwork 1 4 2 Source code documentation The GeoNetwork Java source code is based on Javadoc Javadoc is a tool for generating API documen tation in HTML format from doc comments in source code To see documentation generated by the Javadoc tool go to e GeoNetwork opensource Javadoc 1 4 3 User developer and widget API documentation Note Building the GeoNetwork documentation requires the following be installed e Sphinx version 0 6 or greater sphinx doc on ubuntu debian e TeX Live texlive full on ubuntu debian e make utility 6 Chapter 1
50. GeoNetwork harvesters These services allow complete control over harvester behaviour Authentication is required for all services described in this section In addition these services can only be run by users with the Administrator profile 9 20 1 Get harvester definitions xml harvesting get Retrieves information about one or all configured harvesters Request Called without parameters this service returns all harvesters Example lt request gt Otherwise an id parameter can be specified to request the definition of a specific harvester instance 9 20 Harvesting services 165 GeoNetwork Developer Manual Release 2 10 4 0 lt request gt lt id gt 123 lt id gt lt request gt Response When called without parameters the service returns HTTP status code 200 along with an XML document with all harvester instances The XML document has a root element called nodes with a node child for each harvester Example of an xml harvesting get response for a GeoNetwork harvester lt nodes gt lt node id 125 type geonetwork gt lt site gt lt name gt test 1 lt name gt lt uuid gt 0619cc50 708b 11da 8202 000d9335aaae lt uuid gt lt account gt lt use gt false lt use gt lt username gt lt password gt lt account gt lt host gt http www fao org geonetwork lt host gt lt createRemoteCategory gt true lt createRemoteCategory gt lt mefFormatFull gt true lt mefFormatFull gt lt xslfilter gt
51. MD_Commons element be defined which can substitute for gmd MD_Constraints This is shown in the following snippet of XSD lt xs complexType name MD_CommonsConstraints_Type gt lt xs annotation gt lt xs documentation gt Add MD_Commons as an extension of gmd MD_Constraints_Type lt xs documentation gt lt xs annotation gt lt xs complexContent gt lt xs extension base gmd MD_Constraints_Type gt lt xs sequence minOccurs 0 gt lt xs element name jurisdictionLink type gmd URL_PropertyType minOccurs 1 gt lt xs element name licenseLink type gmd URL_PropertyType minOccurs 1 gt lt xs element name imageLink type gmd URL_PropertyType minOccurs 1 gt lt xs element name licenseName type gco CharacterString_PropertyType minOccurs lt xs element name attributionConstraints type gco CharacterString_ PropertyType lt xs element name derivativeConstraints type gco CharacterString_PropertyType lt xs element name commercialUseConstraints type gco CharacterString_PropertyTy lt xs element name collectiveWorksConstraints type gco CharacterString_Property 56 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 lt xs element name otherConstraints type gco CharacterString_PropertyType min lt xs sequence gt lt xs attribute ref mcp commonsType use required gt lt xs attribute ref gco isoType use required fixed gmd MD_Constraints gt
52. Metadata services 95 GeoNetwork Developer Manual Release 2 10 4 0 createDate Metadata creation date changeDate Metadata last modification date isTemplate Indicates if the metadata returned is a template title Metadata title source Source catalogue the metadata uuid Metadata Universally Unique Identifier UUID isHarvested Indicates if the metadata is harvested popularity Indicates how often the record is retrieved rating Average rating provided by users State of operation on metadata for the user view notify download dynamic featured edit owner Indicates if the user that executed the service is the owner of metadata ownername Metadata owner name Get metadata response example lt xml version 1 0 encoding UTF 8 gt lt Metadata xmlns geonet http www fao org geonetwork xmlns csw http www opengis net cat csw 2 0 2 gt lt mdFileID gt aa9bc613 8eef 4859 a9eb 4df35d8b21e4 lt mdFileID gt lt geonet info gt lt id gt 10 lt id gt lt schema gt isol9115 lt schema gt lt createDate gt 2005 08 23T17 58 18 lt createDate gt lt changeDate gt 2007 03 12T17 49 50 lt changeDate gt lt isTemplate gt n lt isTemplate gt lt title gt lt source gt 881a1630 d4e7 4c9c aa01 7a9bbbbc47b2 lt source gt lt uuid gt aa9bc613 8eef 4859 a9eb 4df 35d8b21e4 lt uuid gt lt isHarvested gt n lt isHarvested gt lt popularity gt 0 lt popularity gt lt rating gt 0 lt rating gt lt vi
53. Request example POST Uri http localhost 8080 geonetwork srv eng xml metadata status ime type application xml Post request lt xml version 1 0 encoding UIF 8 gt lt request gt lt id gt 6 lt id gt lt status gt 5 lt status gt lt changeMessage gt Completely unacceptable consistency rules ignored lt changeMessage gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata status id 6 status 5 amp changeMessage Note URL encoding of changeMessage Response If the request executes successfully then HTTP status code 200 is returned along with an XML document which contains the identifier of the metadata whose status has been updated Example 122 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt response gt lt id gt 6 lt id gt lt response gt If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 401 HTTP code e Metadata not found error id metadata not found
54. Service not allowed error id service not allowed user isn t allowed to run this service Re turned 500 HTTP code e Unauthorized user attempted to list editable metadata error id operation not allowed when the user is not allowed to list metadata records Returned 500 HTTP code 9 6 4 RSS Search Search metadata and retrieve in RSS format rss search The rss search service can be used to retrieve metadata records in RSS format using regular search parameters This service can be configured in WEB INF config xml with the following parameters e maxSummaryKeys Maximum number of RSS records to retrieve default 10 Requires authentication Optional If not provided only public metadata records are retrieved Request Parameters e georss valid values are simple simplepoint and default See also http georss org simple Bounding box in georss simple format simplepoint Bounding box in georss simplepoint format default Bounding box in georss GML format e eastBL southBL northBL westBL Bounding box to restrict the search e relation Bounding box criteria Values equal overlaps default encloses fullyOutsideOf intersection crosses touches within e any Text to search in a free text search e title Metadata title 98 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e abstract Metadata abstract e themeKey Metadata keywords To search for several use a value like
55. Site Information xml info service Example request POST Uri http localhost 8080 geonetwork srv eng xml metadata batch update privileges Mime type application xml Post request 9 9 Metadata Privilege services 113 GeoNetwork Developer Manual Release 2 10 4 0 lt xml version 1 0 encoding UTF 8 gt lt request gt lt 12 fe lt 11 gt lt request gt GET Uris http localhost 8080 geonetwork srv eng xml metadata batch update privileges _1_2 amp _1_1 Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully updated e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the request fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is shown below lt error id service not allowed gt lt message gt Service not allowed lt message gt lt err
56. Software development GeoNetwork Developer Manual Release 2 10 4 0 apt get install texlive full easy _ install Sphinx easy install JSTools In order to build the documentation mvn clean install Pwith doc 1 5 Creating the installer To run the build script that creates the installer you need the Ant tool You can generate an installer by running the ant command inside the installer directory S ant Buildfile build xml setProperties BUILD SUCCESSFUL Total time 31 seconds Both platform independent and Windows specific installers are generated by default Make sure you update version number and other relevant properties in the installer build xml file You can also create an installer that includes a Java Runtime Environment JRE for Windows This will allow GeoNetwork to run on a compatible embedded JRE and thus avoid error messages caused by JRE incompatibilities on the PC Creating an installer with an embedded JRE requires you to first download and unzip the JRE in a folder jre1 5 0_12 at the project root level Refer to the installer config win jre xml file for exact configuration 1 6 Running tests Build the application and run the integration tests in web itests mvn clean install Pitests 1 6 1 Packaging GeoNetwork using Maven Using Maven you have the ability to package GeoNetwork in two different ways e WAR files geonetwork war geoserver war e Binary ZIP package with
57. a metadata schema that does not have the specified processing XSLT lt error id bad parameter gt lt message gt Processing failed lt message gt lt object gt Not found 0 Not owner 0 No process found 1 lt object gt lt error gt See Exception handling for more details Errors Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Bad Parameter error id bad parameter when the processing XSLT transform returns an empty metadata record explanation is returned in XML see example response above Returns 500 HTTP code 134 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 9 14 3 Batch process metadata records with an XSLT xml metadata batch processing The xml metadata batch processing service applies an XSLT to each metadata record in a selected set of metadata records Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select metadata records Note This service is only available to users with UserAdmin or Administrator profile Note Only those metadata records for which the user running the service has editing rights on will be processed If metadata versioning is on then any changes to the metadata records will be recorded in the version history Requires a
58. abstract Metadata abstract any Content from all metadata elements for free text changeDate Date that the metadata record was modified createDate Date that the metadata record was created denominator Scale denominator in data resolution download Does the metadata record have a downloadable resource attached 0 or 1 digital Is the metadata record distributed available in a digital format 0 or 1 eastBL East bounding box longitude keyword Metadata keywords metadataStandardName Metadata standard name northBL North bounding box latitude operatesOn Uuid of metadata record describing dataset that is operated on by a service orgName Name of organisation listed in point of contact information parentUuid Uuid of parent metadata record paper Is the metadata record distributed available in a paper format 0 or 1 protocol On line resource access protocol publicationDate Date resource was published southBL South bounding box latitude spatialRepresentationType vector raster etc tempExtentBegin Beginning of temporal extent range tempExtentEnd End of temporal extent range title Metadata title topicCat Metadata topic category type Metadata hierarchy level should be dataset if unknown westBL West bounding box longitude For example here is the mapping created between the metadata element mcp revisionDate and the lucene index field changeDate lt xsl for lt xsl for each gt ach select mcp revisionDate gt lt Fi
59. an XML document with the details of the exception what went wrong An example error response is lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e User XXXX doesn t exist if a user with provided id value does not exist Returns 500 HTTP code 76 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 User information xml user get The xml user get service returns information on a specified user Requires authentication Yes Request Parameters e id Identifier of user to retrieve User get request example Url http localhost 8080 geonetwork srv eng xml user get ime type application xml Post request lt request gt lt id gt 2 lt id gt lt request gt Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document containing the user information including the groups they belong to is returned An example response is lt response gt lt record gt lt id gt 2 lt id gt lt username gt bullshot lt username gt lt password gt 112c535b861a904569285c941277d0c642eea4bb lt password gt lt surname gt Shot lt surname gt lt
60. be transferred e The user id of the user running this service will be used to obtain a list of target groups and editors to which the metadata records belonging to user id can be transferred Retrieve ownership groups request example Url http localhost 8080 geonetwork srv eng xml ownership groups Mime type application xml 9 10 Metadata Ownership services 119 GeoNetwork Developer Manual Release 2 10 4 0 Pos lt 7X lt re lt lt r t request ml version 1 0 encoding UTF 8 gt quest gt id gt 2 lt id gt equest gt Response Successful execution returns HTTP status code 200 and an XML document with the results The ele ments of the response are as follows e root This is the container for the response e response This is the container for the response e group A group which has privileges over the metadata records owned by the user with user id id can be multiple group elements These groups can be used as the source group list for the transfer ownership service e id name description email referrer label Group information e targetGroup A user group to which the user running this service has been assigned can be multiple targetGroup elements The groups can be used as the target group list and the editors from the groups can be target editors for the transfer ownership service e id name description email referrer label Group information e editor Users from the
61. element rule The idea behind this processing algorithm is that base schemas will use a root element rule or the more difficult to control namespaces rule and profiles will use a finer or more specific rule such as attributes or elements After setting up schema ident xml our new GeoNetwork plugin schema for MCP contains schema ident xml 7 3 2 Creating the schema conversions xml file This file describes the converters that can be applied to metadata records that belong to the schema Each converter needs a GeoNetwork Jeeves service and a transformation XSL stylesheet If you need a custom service you will need to implement it but this topic goes beyond the scope of this page anyway usually you will only need an XSL file and one of the default GeoNetwork services The schema conversions xml file for the MCP is as follows lt conversions gt lt converter name xml iso19139 mcep nsUri http bluenet3 antcrc utas edu au mcp 36 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 schemaLocation http bluenet3 antere utas edu au mcep 1l 5 experimental sc xslt xml_isol9139 mcp xsl gt lt converter name xml_iso19139 mcp 1 4 nsUri http bluenet3 antcrc utas edu au mcp schemaLocation http bluenet3 antcrc utas edu au mcp schema xsd xslt xml_isol9139 mcp 1 4 xsl gt lt converter name xml_isol19139 mcpTooai_dc nsUri http www openarchives org OAI 2 0
62. elements under a new namespace to gmd identificationInfo gmd MD_Dataldentification To detect records that belong to this profile the autodetect section in the schema ident xml file could look something like the following lt autodetect xmlns cmar http www marine csiro au schemas cmar xsd gt lt catch all cmar records that have the cmar vocab element gt lt attributes cmar vocab http www marine csiro au vocabs projectCodes xml gt lt autodetect gt Some other points about attributes autodetect e multiple attributes can be specified all must be match for the record to be recognized as belonging to this schema e if the attributes have a namespace then the namespace should be specified on the autodetect ele ment or somewhere in the schema ident xml document 2 Elements Find one or more elements in the document An example use case is the one shown in the example schema ident xml file earlier lt autodetect xmins mcp http bluenet3 antcrc utas edu au mcp xmlns gmd http www isotc211 org 2005 gmd xmlns gco http www isotc211 o0rg 2005 gco gt lt elements gt 7 3 Example ISO19115 19139 Marine Community Profile MCP 33 GeoNetwork Developer Manual Release 2 10 4 0 lt gmd metadataStandardName gt lt gco CharacterString gt Australian Marine Community Profile of ISO 19115 2005 19139 Marine Community Profile of ISO 19115 2005 19139 lt gco CharacterString gt lt gmd metadataStanda
63. error id metadata not found if a metadata record with the identifier provided does not exist Returns 500 HTTP code 112 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e ERROR insert or update on table operationallowed violates foreign key operational lowed_operationid_fkey if an operation identifier provided is not valid Returns 500 HTTP code e ERROR insert or update on table operationallowed violates foreign key operational lowed_groupid_fkey if a group identifier provided is not valid Returns 500 HTTP code 9 9 2 Batch update privileges xml metadata batch update privileges The xml metadata batch update privileges service updates the privileges on a selected set of metadata using the list of groups and privileges sent as parameters Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select metadata records Note Only those metadata records for which the user running the service has ownership rights on will be updated and all privileges previously assigned will be deleted Requires authentication Yes Request Parameters e _G_O can be multiple elements G Group identifier O Privilege Operation identifier Privilege identifiers e 0 view e 1 download 2 editing 3 notify e 4 dynamic 5 featured Group and Operation Identifiers can be obtained using
64. exist Returns 500 HTTP code e Concurrent update error id client when the version number provided is different from the current version number Metadata record is in use by another user Returns 500 HTTP code 9 7 3 Delete metadata xml metadata delete The xml metadata delete service removes a metadata record from the catalog The metadata record is backed up in MEF format in GEONETWORK_DATA_DIR removed Requires authentication Yes Request Parameters e id or uuid mandatory Identifier of the metadata to delete Example request Uri http localhost 8080 geonetwork srv eng xml metadata delete Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 10 lt id gt lt request gt Response If request executed successfully HTTP 200 status code is returned and an XML document with details of what has been deleted Example success response lt response gt lt id gt 32 lt id gt lt response gt If request fails an HTTP 500 status code error is returned and the response is an XML document with the exception Example error response lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt stack gt lt stack gt lt request gt lt request gt lt error gt See Exception handling for more details 9 7 Metadata insert update and delete ser
65. gt username lt message gt lt class gt MissingParameterEx lt class gt lt stack gt lt stack gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter when a mandatory field is empty Returns 500 HTTP code e Unknown profile XXXX error id error when the profile is not valid Returns 500 HTTP code e ERROR you don t have rights to do this when the authenticated user is not an Administrator or UserAdmin Returns 500 HTTP code Update current authenticated user information xml user infoupdate The xml user infoupdate service can be used to update the information related to the current authenti cated user Requires authentication Yes 9 4 User services 83 GeoNetwork Developer Manual Release 2 10 4 0 Request Parameters e surname mandatory User surname e name mandatory User name e address User physical address e city User address city e state User address state e zip User address zip e country User address country e email User email e org User organisation departament e kind Kind of organisation Note If an optional parameter is not provided the value is updated
66. integer or parentUuid This is the identifier of the metadata which we are removing the relationship from e childId integer or parentUuid This is the identifier of the metadata which is related to metadata record specified by parentId or parentUuid Here is an example of POST XML request lt request gt lt parentId gt 1 lt parentId gt lt childId gt 2 lt childId gt lt request gt Response Normally an HTTP status code 200 is returned along with an XML document with an empty response root element Note this service returns an empty response regardless of whether the parent and or child metadata metadata records specified in the id parameters exist or not If the response did not execute successfully then an HTTP error code 500 is returned along with an XML document describing the exception what went wrong See Exception handling for more details 9 15 Metadata Relation services 143 GeoNetwork Developer Manual Release 2 10 4 0 9 16 Metadata Validation services These services are for validating metadata against the XML schema documents XSDs and schematrons specified as part of a GeoNetwork Metadata Schema See Schema Plugins for more details 9 16 1 Validate a metadata record xml metadata validation This service can be used to validate a metadata record supplied as an XML parameter The metadata record is first passed through the GeoNetwork schema detection rules see Schema Plugins After success
67. is related to maps and all other private files Any other element or attribute should be ignored by readers that don t understand them This allows actors to add custom attributes or subtrees to the XML 8 4 1 Date format Unless differently specified all dates in this file must be in the ISO 8601 format The pattern must be YY Y Y MM DDTHH mm SS and the timezone should be the local one Example of info file lt info version 1 0 gt lt general gt lt uuid gt 0619abc0 708b da 8202 000d98959033 lt uuid gt lt createDate gt 2006 12 11T10 33 21 lt createDate gt lt changeDate gt 2006 12 14T08 44 43 lt changeDate gt lt siteId gt 0619cc50 708b 11da 8202 000d9335906e lt siteld gt lt siteName gt FAO main site lt siteName gt lt schema gt isol9139 lt schema gt lt format gt full lt format gt lt localId gt 204 lt locallId gt lt isTemplate gt false lt isTemplate gt lt general gt lt categories gt 62 Chapter 8 Metadata Exchange Format GeoNetwork Developer Manual Release 2 10 4 0 lt category name maps gt lt category name datasets gt lt categories gt lt privileges gt lt group name editors gt lt operation name view gt lt operation name download gt lt group gt lt privil lt public gt lt fil lt fil lt public gt leges gt le name small png changeDate 2006 10 07T13 44 32 gt le name large png changeDate 2006 11 11
68. iso19139 mep match mcp taxonomicElement gt lt xsl param name schema gt lt xsl param name edit gt lt xsl template gt e templates that override elements in the base schema are processed in the profile mode iso19139 mcp 7 3 Example ISO19115 19139 Marine Community Profile MCP 49 GeoNetwork Developer Manual Release 2 10 4 0 lt xsl template mode isol19139 mep match gmd keyword gt lt xsl param name schema gt lt xsl param name edit gt lt xsl template gt Notice that the template header of the profile has a simpler design than that used for the original design Neither the priority attribute or the schema XPath condition is required because we are using a different mode to the base schema e To support processing in two modes we need to add a null template to the profile mode iso19139 mep as follows lt xsl template mode isol9139 mcp match x gt This template will match all elements that we don t have a specific template for in the profile mode iso19139 mcp These elements will be processed in the base schema mode iso19139 instead because the null template returns nothing see the main template discussion above The remainder of the discussion in the original design relating to tabs etc applies to the alternative design and is not repeated here CSW Presentation XSLTs The CSW server can be asked to provide records in a number of output schemas The two supported by
69. label gt lt description gt date when the resource was brought into existence lt description gt lt entry gt lt entry gt lt code gt publication lt code gt lt label gt Publication lt label gt lt description gt date when the resource was issued lt description gt lt entry gt lt entry gt lt code gt revision lt code gt lt label gt Revision lt label gt lt description gt date identifies when the resource was examined or re examined and improved or amended lt description gt lt entry gt lt codelist gt lt response gt Error management If an exception occurs during the processing of the request then an HTTP 500 status code is returned along with an XML document describing the exception See Exception handling for more details 180 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Apart from exceptions the service can encounter errors trying to retrieve an element codelist information eg if the requested element is not present If such an error is encountered then the object is copied from the response and an error attribute is added describing the error An example of such a response is lt response gt lt element schema iso19139 name blablabla error not found gt lt response gt Possible errors returned by xml schema info service Error code Description unknown schema The specified schema is not supported unknown namespace
70. lt profile gt lt group gt lt userAttribs gt lt defaultGroup gt lt ldap gt lt selectionmanager gt lt maxrecords gt 1000 lt maxrecords gt lt selectionmanager gt lt csw gt lt enable gt true lt enable gt lt contactId gt lt metadataPublic gt false lt metadataPublic gt lt csw gt lt shib gt lt use gt false lt use gt lt path gt geonetwork srv eng shib user login lt path gt lt attrib gt lt username gt REMOTE USER lt username gt lt surname gt Shib Person surname lt surname gt lt firstname gt Shib InetOrgPerson givenName lt firstname gt lt profile gt Shib EP Entitlement lt profile gt lt group gt lt organizationName gt lt postalAddress gt lt phone gt lt email gt lt fullName gt lt attrib gt lt defaultGroup gt lt shib gt lt userSelfRegistration gt lt enable gt false lt enable gt lt userSelfRegistration gt lt clickablehyperlinks gt lt enable gt true lt enable gt lt clickablehyperlinks gt lt localrating gt lt enable gt false lt enable gt lt localrating gt lt downloadservice gt lt leave gt false lt leave gt lt simple gt true lt simple gt lt withdisclaimer gt false lt withdisclaimer gt lt downloadservice gt lt xlinkResolver gt lt enable gt false lt enable gt H 152 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4
71. lt schema gt lt record gt lt stylesheets gt lt root gt ogcwxsOutputSchemas Return list of schemas that have GetCapabilities conversion stylesheets for a particular three letter OGC service type code These stylesheets are stored in the OGCWxSGetCapabilitiesto19119 direc tory in the convert directory of a metadata schema eg for schema iso19139 e the directory for these stylesheets would be GEONETWORK DATA DIR config schema plugins iso19 e if a conversion from the GetCapabilities statement of a particular OGC service to a metadata record of this schema exists then a stylesheet for that serviceType will be present in the direc tory eg for schema isol9139 and serviceType WFS the conversion stylesheet name would be OGCWFSGetCapabilities to ISO19119 ISO19139 xsl POST Request Example lt request gt lt type gt ogcwxsOutputSchemas lt type gt lt serviceType gt WwFS lt serviceType gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info 9 20 Harvesting services 173 GeoNetwork Developer Manual Release 2 10 4 0 Response Example lt root gt lt schemas gt lt record gt lt id gt isol9139 lt id gt lt name gt isol9139 lt name gt lt record gt lt schemas gt lt root gt Errors If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response i
72. lt source gt lt search gt lt searches gt lt categories gt lt category id 5 gt lt categories gt lt groupsCopyPolicy gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting instead a more sophisticated approach using the metadata processing services can be applied through the importXslt setting for more details and an example see Metadata Processing services for more details 10 3 2 Harvesting node webdav This harvester type is capable of connecting to a web server which is WebDAV enabled WebDAV is WEB Distributed Authoring and Versioning or WAF Web Accessible Folder enabled e node string webdav site Contains the URL to connect to and account information x url string URL to connect to Must be well formed starting with http file or a supported protocol icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons options recurse boolean Indicates if the remote folder must be recursively scanned for meta data x validate boolean If set the harvester will validate the metadata against its schema and the metadata
73. lt eastBL gt 180 0 lt eastBL gt lt southBL gt 90 0 lt southBL gt lt northBL gt 90 0 lt northBL gt lt geoBox gt lt geonet info gt lt id gt 11 lt id gt lt schema gt fgdc std lt schema gt lt createDate gt 2005 03 31T19 13 31 lt createDate gt lt changeDate gt 2007 03 12T14 52 46 lt changeDate gt lt isTemplate gt n lt isTemplate gt lt title gt lt source gt 38b75clb 634b 443e 9c36 al2e8 9b4c866 lt source gt lt UUID gt 8 4b4190b de43 4bd7 b25f 6ed47eb239ac lt uuid gt lt isHarvested gt n lt isHarvested gt lt view gt true lt view gt lt admin gt false lt admin gt lt edit gt false lt edit gt lt notify gt false lt notify gt lt download gt true lt download gt lt dynamic gt false lt dynamic gt lt featured gt false lt featured gt lt geonet info gt lt metadata gt If the response did not execute successfully then an HTTP error code 500 is returned along with an XML document describing the exception what went wrong See Exception handling for more details Note this service returns an empty response if the metadata record specified in the parameters doesn t exist xml relation insert This service creates a relationship between a parent metadata record and a child metadata record The relationship is held in the Relations table ie relationships inserted using this service are those that cannot be held in a metadata record Request e parentId integer
74. more complex XSLT than extract thumbnails xsl because the existing elements in the metadata record need to be retained and the new elements need to be created in their correct places e unset thumbnail xsl this XSLT targets and removes elements of the metadata record that de scribe a particular thumbnail The remaining elements of the metadata record are retained Because the MCP is a profile of ISO19115 19139 the easiest path to creating these XSLTs is to copy them from the isol19139 schema and modify them for the changes in namespace required by the MCP Creating the update XSLTs e update child from parent info xsl this XSLT is run when a child record needs to have content copied into it from a parent record It is an XSLT that changes the content of a few elements and 54 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 leaves the remaining elements untouched The behaviour of this XSLT would depend on which elements of the parent record will be used to update elements of the child record e update fixed info xsl this XSLT is run after editing to fix certain elements and content in the metadata record For the MCP there are a number of actions we would like to take to hard wire certain elements and content To do this the XSLT the following processing logic if the element is one that we want to process then add a template with a match condition for that element and process it else copy the
75. mynode org metadata lt url gt lt icon gt default gif lt icon gt lt account gt lt use gt true lt use gt lt username gt admin lt username gt lt password gt admin lt password gt lt account gt lt site gt lt options gt lt every gt 0 0 0 3 x x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt recurse gt false lt recurse gt lt validate gt true lt validate gt lt status gt inactive lt status gt lt options gt lt privileges gt lt group id 0 gt lt operation name view gt lt group gt lt group id 14 gt lt operation name download gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Each harvester has some common XML elements plus additional elements that are specific to each harvesting type The common XML elements are described at Harvesting nodes If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is 9 20 Harvesting services 167 GeoNetwork Developer Manual Release 2 10 4 0 lt error id object not found gt lt message gt Object not found lt message gt lt class gt ObjectNotFoundEx lt class gt lt error gt See Exception handling for more details Errors e ObjectNotFoun
76. name gt Bull lt name gt lt profile gt RegisteredUser lt profile gt lt address gt 41 Shot Street lt address gt lt city gt Kunnanurra lt city gt lt state gt Western Australia lt state gt lt zip gt 8988 lt zip gt lt country gt Australia lt country gt lt email gt gan gan com lt email gt lt organisation gt B7 lt organisation gt lt kind gt gov lt kind gt lt record gt lt groups gt lt id gt 2 lt id gt lt groups gt lt response gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is 9 4 User services 77 GeoNetwork Developer Manual Release 2 10 4 0 lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter id when id parameter is empty invalid Returns 500 HTTP code 9 4 2 User Maintenance Services Create a user xml user update The xml user update service can be used to create new users update user information and res
77. of an XML THREDDS catalog eg http motherlode ucar edu 8080 thredds catalog satellite 3 9 WEST CONUS_4km catalog xml HTML URLs will not work icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons options lang string three letter language code describing language of metadata being har vested almost always eng this value is used to set the metadata language in the records harvested from THREDDS topic string ISO topic category describing the harvested metadata 214 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 createThumbnails boolean If true and the THREDDS catalog delivers WMS im ages for a dataset whose metadata is being harvested then a thumbnail will be created from the WMS for the harvested metadata createServiceMd boolean If true then a skeleton ISO19119 service metadata record will be created for the services specified in the THREDDS catalog createCollectionDatasetMd boolean If true then metadata records will be created using harvested metadata fragments from collection datasets in the THREDDS catalog collectionGeneration fragments default Use fragments default refers to DIF met
78. of localized information labels codelists or schema specific strings Eg loc eng codelists xml e present Mandatory contains XSLTs for presenting metadata in the viewer editor and in re sponse to CSW requests for brief summary and full records e process Optional contains XSLTs for processing metadata elements by metadata suggestions mechanism see suggest xsl below 29 GeoNetwork Developer Manual Release 2 10 4 0 sample data Mandatory Sample metadata for this schema The metadata samples are in MEF format so that samples can have thumbnails or browse graphics as well as online resources schema Optional Directory containing the official XSDs of the metadata schema If the schema is described by a DTD then this directory is optional Note that schemas described by a DTD cannot be edited by GeoNetwork schematron Mandatory Directory containing the schematrons used to check conditions on content templates Optional Directory containing template and subtemplate metadata records for this schema Template metadata records are usually metadata records with the set of elements and content that will be used for a specific purpose Eg isol19139 mcp schema has a Minimum Element template that has the mandatory elements for the schema and a example of the content that is expected The following stylesheets can be present extract date modified xsl Mandatory Extract the date of modification from the metada
79. on the image format but it is strongly recommended to use the portable network graphics PNG JPEG or GIF format 4 private this is a directory used to store all data maps shape files etc uploaded with the meta data in the GeoNetwork editor Files in this directory are private in the sense that authorisation is required to access them There are no restrictions on the file types that can be stored into this directory Any other file or directory present in the MEF file should be ignored by readers that don t recognise them This allows actors to add custom extensions to the MEF file A MEF file can have empty public and private folders depending upon the export format which can be e simple both public and private are omitted e partial only public files are provided e full both public and private files are provided It is recommended to use the mef extension when naming MEF files 8 3 MEF v2 file format MEF version 2 support the following e multi metadata support more than one metadata record and data can be stored in a single MEF file e multi schema support be able to store in a single MEF n formats eg for an ISO profile also store a version of that record in the base ISO19115 ISO19139 schema Current export services that create MEF files from a metadata record with related records eg paent feature catalog etc can include these related metadata records in the MEF See mef export MEF v2 format structur
80. oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt lt categories gt lt category id 4 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting e ArcSDE java API libraries need to be installed by the user in GeoNetwork folder INSTALL_DIR web geonetwork WEB INF 1ib as these are proprietary li braries not distributed with GeoNetwork The following jars are required T e jpe_sdk jar e jsde_sdk jar 10 3 Harvesting nodes 221 GeoNetwork Developer Manual Release 2 10 4 0 Note dummy api XXX jar must be removed from INSTALL_DIR web geonetwork WEB INF 1lib 10 3 10 Harvesting node ogcwxs This harvester type is capable of harvesting metadata from the GetCapabilities response of OGC ser vices The settings for an OGCWXxS harvester type are e node string ogcwxs site x url string OGC WxS service URL entry point eg http localhost 7070 deegree services the harvester adds the necessary parame ters to call the GetCapabilities service ogctype WMS1 0 01 WMS1 1 1 WMS1 3 0 WFS1 0 01WFS1 1 01 IWCS1 0 01WPS0 4 01WPS1 0 01CSW2 0 2 SOS1 0 0 Type and version of OGC service being harvested icon string This is the icon that will be used as the metadata source logo The image
81. records can be used see Select metadata records xml metadata select for more details on how to select a set of metadata records This service is public but metadata access rules apply For a partial export the view privilege is enough but for a full export the download privilege is also required Without a login step only partial exports on public metadata are allowed This service uses the system temporary directory to build the MEF file By default the tmp directory is INSTALL_DIR web geonetwork data You will need to ensure that suffi cient disk space is available on that filesystem for full exports ie those that include data files uploaded with the metadata record to be successful Alternatively you can specify a different directory by configuring the uploadDir parameter in the general section of the INSTALL_DIR web geonetwork WEB INF config xml file Request This service accepts requests in GET POST and XML form The input parameters are all optional and are as follows 184 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 uuid the universal unique identifier of the metadata to be exported If this parameter is optional then the selected set of metadata will be exported To select a set of metadata see Select metadata records xml metadata select format which MEF format to use Can be one of simple partial full Default is full which means thumbnails and data files uploaded with the meta
82. root gt wfsFragmentStylesheets Return WES Fragment conversion stylesheets for a schema previously re turned by the request type wfsFragmentSchemas described above These 9 20 Harvesting services 171 GeoNetwork Developer Manual Release 2 10 4 0 stylesheets are stored in the WFSToFragments directory in the convert direc tory of a metadata schema eg for schema isol9139 this directory would be GEONETWORK_DATA DIR config schema_plugins isol9139 convert WFSToFragments POST Request Example lt request gt lt schema gt isol9139 lt schema gt lt type gt wfsFragmentStylesheets lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt stylesheets gt lt record gt lt id gt deegree22_philosopher_fragments xsl lt id gt lt name gt deegree22_philosopher_fragments lt name gt lt schema gt isol9139 lt schema gt lt record gt lt record gt lt id gt geoserver_boundary_fragments xsl lt id gt lt name gt geoserver_boundary_fragments lt name gt lt schema gt isol9139 lt schema gt lt record gt lt stylesheets gt lt root gt threddsFragmentSchemas Return list of schemas that have THREDDS Fragment conversion stylesheets These stylesheets are stored in the ThreddsToFragments directory in the convert di rectory of a metadata schema eg for schema isol9139 this directory would be GEONETWORK_DATA_DIR config schema_plug
83. schema name or the name of the base schema in this case iso19139 This modal processing is to ensure that only templates intended to process metadata elements from this schema or the base schema are applied The reason for this is that almost all profiles change or add a small number of elements to those in the base schema So most of the metadata elements in a profile can be processed in the mode of the base schema We ll see later in this section how to override processing of an element in the base schema a completeTab template which must be called lt schema name gt CompleteTab This template will display all tabs apart from the default or simple mode and the XML View tabs in the left hand frame of the editor viewer screen Here is an example for the MCP lt xsl template name is019139 mcpCompleteTab gt lt xsl param name tabLink gt lt xsl call template name displayTab gt lt non existent tab by profile gt lt xsl with param name tab select gt lt xsl with param name text select root gui strings byGroup gt lt xsl with param name tabLink select gt lt xsl call template gt lt xsl call template name displayTab gt lt xsl with param name tab select mcpMinimum gt lt xsl with param name text select root gui strings isol9139 mep mepMinimum gt lt xsl with param name indent select amp xA0 amp xA0 amp xA0
84. servic lt message gt Servic not allow da gt not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt stack gt lt at class jeeves server dispatchers ServiceManager file ServiceManager java line lt at class jeeves server JeevesEngine file JeevesEngine java line 621 method c lt at class jeeves server sources http JeevesServlet file JeevesServlet java lines lt at class jeeves server sources http JeevesServlet file JeevesServlet java lines lt at class javax servlet http HttpServlet file HttpServlet java line 727 methoc lt at class Jjavax servlet http HttpServlet file HttpServlet java line 820 methoc lt at class org mortbay jetty servlet ServletHolder file ServletHolder java line lt at class org mortbay jetty servlet ServletHandler file ServletHandler java line lt at class org mortbay jetty security SecurityHandler file SecurityHandler java lt at class org mortbay jetty servlet SessionHandler file SessionHandler java line lt stack gt lt object gt user update lt object gt lt request gt lt language gt en lt language gt lt service gt user update lt service gt lt request gt lt error gt Error code service not allowed Error message Service not allowed 9 24 3 Create a new user sending credentials This example show a request to cre
85. sh Commit the changes and build the website using the Hudson deployment system 2 10 Announce the release 2 10 1 Mailing lists Send an email to both the developers list and users list announcing the release Template email for RC Release Candidate X v VERSION now available for testing Dear all You can now download and test the release candidate v VERSION RCX of GeoNetwork opensc https sourceforge net projects geonetwork files GeoNetwork_unstable_development_versic e did not generate a dedicated Windows installer but this multiplatform installer shot You can find a list of new functionality in v VERSION at http trac osgeo org geonetwe as well as in the documentation included in the installer CJ A list of fixes and changes in V RSION here https github com geonetwork core doc sot If you have any fixed or improvements you want to contribute back the best is to use gi Looking forward to your testing feedback and contributions The release of Thanks to all developers and contributors Happy testing Template mail for release TODO 18 Chapter 2 Create a release GeoNetwork CHAPTER 3 Harvesting 3 1 Structure The harvesting capability is built around 3 areas JavaScript code Java code and XSL stylesheets on both the server and client side 3 1 1 JavaScript code This refers to the web interface The code is located in the web geonetw
86. should be used when referring to the repository in GeoNet work services eg xml harvest services see Harvesting services label The human readable name for the repository Example response for z3950repositories lt z3950repositories gt lt repository gt lt id code act serverCode cbb945ec 36ea 11df 9735 ebfc367b61a6 gt act lt id gt lt label gt ACT Geographic Data Directory lt label gt lt repository gt lt z3950repositories gt Localised entities Localised entities in the responses from this service have a label element which contains localised strings in all supported languages This element has a child for each supported language Each child has a name reflecting the language code and content set to the localised text Example lt label gt lt eng gt Editors lt eng gt lt fre gt Editeurs lt fre gt lt esp gt Editores lt esp gt lt label gt 9 18 2 Request Forwarding xml forward This is a request forwarding service It can be used by JavaScript code to connect to a remote host because a JavaScript program cannot access any machine other than its server the same origin policy see http en wikipedia org wiki Same_origin_policy For example it is used by the harvesting web interface to query a remote host and retrieve the list of site ids 9 18 Site Information and Request Forwarding Services 161 GeoNetwork Developer Manual Release 2 10 4 0 Request The details of the reque
87. sources http JeevesServlet file JeevesServlet java lines lt at class javax servlet http HttpServlet file HttpServlet java line 727 methoc lt at class javax servlet http HttpServlet file HttpServlet java line 820 methoc lt at class org mortbay jetty servlet ServletHolder file ServletHolder java line lt stack gt lt object gt admin2 lt object gt lt request gt lt language gt en lt language gt lt service gt user login lt service gt lt request gt lt error gt See Exception handling for more details Errors e Missing parameter error id missing parameter when mandatory parameters are not send Returns 500 HTTP code e bad parameter XXXX when an empty username or password is provided Returns 500 HTTP code e User login failed error id user login when login information is not valid Returns 500 HTTP code 9 2 Login and Logout services 69 GeoNetwork Developer Manual Release 2 10 4 0 9 2 2 Logout service Logout xml user logout The xml user logout service clears the user authentication session removing the JSESSIONID cookie Request Parameters e None This request requires no parameters however the JSESSIONID token obtained from xml user login should be included as this is the session that will be cleared Logout request example Ur http localhost 8080 geonetwork srv en xml user logout Mime type application xml Post request lt xml version
88. the GeoNetwork server This is the case for example when creating links inside a metadata record or when providing CSW capabilities host string HTTP server address port integer HTTP server port can be empty which means port 80 Intranet specify the network address details of the Intranet network string Intranet address netmask string Intranet netmask 73950 A container for Z39 50 server parameters enable boolean If true GeoNetwork will start the Z30 50 server port integer The port opened by GeoNetwork to listen to Z39 50 requests Usually 2100 proxy This container specifies the proxy configuration for GeoNetwork to use when making outgoing connections use boolean If true GeoNetwork will use the given proxy for outgoing connections host string Proxy host name port integer Proxy host port username string Proxy credentials password string Proxy credentials feedback email messages sent via web feedback form or when downloading a re source email string email address of person who will receive feedback mailServer This container configures the mail server that will be used to send email host string Address of the SMTP server to use port string SMTP port on server to use removedMetadata This container contains settings about removed metadata dir This folder will contain removed metadata in MEF format It gets populated when the user deletes a metadata using the web
89. the metadata record being inserted Returns 500 HTTP code 9 7 2 Update metadata xml metadata update The xml metadata update service allows you to update a metadata record in the catalog Requires authentication Yes Request Parameters id or uuid mandatory Identifier of the metadata to update version mandatory This parameter is used by the GeoNetwork editor to avoid concurrent up dates to the same metadata record This is not accessible to the service user at present so this parameter can be set to any integer value 6699 isTemplate indicates if the metadata content is a new template or not Default value n showValidationErrors Indicates if the metadata should be validated before updating in the cat alog minor If the metadata update is a minor change changedate will not be updated notification of change in metadata will not be sent then this parameter should be set to true false otherwise title Metadata title for templates 9 7 Metadata insert update and delete services 105 lution gn ue of lution gn GeoNetwork Developer Manual Release 2 10 4 0 e data mandatory Contains the metadata record Update metadata request example Orel http localhost 8080 geonetwork srv eng xml metadata update ime type application xml Post request lt xml version 1 0 encoding UIF 8 gt lt request gt lt id gt 11 lt id gt lt version gt 1 lt version g
90. then HTTP status code 200 is returned along with an XML document containing the harvest history The response for both types of requests is the same except that the response to a request for the history of a specific harvester will only have history details for that harvester An example of the response is lt response gt lt response gt lt record gt lt id gt 1 lt id gt lt harvestdate gt 2013 01 01T19 24 54 lt harvestdate gt lt harvesteruuid gt b6allfc3 3f6f 494b a8f3 35eaadced575 lt harvesteruuid gt lt harvestername gt test plaja lt harvestername gt lt harvestertype gt geonetwork lt harvestertype gt lt deleted gt n lt deleted gt 176 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt info gt lt result gt lt total gt 5 lt total gt lt added gt 5 lt added gt lt updated gt 0 lt updated gt lt unchanged gt 0 lt unchanged gt lt unknownSchema gt 0 lt unknownSchema gt lt removed gt 0 lt removed gt lt unretrievable gt 0 lt unretrievable gt lt doesNotValidate gt 0 lt doesNotValidate gt lt result gt lt info gt lt params gt lt params gt lt record gt lt response gt lt nodes gt lt node id 955 type geonetwork gt lt nodes gt lt sort gt date lt sort gt lt response gt Each record element in the embedded response element contains the details of a harvest session The elements are e id harvest history record id in h
91. true means that tabs showing inspire groupings of metadata elements will be present in the viewer editor for ISO records enableXmlView true means that the tab showing the XML of the metadata record will be present in the viewer editor defaultView simple advanced iso xml determines which tab will be the default view ie the view used when no previous view has been selected by the user in their current session e threadedindexing A container to configure multi threaded indexing 150 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 maxThreads Number of threads to be used during multi threaded indexing e autodetect A parameter to configure language detection in search terms enable if true then language detection is enabled e requestedLanguage A parameter to configure which indexes will be searched and which lan guages will be used to display results only off all languages ignored prefer_locale prefer documents with translations to requested language prefer_docLanguage prefer documents whose language is the re quested language only_locale translations in requested language only_docLocale document language is the requested language Example of xml config get response lt xml version 1 0 encoding UTF 8 gt lt config gt lt site gt lt name gt My GeoNetwork catalogue lt name gt lt organization gt My o
92. user database error id error Returns 500 HTTP code You don t have rights to delete this user error id error when authenticated user is not an Administrator or User administrator Returns 500 HTTP code You don t have rights to delete this user because the user is not part of your group error id error when trying to delete a user that is not in the same group as the authenticated user and the authenticated user is a User administrator Returns 500 HTTP code 9 5 Category services 9 5 1 Category List xml info amp type categories The xml info service can be used to retrieve the categories available in GeoNetwork See Site Informa tion xml info 9 5 2 Category maintenance Create update a category xml category create update The xml category create update service can be used to create a new category and update the informa tion about an existing category Only users with Administrator profile can create update categories Requires authentication Yes Request Parameters id Category identifier to update If not provided a new category is created with name provided e name mandatory Name of the category Category update request example Url http localhost 8080 geonetwork srv eng xml category create update ime type application xml Post request lt request gt lt id gt 2 lt id gt 9 5 Category services 87 GeoNetwork Developer Manual Release 2 10 4 0 lt name gt folios lt name gt
93. view gt lt operation name dynamic gt lt operation name featured gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting e this harvester does not use the content validate setting 10 3 8 Harvesting node filesystem This harvester type is capable of querying and harvesting metadata filename xml from a directory tree on a filesystem accessible to the GeoNetwork server The settings for the filesystem harvester type are e node string filesystem site x directory string This is the filesystem directory on the server from which metadata files xml will be harvested recurse boolean If true then any directories in the fileystem directory will be checked for xml files and any directories in those directories etc etc x nodelete boolean If true then metadata from previous executions of the filesystem harvester will be left in the catalog ie they will not be deleted icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons XML Example
94. will be harvested only if it is valid x subtype waflwebdav Indicates the type of server being harvested 208 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of WEBDAV WAF harvester settings in XML lt node id 1039 type webdav gt lt site gt lt name gt burbble lt name gt lt uuid gt b64e006a a26c 4268 85ec 0bf0450be966 lt uuid gt lt account gt lt use gt true lt use gt lt username gt apples lt username gt lt password gt oranges lt password gt lt account gt lt url gt http davtest com webdav lt url gt lt icon gt webdav gif lt icon gt lt site gt lt content gt lt validate gt true lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt validate gt true lt validate gt lt recurse gt true lt recurse gt lt subtype gt webdav lt subtype gt lt options gt lt privileges gt lt group id 1 gt lt operation name view gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the conten
95. xmlns xsi http www w3 org 2001 XMLSchema instance lt gmd DQ_DataQuality gt lt gmd dataQualityInfo gt lt gmd MD_Metadata gt gt lt data gt lt request gt Response If request is executed successfully HTTP 200 status code is returned along with an XML document with id details of the record inserted Example success response 9 7 Metadata insert update and delete services 103 GeoNetwork Developer Manual Release 2 10 4 0 lt response gt lt id gt 31 lt id gt lt uuid gt 9c623013 8d90 4e6l aeb1 8e96800f3b08 lt uuid gt lt response gt If request fails an HTTP status code 500 is returned and the response contains an XML document with the exception Example error response lt error id error gt lt message gt Unique index or primary key violation lt class gt JdbcSQLException lt class gt lt stack gt lt stack gt lt request gt lt request gt lt error gt See Exception handling for more details CONSTRAINT_INDEX_1 ON PUBLIC M If validate parameter is set to on and the provided metadata is not valid with respect to the XSD and schematrons in use for the metadata schema then an exception report is returned Example validation metadata report lt xml version 1 0 e lt error id xsd valida lt message gt XSD Valida lt class gt XSDValidatio n ncoding UTF 8 gt ion error gt tion error s lt message gt
96. 0 is returned with an XML document containing details of the exception problem An example of such a document is as follows lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt object gt Metadata not found gt 6 lt object gt lt request gt lt language gt eng lt language gt lt service gt xml metadata version lt service gt lt request gt lt error gt See Exception handling for more details 130 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Metadata not found error id metadata not found if a metadata record with the identifier provided does not exist Returns 500 HTTP code e Operation Not Allowed if the user does not have editing rights over the metadata record Returns 500 HTTP code 9 13 2 Batch start versioning xml metadata batch version For each metadata record in the selected set xml metadata batch version creates an initial version of the metadata record and its properties categories status privileges in the subversion repository Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select metadata records Note Onl
97. 19139 or profile child metadata records ie metadata records whose gmd parentldentifier is set to the uuid of a metadata record in the catalog 136 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e Any child metadata records that do not have the same metadata schema as the parent metadata record will be skipped e The service actually executes an XSLT in the metadata schema directory of the parent metadata record The XSLT is called update child fromparent info xsl It is run on each child metadata record and is passed parameters from the request as required This design has been chosen to make customization of the service reasonably straight forward Note If user of this service does not have edit privileges over a child metadata record then that record will be skipped Requires authentication Yes Request Parameters id GeoNetwork internal integer id of parent metadata record e parentUuid Uuid of parent metadata record e schema Metadata schema name in GeoNetwork e childrenIds GeoNetwork internal integer ids of child metadata records comma separated e updateMode replace means replace content in the children with content from the parent add means add content from the parent to the child metadata records e Parameters for update child from parent info xsl Examine the relevant XSLT to determine which parameters to specify Example request POST Ue Ls http loca
98. 3 CSW service 193 GeoNetwork Developer Manual Release 2 10 4 0 lt csw Update gt lt csw Transaction gt Response lt xml version 1 0 encoding UTF 8 gt lt csw TransactionResponse xmlns csw http www opengis net cat csw 2 0 2 gt lt csw TransactionSummary gt lt csw totalInserted gt 0 lt csw totaliInserted gt lt csw totalUpdated gt 1 lt csw totalUpdated gt lt csw totalDeleted gt 0 lt csw totalDeleted gt lt csw TransactionSummary gt lt csw TransactionResponse gt Delete operation example POST request Url http localhost 8080 geonetwork srv eng csw publication Content type application xml Post data lt xml version 1 0 encoding UTE 8 gt lt csw Transaction xmlns csw http www opengis net cat csw 2 0 2 xmlns ogc http www lt csw Delete gt lt csw Constraint version 1 1 0 gt lt oge Filter gt lt ogc PropertyIsEqualTo gt lt oge PropertyName gt title lt ogc PropertyName gt lt ogce Literal gt africa lt oge Literal gt lt oge PropertyIsEqualTo gt lt oge Filter gt lt esw Constraint gt lt esw Delete gt lt esw Transaction gt Response lt xml version 1 0 encoding UTF 8 gt lt csw TransactionResponse xmlns csw http www opengis net cat csw 2 0 2 gt lt csw TransactionSummary gt lt csw totalInserted gt 0 lt csw totaliInserted gt lt csw totalUpdated gt 0 lt csw totalUpdated gt lt csw totalDeleted gt 1 lt csw t
99. 5 19139 and profiles this task is quite easy because spatial extents apart from the bounding box are encoded as gml in the metadata record Again the easiest way to create this for the MCP is to copy extract gml xsd from the iso19139 schema ad modify it to suit the MCP namespace An example bounding box fragment from an MCP metadata record is lt gmd extent gt lt gmd EX Extent gt lt gmd geographicElement gt lt gmd EX_GeographicBoundingBox gt lt gmd westBoundLongitude gt lt gco Decimal gt 112 9 lt gco Decimal gt lt gmd westBoundLongitude gt lt gmd eastBoundLongitude gt a u u lt gco Decimal gt 153 64 lt gco Decimal gt lt gmd eastBoundLongitude gt lt gmd southBoundLatitude gt lt gco Decimal gt 43 8 lt gco Decimal gt lt gmd southBoundLatitude gt 7 3 Example ISO19115 19139 Marine Community Profile MCP 39 GeoNetwork Developer Manual Release 2 10 4 0 lt gmd northBoundLatitude gt lt gco Decimal gt 9 0 lt gco Decimal gt lt gmd northBoundLatitude gt lt gmd EX_GeographicBoundingBox gt lt gmd geographicElement gt lt gmd EX_Extent gt lt gmd extent gt Running extract gml xsl on the metadata record that contains this XML will produce lt gml GeometryCollection xmlns gml http www opengis net gml gt lt gml Polygon gt lt gml exterior gt lt gml LinearRing gt lt gml coordinates gt 112 9
100. 500 MB of space is more than enough The software is run in different ways depending on the servlet container you are using GeoNetwork Developer Manual Release 2 10 4 0 1 2 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 Tools The following tools are required to be installed to setup a development environment for GeoNetwork 1 3 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 G
101. 65 68 70 75 87 92 102 109 111 115 121 126 129 132 138 144 147 154 163 165 178 184 186 195 203 203 203 205 227 227 227 230 233 241 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 development process including source code software releasing and other administrative work Other documents GeoNetwork User Manual GeoNetwork Developer Manual PDE Contents 1 GeoNetwork Developer Manual Release 2 10 4 0 2 Contents CHAPTER 1 Software development 1 1 System Requirements GeoNetwork is a Java application that runs as a servlet so the Java Runtime Envi ronment 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 Stan dard Edition SE GeoNetwork won t run with Java 1 4 It will run with e Java 5 but few people should be using that now as it is unsupported e Java 6 most testing has taken place under Java 6 so we recommend Java 6 e 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 n
102. GeoNetwork Developer Manual Release 2 10 4 0 Request Parameters e data mandatory Contains the metadata record e group mandatory Owner group identifier for metadata 66 e isTemplate indicates if the metadata content is a new template or not Default value n 66 599 e title Metadata title Only required if isTemplate y gt e category mandatory Metadata category Use _none_ value to don t assign any category e styleSheet mandatory Stylesheet name to transform the metadata before inserting in the catalog Use _none_ if you don t have a stylesheet to apply validate Indicates if the metadata should be validated before inserting in the catalog Values on off default e uuidAction nothing default value uses the metadata uuid in the xml file if the uuid already exists in the database throws an exception overwrite if the uuid exists in the database overwrites the metadata with the inserted one generateUUID generates a new uuid for the metadata to be inserted Insert metadata request example Uri http localhost 8080 geonetwork srv eng metadata insert ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt group gt 2 lt group gt lt category gt _none_ lt category gt lt styleSheet gt _none_ lt styleSheet gt lt data gt lt CDATA lt gmd MD_Metadata xmlns gmd http www isotc211 org 2005 gmd
103. GeoNetwork are e ogc http www opengis net cat csw 2 0 2 a dublin core derivative e iso http www isotc2 11 org 2005 gmd ISO19115 19139 From each of these output schemas a brief summary or full element set can be requested These output schemas and element sets are implemented in GeoNetwork as XSLTs and they are stored in the csw subdirectory of the present directory The ogc output schema XSLTs are implemented as ogc brief xsl ogc summary and ogc full xsl The iso output schema XSLTs are implemented as iso brief xsl iso summary xsl and iso full xsl To create these XSLTs for the MCP the best option is to copy and modify the csw presentation XSLTs from the base schema iso19139 After creating the presentation XSLTs our new GeoNetwork plugin schema for MCP contains extract date modified xsl extract gml xsd extract uuid xsl loc present schema conversions xml schema ident xml schema xsd schema 7 3 7 Creating the index fields xsl to index content from the metadata record This XSLT indexes the content of elements in the metadata record The essence of this XSLT is to select elements from the metadata record and map them to lucene index field names The lucene index field names used in GeoNetwork are as follows 50 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 Lucene Index Field Name Description
104. Global or watersheds e dynamic Map type Values off default on e download Map type Values off default on e digital Map type Values off default on e paper Map type Values off default on e group Filter metadata by group if missing search in all groups e attrset e dateFrom Filter metadata created after specified date e dateTo Filter metadata created before specified date e category Metadata category If not specified search all categories RSS search request example Url http localhost 8080 geonetwork srv eng rss search ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt georss gt simplepoint lt georss gt lt any gt africa lt any gt lt eastBL gt 74 91574 lt eastBL gt lt southBL gt 29 40611 lt southBL gt lt northBL gt 38 47198 lt northBL gt lt westBL gt 60 50417 lt westBL gt lt relation gt overlaps lt relation gt lt sortBy gt relevance lt sortBy gt lt attrset gt geo lt attrset gt lt request gt Response The principal fields of the response are e channel This is the container for the RSS response title RSS channel title description RSS channel description item Metadata RSS item one item for each metadata retrieved title Metadata title x link Link to show metadata page Additional link elements with rel alternate to OGC WXS services shapefile images files Goo
105. HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id operation aborted gt lt message gt Schema already exists lt message gt lt class gt OperationAbortedEx lt class gt lt error gt See Exception handling for more details 9 21 4 Update a metadata schema xml metadata schema update The xml metadata schema update service can be used to update a metadata schema in GeoNetwork The details of what the schema should contain are covered in the Schema Plugins section of this manual Only Administrator users can run this service Requires authentification Yes Request Parameters e schema mandatory Name of the schema to update Must be the name of a currently registered metadata schema in GeoNetwork One of the following parameters e fname Server file name full path to metadata schema zip archive e url Http URL of metadata schema zip archive e uuid Uuid of metadata record in current catalog that has a metadata schema zip archive uploaded and stored with it Schema update request example Url http localhost 8080 geonetwork srv eng xml metadata schema update Mime type application xml Post request lt request gt lt schema gt isol19139 mcp lt schema gt lt fname gt usr local src git schemaPlugins 2 8 x dist isol19139 mcp zip lt fname gt lt request gt 182 Chapter
106. ID This UUID is used to remove metadata when the harvesting node is removed and to check if a metadata which has another UUID has been already harvested by another node If a harvesting type supports multiple searches on a remote site these must be done sequentially and results merged Every harvesting type must save in the folder images logos a GIF image whose name is the node s UUID This image must be deleted when the harvesting node is removed This is necessary to propagate harvesting information to other GeoNetwork nodes When a harvesting node is removed all collected metadata must be removed too During harvesting take in mind that a metadata could have been removed just after being added to the result list In this case the metadata should be skipped and no exception raised The only settable privileges are view dynamic featured It does not make sense to use the others If anode raises an exception during harvesting that node will be deactivated If a metadata already exists its UUID exists but belong to another node it must not be updated even if it has been changed This way the harvesting will not conflict with the other one As a side effect this prevent locally created metadata from being changed The harvesting engine stores results in the database as part of the harvest history 3 2 Data storage 21 GeoNetwork Developer Manual Release 2 10 4 0 10 When harvesting paramete
107. If the request has no id parameters an empty response is returned Most errors relating to a harvester specified in the request eg harvester id not found are returned as status attributes in the response However exceptions can still occur in which case HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details 9 20 6 Retrieve Harvesting History xml harvesting history This service can be used to retrive the history of harvest sessions for a specified harvester instance or all harvester instances The harvester history information is stored in the GeoNetwork database in the HarvestHistory table Request Called without an id parameter this service returns the harvest history of all harvesters The response can be sorted by harvest date or by harvester type The sort order is specified in the parameter sort Example lt request gt lt sort gt date lt sort gt lt request gt Otherwise an id parameter can be specified to request the harvest history of a specific harvester instance In this case the sort order is by date of harvest lt request gt lt id gt 123 lt id gt lt request gt Response If the update succeeded
108. Jetty embedded The Assembly Plugin is used to create the packages using mvn package assembly assembly The Assembly Plugin configuration is in the release module See bin xml and zip war xml 1 5 Creating the installer 7 GeoNetwork Developer Manual Release 2 10 4 0 1 7 Eclipse setup The easiest way to develop geoNetwork within eclipse is with the m2e plugin which comes by default on many eclipse installations 1 7 1 Import source code In order to import the source code follow instructions below e Press File gt Import Menu item e In new dialog Select Maven gt Existing Maven Projects e Press Next z import Ox Select Create new projects from an archive file or directory i E i Select an import source Vv General CG Archive File Las G File System Preferences 3 amp CVS EJB Java EE gt Maven E G gt oXygen amp Plug in Development gt Run Debug v amp SVN v VV VVV VY Beet Next gt Cancel Fi r i e In Select root directory field enter where your code is e example C devgeonetworktrunk e Select All projects and Press Finish button If there appears another window just continue without changing any option 8 Chapter 1 Software development GeoNetwork Developer Manual Release 2 10 4 0 It will take some minutes while the m2e plugin downloads all the maven dependencies 1 7 2 Debugging into eclipse e JRebel Plugin Using the JRe
109. ML request lt request gt lt id gt 10 lt id gt lt relation gt full lt relation gt lt request gt Response If the request executed successfully then HTTP status code 200 is returned along with an XML document containing a response root element and metadata children depending on the relations found Example lt response gt lt metadata gt lt metadata gt lt metadata gt lt metadata gt lt response gt Each metadata element has the the structure returned by the brief template of the metadata schema presentation XSLT Typical brief elements are e title Metadata title e abstract A brief explanation of the metadata e keyword Keywords found inside the metadata e image Information about thumbnails e link A link to the source site e geoBox coordinates of the bounding box e geonet info A container for GeoNetwork related information Example of a brief metadata record presentation for fgdc std lt metadata gt lt title gt Globally threatened species of the world lt title gt lt abstract gt Contains information on animals lt abstract gt lt keyword gt biodiversity lt keyword gt lt keyword gt endangered animal species lt keyword gt lt keyword gt endangered plant species lt keyword gt lt link type url gt http www mysite org lt link gt lt geoBox gt lt westBL gt 180 0 lt westBL gt 9 15 Metadata Relation services 141 GeoNetwork Developer Manual Release 2 10 4 0
110. Node name and siteld e All source UUIDs and site names that have been discovered through harvesting e All source UUIDs and site names from MEF files imported by the site e schemas Returns all registered metadata schemas for the site e categories Returns the metadata categories for the site e operations Returns all possible operations on metadata e regions Returns all geographical regions usable for spatial queries e status Returns all possible status values for metadata records Request example lt request gt lt type gt site lt type gt lt type gt groups lt type gt lt request gt Response Each type parameter produces an XML subtree in an info container element An example response to a request for site categories and groups information would look like the following lt info gt lt site gt lt site gt lt categories gt lt categories gt lt groups gt lt groups gt lt info gt The structure of each possible subtree is as follows 9 18 Site Information and Request Forwarding Services 155 GeoNetwork Developer Manual Release 2 10 4 0 Site e site This is the container for site information name Human readable site name siteld Universal unique identifier uuid of the site platform Container for GeoNetwork development version information name Platform name Always geonetwork version Platform version given in the X Y Z format x subVersion Additional version notes lik
111. RL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt oaiPmhServer gt 170 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt formats gt lt format gt isol9115 lt format gt lt format gt fgde std lt format gt lt format gt isol9139 lt format gt lt format gt csw record lt format gt lt format gt isol9110 lt format gt lt format gt dublin core lt format gt lt format gt oai_dce lt format gt lt formats gt lt sets gt lt set gt lt name gt maps lt name gt lt label gt Maps amp amp graphics lt label gt lt set gt lt set gt lt name gt datasets lt name gt lt label gt Datasets lt label gt lt set gt lt sets gt lt oaiPmhServer gt lt root gt wfsFragmentSchemas Return list of schemas that have WFS Fragment conversion stylesheets These stylesheets are stored in the WFSToFragments directory in the convert direc tory of a metadata schema eg for schema isol9139 this directory would be GEONETWORK_DATA DIR config schema_plugins isol9139 convert WFSToFragments POST Request Example lt request gt lt type gt wfsFragment Schemas lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt schemas gt lt record gt lt id gt isol9139 lt id gt lt name gt isol9139 lt name gt lt record gt lt schemas gt lt
112. Release 2 10 4 0 Request id integer This is the local GeoNetwork identifier of the metadata whose relations are re quested Here is an example of POST XML request lt request gt lt id gt 10 lt id gt lt request gt Response If the request executed successfully then HTTP status code 200 is returned along with an XML document containing a relations root element and a relation child for each type of relation found Example lt relations gt lt relation type parent gt lt id gt 3 lt id gt lt uuid gt dal65110 88fd 11da a88f 000d0939bc5d8 lt uuid gt lt title gt lt title gt lt abstract gt lt abstract gt lt relation gt lt relations gt Each relation element has a type attribute indicating the type of relation with the metadata record id specified in the parameters The XML elements returned vary for each type attribute as follows e relation type parent elements describe the parent metadata record of the specified metadata record e id GeoNetwork internal id integer e uuid Metadata uuid e title Metadata title e abstract A brief explanation of the metadata e relation type children metadata element describes the child metadata record of the specified metadata record e metadata container for child metadata record title Metadata title abstract A brief explanation of the metadata x Other elements returned by a brief presentation of the child metadata record e relatio
113. Services GeoNetwork Developer Manual Release 2 10 4 0 port Port number to use to listen for incoming Z39 50 requests proxy Proxy configuration use true means proxy is used when connecting to external nodes host Proxy server host port Proxy server port username Proxy credentials password Proxy credentials feedback A container for feedback information email Feedback Info email address mailServer Email server to use to send feedback emails host Email server address port Port number of email service on email server removedMetadata A container for removed metadata information dir Folder used to store removed metadata in MEF format Idap A container for LDAP parameters see System Configuration in Users Manual for more information selectionmanager A container for selection manager configuration maxrecords Maximum number of records that can be selected csw A container for csw server configuration enable CSW server is enabled if set to true contactId Identifier of GeoNetwork user who is the contact for the CSW server metadataPublic If set to true then metadata inserted through the CSW server will be made public immediately shib A container for Shibboleth parameters see System Configuration in Users Manual for more information userSelfRegistration A container for user self registration service configuration enable enabled if set to true clickab
114. T09 33 21 gt lt private gt lt fil le name map zip changeDate 2006 11 12T13 23 01 gt lt private gt lt info gt 8 4 The info xml file 63 GeoNetwork Developer Manual Release 2 10 4 0 64 Chapter 8 Metadata Exchange Format CHAPTER 9 XML Services 9 1 Calling specifications 9 1 1 Calling XML services GeoNetwork provides access to its functions through the use of XML services These services are much like HTML addresses but return XML instead of HTML The advantage of using XML is that XML services can be used in machine to machine interfaces As an example consider the xml info service Site Information xml info you might have an application which can use this service to get information about GeoNetwork users and metadata schemas in XML The user information returned by this service could then be used by your application to decide how to authenticate with GeoNetwork so that metadata records from a particular metadata schema could be retrieved from other GeoNetwork XML services and processed by your application As a general rule XML services provided by GeoNetwork usually have a xml prefix in their address To keep things simple and uniform GeoNetwork XML services accept XML documents or convert parameters to XML documents and return information status and errors as XML documents except for a few services that relate to file download and must return binary data
115. This is the container for groups group 2 n This is a GeoNetwork group There will always be at least two groups the Internet and Intranet groups This element has an id attribute which represents the local identifier for the group Name Group name description Group description referrer The user responsible for this group email The email address to notify when a data file uploaded with the metadata is downloaded label The localised labels used to show the group in the user interface See Localised entities Example response lt groups gt lt group id 1 gt lt name gt editors lt name gt lt label gt lt eng gt Editors lt eng gt lt fre gt Editeurs lt fre gt lt label gt lt group gt lt groups gt Sources e sources This is the container for sources source 0 n A source known to the GeoNetwork node name Source name 9 18 Site Information and Request Forwarding Services 157 GeoNetwork Developer Manual Release 2 10 4 0 UUID Source universal unique identifier Example response for a source lt sources gt lt source gt lt name gt My Host lt name gt lt UUID gt 0619cc50 708b 11da 8202 000d9335906e lt uuid gt lt source gt lt sources gt Schemas e schemas This is the container for the schema information schema 0 n A metadata schema name the name of the schema this is the name by which t
116. XSLT must have e the main template which must be called metadata lt schema name gt For the MCP pro file of isol9139 the main template would look like the following taken from metadata iso19139 mep xsl lt xsl template name metadata isol9139 mcp gt lt xsl param name schema gt lt xsl param name edit select false gt lt xsl param name embedded gt lt xsl apply templates mode is019139 select gt lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl with param name embedded select Sembedded gt lt xsl apply templates gt lt xsl template gt Analyzing this template 1 The name metadata iso19139 mcp is used by the main element processing template in meta data xsl elementEP The main metadata services show and edit end up calling metadata show xsl 7 3 Example ISO19115 19139 Marine Community Profile MCP 43 GeoNetwork Developer Manual Release 2 10 4 0 and metadata edit xsl respectively with the metadata record passed from the Java service Both these XSLTs process the metadata record by applying the elementEP template from metadata xsl to the root element The elementEP template calls this main schema template using the schema name iso19139 mcp The job of this main template is set to process all the elements of the metadata record using templates declared with a mode name that matches the
117. a data extraction which will be deprecated outputSchemaOnCollectionsFragments string Metadata schema of ISO records that will be created from THREDDS catalog collection metadata A list of possible values for this parameter can be obtained from the xml harvesting info service see threddsFragmentSchemas collectionMetadataTemplate integer Template record that harvested fragments will copied or linked into to create metadata records Use http your_geonetwork geonetwork srv eng xml info type templates to get a list of template metadata record ids that can be used for this setting createCollectionSubtemplates boolean If true then subtemplates are created from the metadata fragments harvested from the THREDDS catalog datasets The sub templates are stored in the GeoNetwork database and linked into the collectionMeta dataTemplate template record to create the harvested metadata records If false then subtemplates are not created instead the harvested fragments are copied into the collec tionMetadataTemplate record to create normal metadata records collectionFragmentStylesheet string Stylesheet that turns collection metadata frag ments in the THREDDS catalog into ISO metadata fragments A list of possible values for this parameter can be obtained from the xml harvesting info service see threddsFragmentStylesheets createAtomicDatasetMd boolean If true then metadata records will be created using harve
118. a record using the list of cate gories provided Note The previously assigned categories will be removed If versioning for the metadata record is on then the previously assigned categories will be available in the version history 126 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Requires authentication Yes Request Parameters e id or uuid Identifier of metadata to update e _C can be multiple elements C Category identifier integer A list of categories and identifiers is stored in the categories table It can be retrieved using the Site Information xml info service Request example POST gels http localhost 8080 geonetwork srv eng xml metadata category ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt _1 gt lt _2 gt lt request gt GET Urls http localhost 8080 geonetwork srv eng xml metadata category id 6 amp _1 amp _2 Response Successful response HTTP code 200 contains the identifier of the metadata whose categories have been updated Example lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt request gt Unsuccessful response HTTP code 500 is an XML document with details of the exception problem that occurred Example lt error id metadata not found gt lt message gt Metadata not found lt message gt l
119. ach metadata schema is implemented as a filesystem tree The root of the tree is the name of the metadata schema in abbreviated form The essential components of a metadata schema in this tree are laid out as follows 1 loc directory with subdirectories for each three letter language code that this information is localized into with the content in XML files labels xml codelists xml For example loc eng codelists xml describes the english codelists for metadata elements schema directory and file named schema xsd providing a single entry point to the XSD hierarchy For example schema gmd gmd xsd schematron directory has constraints on elements and content in a metadata document imple mented using the ISO schematron language docs directory has documentation on how the elements of the metadata schema should be used 5 6 sample data directory has sample metadata documents convert directory has XSLTs that convert metadata documents to and from other schemas More information on the content of these directories and files will be given in the next section Note some schemas on https github com metadata schemas have more information than described above because they have been implemented as GeoNetwork schema plugins 27 GeoNetwork Developer Manual Release 2 10 4 0 28 Chapter 6 Implementing a metadata schema or profile CHAPTER 7 Schema Plugins A schema plugin that can be used in GeoNetwork is a d
120. actJdbc2Statement file AbstractJdbc2Statement lt at class org postgresql jdbc2 AbstractJdbc2Statement file AbstractJdbc2Statement method executeWithFlags gt lt at class org postgresql jdbc2 AbstractJdbc2Statement file AbstractJdbc2Statement method executeUpdate gt lt at class jeeves resources dbms Dbms file Dbms java line 261 method execute lt at class org fao geonet services user Update file Update java line 134 methoc lt at class jeeves server dispatchers ServiceInfo file ServiceInfo java line 238 lt at class jeeves server dispatchers ServiceInfo file ServiceInfo java line 141 lt stack gt lt request gt lt language gt en lt language gt lt service gt user update lt service gt lt request gt lt error gt Error code error Error message ERROR users_username_key duplicate key violates unique constraint 9 24 Java development with XML services 201 GeoNetwork Developer Manual Release 2 10 4 0 202 Chapter 9 XML Services CHAPTER 10 Settings hierarchy 10 1 Introduction GeoNetwork stores configuration settings in the Settings table The settings are organized into a tree structure where the leaf nodes of the tree are key value pairs A key is limited to 64 characters whilst a value is effectively unlimited in most databases supported by GeoNetwork The root of the tree contains two nodes e system contains nodes that describe s
121. adata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notProcessFound gt 2 lt notProcessFound gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully updated e notProcessFound number of metadata records skipped because the process XSLT was not present in their metadata schema e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the request fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is shown below lt error id service not allowed gt lt message gt Service not allowed lt message gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code 9 14 4 Batch update child records xml metadata batch update children The xml metadata batch update children service copies metadata elements from the parent metadata record to all child metadata elements e This service works only for isol
122. alid Returns 500 HTTP code Remove a category xml category remove The xml category remove service can be used to remove an existing category Only users with Admin istrator profile can delete categories 90 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Requires authentification Yes Request Parameters e id mandatory Category identifier to delete Category remove request example Ure http localhost 8080 geonetwork srv eng xml category remove ime type application xml Post request lt request gt lt id gt 2 lt id gt lt request gt Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document confirming the remove operation is returned An example response is lt response gt lt operation gt removed lt operation gt lt response gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing paramete
123. along with an XML document describing the exception what went wrong An example of such an error response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt error gt See Exception handling for more details 9 15 2 Manage Relationships in the Relations table These services manage relationships between metadata records that are held in the Relations table ie they are relationships that cannot be held in a metadata record xml relation get This service retrieves all the related records for a source metadata record specified by id in the parame ters The related records are those that are in the Relations table ie they are those that cannot be held in a metadata record 140 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Request e id integer or uuid This is the local GeoNetwork identifier of the metadata or uuid of metadata whose relations are requested e relation string normal This optional parameter identifies the kind of relation that the client wants to be returned It can be one of these values normal The service performs a query into the id field and returns all relatedId records reverse The service performs a query into the relatedId field and returns all id records full Includes both normal and reverse queries duplicated ids are removed Here is an example of POST X
124. and registered by the Registrar of Types Geographic Names The boundaries are aligned to Vicmap Property This dataset is part of the Vicmap Admin dataset series boundaries 1 Dataset 1 BOUNDARIES Administrative LAND Ownership Department of Sustainability and Boundaries Environment DSE Last update 2007 11 06 8 Web link javascript void O 11 4 1 HTML 5 UI This is an html5 based UI which uses the wigets from geonetwork and the library ExtJS Widgets The GeoNetwork widget framework provides a list of independent pieces of code that let you build a geonetwork user interface 11 4 HTMLSUI 233 GeoNetwork Developer Manual Release 2 10 4 0 Add widget Widgets are usually pieces of html that will be shown on your user interface You should place them in some html structure so they are visually arranged _ Nationaal Georegister x NG Net oneal mn ger A Met als resultaat Online kaarten Downloadbare data Data op aanvraag Toon uitgebreide zoekcriteria Welkom op het Nationaal georegister d vindplaats van geo informatie van Nederland Door een zoekterm in te voeren krijgt u een overzicht van beschikbare datasets en services Deze datasets kunt u in veel gevallen direct downloaden en de services kuntu bekijken of in uw eigen toepassing gebruiken Wilt u meer weten over hetzoeken in het Nationaal georegister Bekijk dan de instructiefilm geodata nationaalgeo
125. are prepared with some configuration options so you can select some of the visual aspects For example on the picture above you an select the number of tags on the cloud or the number of items shown on the latest section To add a widget you should wait for the page to be loaded This may be approached with the onReady function of ExtJS Ext onReady function new GeoNetwork TagCloudView catalogue catalogue query fast true amp summaryOnly true amp from 1 amp to 4 renderTo cloud tag onSuccess app loadResults Pa On this example we just have to set up four properties on the constructor the catalogue variable which makes all the query which will be sent to the server to provide the items to show the renderTo id of the div where the tag cloud will be drawn and the onSuccess function which will decorate and give style to the results of the tag cloud search You can find the whole API of widgets here Create a new widget You can create new widgets to add to your customized user interface Using the same example as before you can see that you can easily create new widgets You just have to take care of two things e Visualization define an html div where your widget will display information e Manipulation of information add some functionality like a search connector so the visualization has data to show Using outside GeoNetwork Although it is a testing functionality in fact y
126. arvesthistory table e harvestdate date of harvest e harvesteruuid uuid of harvester that ran e harvestername name of harvester Site Name parameter that ran e harvestertype type of harvester that ran e deleted has the harvester that ran been deleted y yes n no e info results of the harvest May contain one of the following elements e result details of the successful harvest a harvester dependent list of results from the harvest e error an exception from an unsuccessful harvest see Exception handling for content details of this element e params the parameters that the harvester had been configured with for the harvest After the embedded response element the currently configured harvesters are returned as node children of a nodes element see Create harvester instance xml harvesting add for references to each of the harvester types that can be returned here If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is lt error id object not found gt lt message gt Object not found lt message gt lt class gt ObjectNotFoundEx lt class gt 9 20 Harvesting services 177 GeoNetwork Developer Manual Release 2 10 4 0 lt error gt See Exception handling for more details 9 20 7 Delete Harvesting History Entries xml harvesting history delete This servic
127. astorage una doe hawt a Re aes a Ee ee ee hoe ge ae a ee 21 33 NGUWIGeMMeS a sue ce de heck Rea eA ok ae ad en Gao wt 21 4 Schema Plugins 23 5 Metadata schemas and profiles 25 6 Implementing a metadata schema or profile 27 7 Schema Plugins 29 7 1 Contents of a GeoNetwork schema s ss sice a s ae eee 29 10 11 1 2 Preparation oo vre maan own eG db dn kh B Bat eds eka amp 7 3 Example ISO19115 19139 Marine Community Profile MCP Metadata Exchange Format Sel MWOHUCHOA e a ae a den den Bhd SDA a a nde ea ae le ed 82 MEP vi file format ae one aat er erdee de sed ee we ee Ewe 8 3 MEP v2 file format sas a aon ae A LA A a Ra A AOS a a eS 84 The infoxml file cee as raa eA dorice RASA a Ee d XML Services 9 1 Calling specifications s ss armen Babe dG skr Ate eb A Sob eS 92 Logmand Logout services scoi a et utd ded ee EE Se ek es 9 3 Group Services sa nava san mute RSG ask A ee a a ET RRA RAT ee J OA USELSOPVICES ra 5 x cg et en eee Be a a de EE a in al He inn wi as 9 5 Cale SOrySErViCeS rn ave a Gea ane goa el ee bn Gg woe a 9 6 Search and Retrieve Metadata services eee 9 7 Metadata insert update and delete services eee 9 8 Metadata Seleet servie es a ua do arne ard a a a B dd a a E 9 9 Metadata Privilege Services ar uee tan ve on Bea a es 9 10 Metadata Ownership services o c ooa a na oua sen dvd ene ed 9 11 Metadata Stat s Ser
128. atFull boolean True harvest remote metadata as a full MEF file ie meta data plus thumbnails and data files uploaded with metadata importXslt string Name and parameters of a metadata processing XSLT see Meta data Processing services for more details 206 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 search 0 n Contains the search parameters If this element is missing an unconstrained search will be performed x freeText string free text search on remote instance x title string search title on remote instance x abstract string search abstract on remote instance x keywords string search keywords on remote instance x digital boolean search for records marked digital on remote instance x hardc opy boolean search for records marked hardcopy on remote instance x sourceUuid string search for records that come from source with this uuid on the remote instance x sourceName string search for records that come from source with this name on the remote instance groupsCopyPolicy 0 n Represents a copy policy for a remote group It is used to main tain remote privileges on harvested metadata Name string Internal name not localised of a remote group x policy string Copy policy For the group all policies are copy copyToIntranet For all other groups policies are copy createAndCopy The Intranet group is
129. ata schema add 181 xml metadata schema delete 183 xml metadata schema update 182 xml metadata select 109 xml metadata status 121 xml metadata status get 125 xml metadata update 105 xml metadata validation 144 xml metadata version 129 xml ownership editors 117 xml ownership groups 119 xml ownership transfer 116 xml relation 138 xml relation delete 143 xml relation get 140 xml relation insert 142 xml schema info 179 xml search 92 xml user get 76 xml user infoupdate 83 xml user login 68 xml user logout 70 xml user metadata 97 xml user pwupdate 85 xml user remove 86 241 GeoNetwork Developer Manual Release 2 10 4 0 xml user update 78 xml usergrpups list 75 242 Index
130. ate a new user that requires authentication to complete succesfully In this example httpClient it s used first to send a login request to GeoNetwork getting with JSES SIONID cookie Nexts requests send to GeoNetwork using httpClient send the JSESSIONID cookie and are managed as authenticated requests Source package org geonetwor import import import import import import import import import public private HttpClient org apache org apache org apache org apache org apache org apache org apache k xmlservices client commons ht commons ht commons ht commons ht commons ht commons ht commons ht org jdom Document org jdom Element tpclie tpclie tpclie ttpclie tpclie tpclie tpclie class CreateUserClientAuth httpclient Credentials HttpClient HttpStatus UsernamePasswordCredentials auth AuthScope methods PostMethod methods StringRequestEntity 198 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 CreateUserClientAuth httpclient new HttpClient ax x Authenticates the user in GeoNetwork and send a request x that needs authentication to create a new user x public void sendRequest xx Authenticate user if login System exit 1 xx Create request XML Element request new Element requ
131. atus code error and an XML document describing the ex ception that occurred An example of such an error response is lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or his profile has no rights to execute the service Returns 500 HTTP code 9 11 Metadata Status services 9 11 1 Update Status on a metadata record xml metadata status The xml metadata status service updates the status on a metadata record using the status and changeMessage provided as parameters Note The previously assigned status will be removed If versioning for the metadata record is on then the previously assigned status will be available in the version history 9 11 Metadata Status services 121 GeoNetwork Developer Manual Release 2 10 4 0 Requires authentication Yes Request Parameters e id or uuid Identifier of metadata to update e status One of the status identifiers take from the database table statusvalues Status iden tifiers can be retrieved using the Site Information xml info service The core status identifiers are e 0 unknown e 1 draft 2 approved 3 retired e 4 submitted 5 rejected e changeMessage description of why the status has changed
132. be used to update translations of a category name Only users with Administrator profile can update category name translations Requires authentication Yes Request Parameters 88 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e category Container for category information id mandatory Category identifier to update e label mandatory This is just a container to hold the category names translated in the languages supported by GeoNetwork Each translated label is enclosed in a tag that identifies the language code Category label update request example Urls ime type application xml Post request lt request gt lt category id 2 gt lt label gt lt eng gt folios lt eng gt lt label gt lt category gt lt request gt Response Category label update response example lt ok gt Errors http localhost 8080 geonetwork srv eng xml category update e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code Get a category xml category get The xml category get service can be used to retrieve information on an existing category Requires authentification Yes Request Parameters e id mandatory Category identifier to retri
133. bel plugin is very useful for debugging on eclipse An example of the configuration file for JRebel may be the following lt xml version 1 0 encoding UTF 8 gt lt application xmlns xsi http www w3 org 2001 XMLSchema instance xmlns http www zer lt classpath gt lt dir name web target classes gt lt classpath gt lt web gt lt link target gt lt dir name web src main webapp gt lt dir gt lt link gt lt link target gt lt dir name web client src main resources gt lt dir gt lt link gt lt link target gt lt dir name web target webapp gt lt dir gt lt link gt lt link target gt lt dir name web target geonetwork gt lt dir gt lt link gt lt web gt lt application gt e Tomcat Server Create a new Tomcat Server 6 on eclipse and add the geonetwork main project as a web project e Remote debuging e How do I configure Tomcat to support remote debugging e How do I remotely debug Tomcat using Eclipse 1 7 3 Code Quality Tools in Eclipse In order to see the same code quality warnings in eclipse as maven will detect Find Bugs and Checkstyle need to be installed in your eclipse install and configured as follows Start Eclipse Go to Help gt Eclipse Marketplacex x Install xfindbugs x Don t Restart 1 7 Eclipse setup 9 GeoNetwork Developer Manual Release 2 10 4 0
134. ber update version sh masterversion version SNAPSHOT Commit the new x branch if it does not exist for project and modules for i in S modules do ed Si git add git commit m Update version to version SNAPSHOT cd done git add git commit m Update version to version SNAPSHOT Create the new releas update version sh version Sversion Sminorversion 14 Chapter 2 Create a release GeoNetwork Developer Manual Release 2 10 4 0 Commit the new minor version for modules for i in S modules do ed Si git add git commit m Update version to version minorversion cd done git add Compile mvn clean install Pwith doc Build the application and run the integration tests in web itests cd web itests mvn clean install Pitests cd Build installer cd installer ant cd Test the installer Generate list of changes cat lt lt EOF gt docs changes devversion txt GeoNetwork Sversion List of changes git log pretty format s origin Spreviousversion gt gt docs changesSdevversion txt Tag the release git tag a version minorversion m Tag for S version Sminorversion release git push origin version minorversion Restore version number to SNAPSHOT update version sh version version SNAPSHOT for i in S modules do ed Si git add git commit m Update version to version SNAPSHOT done git add
135. bulary files such as http www isotc2 11 org 2005 resources Codelist gmxCodelists xml These have also been added to the codelists xml file so that they can be localized overridden in profiles and include an extended description to provide more useful information when viewing the metadata record The isol19139 schema has additional templates in its presentation xslts to handlese codelists because they are specific to that schema These are discussed in the section on presentation XSLTs later in this manual More on labels xml A localized copy of labels xml is made available on an XPath to the presentation XSLTs eg root gui schemas iso19139 labels for the iso19139 schema The labels xml file can also be used to provide helper values in the form of a drop down select list for free text fields As an example lt element name gmd credit id 27 0 gt lt label gt Credit lt label gt lt description gt Recognition of those who contributed to the resource s lt description gt lt helper gt lt option value University of Tasmania gt UTAS lt option gt lt option value University of Queensland gt UQ lt option gt lt helper gt lt element gt This would result in the Editor through the XSLT metadata xsl displaying the credit field with these helper options listed beside it in a drop down select menu something like the following 42 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0
136. cal r lt svrl text gt lt report M501 gt No duplicate languages found lt report M501 gt lt svrl text gt lt svrl successful report gt lt svrl schematron output gt lt geonet report gt lt geonet schematronerrors gt lt object gt lt error gt Note XML parseable description of the schematron validation problems is in the object container You should be looking for elements such as svrl failed assert See Exception handling for more details Errors e bad parameter XXXX when a mandatory parameter is empty Returns 500 HTTP code e XSD Validation Error error id xsd validation error when validation against XSDs fails Returns 500 HTTP code e Schematron Validation Error error id schematron validation error when validation against schematrons fails Returns 500 HTTP code e No Schema Matches error id no schema matches when a matching GeoNetwork metadata schema cannot be found for the supplied metadata record Returns 500 HTTP code 9 17 System configuration 9 17 1 Introduction GeoNetwork configuration parameters can be changed to suit the needs of your site There are two groups of parameters 9 17 System configuration 147 GeoNetwork Developer Manual Release 2 10 4 0 e parameters that can be changed through the web interface e parameters not accessible from the web interface and that must be changed when the system is not running The first group of parameters can be
137. capacities and to search and retrieve metadata from it The Publication opertions Harvest and Transaction are used to insert metadata into the catalog The CSW operations can be accesed using POST GET methods and SOAP encoding The GeoNetwork opensource catalog CSW Discovery service operations are accessible through the url http localhost 8080 geonetwork srv eng csw GetCapabilities GetCapabilities operation allows CSW clients to retrieve service metadata from a server The response to a GetCapabilities request is an XML document containing service metadata about the server Request examples GET request http localhost 8080 geonetwork srv eng csw request GetCapabilities amp service CSW amp accept POST request Urls http localhost 8080 geonetwork srv eng csw Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw GetCapabilities xmlns csw http www opengis net cat csw 2 0 2 service CSW gt lt ows AcceptVersions xmlns ows http www opengis net ows gt 9 23 CSW service 187 GeoNetwork Developer Manual Release 2 10 4 0 lt ows Version gt 2 0 2 lt ows Version gt lt ows AcceptVersions gt lt ows AcceptFormats xmlns ows http www opengis net ows gt lt ows OutputFormat gt application xml lt ows OutputFormat gt lt ows AcceptFormats gt lt esw GetCapabilities gt SOAP request Url http localhost 8080 geonetwork srv eng csw Content ty
138. ch update status Mime type application xml Post request lt xml version 1 0 encoding UTE 8 gt lt request gt lt status gt 5 lt status gt lt changeMessage gt Completely unacceptable consistency rules ignored lt changeMessage gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata batch update status amp status 5 amp char Note URL encoding of changeMessage Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt noChange gt 0 lt noChange gt lt response gt The response fields are e done number of metadata records successfully updated e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted e noChange number of metadata records whose ownership was unchanged by the operation 124 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 If the request fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is show
139. chema can be present in GeoNetwork e schemaLocation a set of pairs where the first member of the pair is a namespace URI and the second member is the official URL of the XSD The contents of this element will be added to the root element of any metadata record displayed by GeoNetwork as a schemaLoca tion noNamespaceSchemaLocation attribute if such as attribute does not already exist It will also be used whenever an official schemaLocation noNamespaceSchemaLocation is required eg in response to a ListMetadataFormats OAI request e autodetect contains elements or attributes with content that must be present in any metadata record that belongs to this schema This is used during schema detection whenever GeoNetwork receives a metadata record of unknown schema After creating this file you can validate it manually using the XML schema definition XSD in INSTALL DIR web geonetwork xml validation schemaPlugins schema ident xsd This XSD is also used to validate this file when the schema is loaded If schema ident xml failes validation the schema will not be loaded More on autodetect The autodetect section of schema ident xml is used when GeoNetwork needs to identify which metadata schema a record belongs to The five rules that can be used in this section in order of evaluation are 1 Attributes Find one or more attributes and or namespaces in the document An example use case is a profile of ISO19115 19139 that adds optional
140. children see next section Global variable app App js creates the app global variable wich has or should have all the information needed for the app to run It also initializes some secondary objects which contains information and loads more widgets init function this initializeEnvironment Initialize utils this loginApp new GeoNetwork loginApp 11 4 HTMLSUI 237 GeoNetwork Developer Manual Release 2 10 4 0 this loginApp init this mapApp new GeoNetwork mapApp this mapApp init this searchApp new GeoNetwork searchApp this searchApp init if urlParameters create undefined amp amp catalogue isIdentified var actionCtn Ext getCmp resultsPanel getTopToolbar actionCtn createMetadataAction handler apply actionCtn app loginApp Should contain everything related to the authentication of the user like control buttons to log in and log out and handles the cookie app mapApp Should control everything related to maps For example if you want to add a new layer to the maps you should look here Also initializes the maps preview and big app searchApp Closely related to Catalogue js it launches searches and initializes the results view To change the advanced search you have to look here too More info History The ExtJS History plugin is also used on this UI It is not quite stable not at all on IE but it can be modifie
141. codelist specified in the request The fields of the response are e element A container for information about a schema element It has a name attribute which contains the qualified name of the element label The human readable name of the element localised into the language specified in the request description A generic description of the element condition 0 1 This field is optional and indicates if the element must satisfy a condition eg mandatory The condition text is displayed with the element name so it intended to be human readable e codelist A container for information about a codelist It has a name attribute which contains the qualified name of the codelist entry 1 n A container for a codelist entry There can be more than one entry code The entry code This is the value that will be used in the metadata label This is a human readable name for the code used to show the code in the user interface It is localised description A localised description meaning of the code The description is shown in the user interface with the label lt response gt lt element name gmd constraintLanguage gt lt label gt Constraint language lt label gt lt description gt language used in Application Schema lt description gt lt condition gt mandatory lt condition gt lt element gt lt codelist name DateTypCd gt lt entry gt lt code gt creation lt code gt lt label gt Creation lt
142. cpElements gt lt xsl when gt lt otherwise process in base iso19139 mode gt lt xsl otherwise gt lt xsl apply templates mode isol9139 select gt lt xsl with param name schema select schema gt lt xsl with param name edit select edit gt lt xsl with param name embedded select Sembedded gt lt xsl apply templates gt lt xsl otherwise gt lt xsl choose gt lt xsl template gt Analyzing this template 1 The name metadata iso19139 mcp is used by the main element processing template in meta data xsl elementEP The main metadata services show and edit end up calling metadata show xsl and metadata edit xsl respectively with the metadata record passed from the Java service Both these XSLTs process the metadata record by applying the elementEP template from metadata xsl to the root element elementEP calls the appropriate main schema template using the schema name 2 The job of this main template is set to process all the elements of the metadata profile The processing takes place in one of two modes Firstly the element is processed in the profile mode iso19139 mcp If a match is found then HTML elements will be returned and copied to the output document If no HTML elements are returned then the element is processed in the base schema mode iso19139 e templates that match on elements specific to the profile have mode iso19139 mcp lt xsl template mode
143. d to allow back button from browser to work What is the div id only_for_spiders As the name says this is for spiders or crawlers When you access with the direct link to a metadata that div will be used to load plain xml data so browsers can process it Don t worry if you are human you will not see it at all 11 4 2 Widgets The GeoNetwork widget framework provides a list of independent pieces of code that let you build a geonetwork user interface Add widget Widgets are usually pieces of html that will be shown on your user interface You should place them in some html structure so they are visually arranged 238 Chapter 11 User Interface GeoNetwork Developer Manual Release 2 10 4 0 _ Nationaal Georegister Ge gt G Q D natien NGR er A Met als resultaat Online kaarten Downloadbare data C Data op aanvraag Toon uitgebreide zoekcriteria Welkom op het Nationaal georegister d vindplaats van geo informatie van Nederland Door een zoekterm in te voeren krijgt u een overzicht van beschikbare datasets en services Deze datasets kunt u in veel gevallen direct downloaden en de services kuntu bekijken of in uw eigen toepassing gebruiken Wilt u meer weten over hetzoeken in het Nationaal georegister Bekijk dan de instructiefilm geodata nationaalgeoregister nl kadastralekaart ows L 11 4 HTML5UI 239 GeoNetwork Developer Manual Release 2 10 4 0 The widgets
144. d use if you want to download a file attached to a metadata record as Data for Download usually in onlineResources section of an ISO record or perhaps as a gmx FileName where allowed The two services used together can be used to create a simple click through licensing scheme for file resources attached to metadata records in GeoNetwork 9 19 1 xml file disclaimer Retrieves information from the metadata about constraints or restrictions on the resources attached to the metadata record The information is xml and an xhtml presentation of the constraints and restrictions Note only users that have download rights over the record will be able to use this service To obtain these rights your application will need to use xml user login see GeoNetwork standard login xml user login Request Called with a metadata id or uuid one or more file names if more than one file is attached to the metadata record as data for download and access which is almost always private Example lt request gt lt uuid gt d8c8call ecc8 45dc b424 171a9e212220 lt uuid gt lt fname gt roam rsf aus bathy topo contours sff lt fname gt lt fname gt mse09_M8 nc lt fname gt lt access gt private lt access gt lt request gt Response The service returns a copy of the request parameters a copy of the metadata record xml and an HTML version of the license annex generated from the metadata record by the XSL metadata license annex
145. dEx If a harvester definition with the specified id cannot be found 9 20 2 Create harvester instance xml harvesting add Create a new harvester The harvester can be of any type supported by GeoNetwork see Harvesting nodes for a list When a new harvester instance is created its status is set to inactive A call to the xml harvesting start service is required to set the status to active and run the harvester at the scheduled time Request The service requires an XML tree with all information about the harvesting node to be added The common XML elements that must be in the tree are described at Harvesting nodes Settings and example requests for each type of harvester in GeoNetwork are as follows Harvesting node geonetwork Harvesting node webdav Harvesting node csw Harvesting node z3950 Harvesting node oaipmh Harvesting node thredds Harvesting node wfsfeatures Harvesting node filesystem Harvesting node arcsde Harvesting node ogcwxs Harvesting node geoPREST Summary of features of the supported harvesting types Harvesting type Authentication Privileges Categories GeoNetwork native through policies yes WebDAV HTTP digest yes yes CSW HTTP Basic yes yes 168 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response If the request succeeds and the harvester instance is created then HTTP status code 200 is returned along with an XML document c
146. data record are included in the MEF skipUuid truelfalse If set to true the metadata record UUIDs will not be exported into the MEF info xml file Without a UUID which is a unique key inside the database the metadata records in a MEF can be repeatedly imported as they will receive a new UUID on import The default value is false version truelfalse If set to true MEF Version 2 0 is used otherwise MEF Version 1 0 is used This parameter needs to be present if related records are being included in the MEF see the relation parameter below resolveXlink truelfalse If set to true then any XLinks in the metadata records are resolved be fore the records are exported If false the metadata records are exported with unresolved XLinks Default is true removeXlinkAttributes truelfalse If set to true then any XLink attributes in the metadata records are removed before the records are exported Default is true relation truelfalse If set to true and version is also set to true then related records eg parent feature catalog are exported into the MEF with the metadata record Default is true Example POST request lt request gt lt uuid gt f80bca2e f 75 4107 8999 4c1864cb1b1b lt uuid gt lt format gt full lt format gt lt skipUuid gt true lt skipUuid gt lt version gt true lt version gt lt relation gt true lt relation gt lt request gt URL http localhost 8080 geonetwork srv eng mef export Response
147. e GeoNetwork Developer Manual Release 2 10 4 0 WE Geocat 2 8 0 test server x Ge G l newgui geocat net geonetwork apps tabsearch geese dol User name ssessese Login English Help Home List Map 0 Selected v Sort by x aaps Other actions v Geoscience Australia s Open Day Photographs 26th August 2007 El During National Science Week on Sunday 26th August 2007 Geoscience Australia opened its doors to the community to showcase a diverse range of work activities Members of the public had the opportunity to discover how earthquakes are detected pan for gold tour the bui Physiographic Map of North and Central Eurasia Sample record please remove 20 Physiographic maps for the CIS and Baltic States CIS_BS Mongolia China and Taiwan Province of China Between the three regions China Mongolia and CIS_BS countries DCW boundaries were introduced There are no DCW boundaries between Russian Federation and the rest of the new countries of the CIS_BS The original physiographic map of China inc EURASIA GEOSCIENTIFICINFORMATION PHYSIOGRAPHY SOIL SESEIISE Hydrological Basins in Africa Sample record please remove Acciones yu abstract update fsdafasdfasdfdsafsa AQUASTAT AWRD AFRICA HYDROLOGY INLANDWATERS RIVER BASINS WATER RESOURCES WATERSHEDS DUS eS i 1 6 result s 6 Powered by GEONEs Work renderTo cloud tag onSuccess app loadResults
148. e alpha 1 or beta 2 Example site information lt site gt lt name gt My site lt name gt lt organisation gt FAO lt organization gt lt siteId gt 0619cc50 708b 11da 8202 000d9335906e lt siteld gt lt platform gt lt name gt geonetwork lt name gt lt version gt 2 2 0 lt version gt lt platform gt lt site gt Users e users This is the container for user information user 0 n A user of the system x id The local identifier of the user username The login name surname The user s surname Used for display purposes name The user s name Used for display purposes profile User s profile eg Administrator Editor UserAdmin etc x address The user s address x state The user s state Zip The user s address zip postal code country The user s country email The user s email address organisation The user s organisation x kind The type of organisation eg NGO Government Example response 156 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt users gt lt user gt lt id gt 3 lt id gt lt username gt eddi lt username gt lt surname gt Smith lt surname gt lt name gt John lt name gt lt profile gt Editor lt profile gt lt address gt lt state gt lt zip gt lt country gt lt email gt lt organisation gt lt kind gt gov lt kind gt lt user gt lt users gt Groups e groups
149. e elements of the old type plus one new element mcp revisionDate A mandatory attribute gco isoType is also attached to mcp MD_Metadata with a fixed value set to the name of the element that we extended gmd MD_Metadata By defining the profile in this way it is not necessary to modify the underlying ISO19139 schemas So the schema directory for the MCP essentially consists of the extensions plus the base ISO19139 schemas One possible directory structure is as follows extensions gco gmd gml gmx gsr gss gts resources srv xlink The extensions directory contains a single file mcpExtensions xsd which imports the gmd namespace The remaining directories are the ISO19139 base schemas The schema xsd file which is the file GeoNetwork looks for will import the mcpExtensions xsd file and any other namespaces not imported as part of the base ISO19139 schema It is shown as follows 38 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 lt xs schema targetNamespace http bluenet3 antcrc utas edu au mcp elementFormDefault qualified xmlns xs http www w3 org 2001 XMLSchema xmlns mcp http bluenet3 antcrc utas edu au mcp xmlns gmd http www isotc211 org 2005 gmd xmins gmx http www isotc211 0org 2005 gmx xmlns srv http www isotc211 org 2005 srv gt lt xs include schemaLocation schema extensions mcpExtensions xsd gt lt this is a logical place to include any additional schemas that are r
150. e Exception handling for more details 9 4 User services 81 GeoNetwork Developer Manual Release 2 10 4 0 Errors Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code bad parameter when a mandatory field is empty Returns 500 HTTP code Unknown profile XXXX error id error when the profile is not valid Returns 500 HTTP code ERROR duplicate key violates unique constraint users username key when trying to create a new user using an existing username Returns 500 HTTP code ERROR insert or update on table usergroups violates foreign key constraint user groups_groupid_fkey when the group identifier is not an existing group identifier Returns 500 HTTP code ERROR tried to add group id XX to user XXXX not allowed because you are not a mem ber of that group when the authenticated user has profile UserAdmin and tries to add the user to a group in which they do not manage Returns 500 HTTP code ERROR you don t have rights to do this when the authenticated user has a profile that is not Administrator or UserAdmin Returns 500 HTTP code Reset user password xml user update The xml user update service can be used to create new users update user information and reset u
151. e can be used to delete harvester history entries from the harvesthistory table in the GeoNet work database Request One or more id parameters can be specified to request deletion of the harvest history entries in the harvesthistory table The id element values can be obtained from Retrieve Harvesting History xml harvesting history lt request gt lt id gt 1 lt id gt lt id gt 2 lt id gt lt request gt Response If successful then HTTP status code 200 is returned along with an XML document with details of how many harvest history records were successfully deleted An example of this response is lt response gt 2 lt response gt Note If records with the id specified in the parameters are not present they will be quietly ignored If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details 9 21 Schema Services Metadata schemas can be plugged into GeoNetwork see Schema Plugins Any application that needs to e find information eg names versions namespaces converters about metadata schemas that are plugged into GeoNetwork should use the Site Information xml info service
152. e constructor the catalogue variable which makes all the query which will be sent to the server to provide the items to show the renderTo id of the 228 Chapter 11 User Interface GeoNetwork Developer Manual Release 2 10 4 0 _ Nationaal Georegister Ge gt G Q D natien NGR er A Met als resultaat Online kaarten Downloadbare data C Data op aanvraag Toon uitgebreide zoekcriteria Welkom op het Nationaal georegister d vindplaats van geo informatie van Nederland Door een zoekterm in te voeren krijgt u een overzicht van beschikbare datasets en services Deze datasets kunt u in veel gevallen direct downloaden en de services kuntu bekijken of in uw eigen toepassing gebruiken Wilt u meer weten over hetzoeken in het Nationaal georegister Bekijk dan de instructiefilm geodata nationaalgeoregister nl kadastralekaart ows L 11 2 Search 229 GeoNetwork Developer Manual Release 2 10 4 0 div where the tag cloud will be drawn and the onSuccess function which will decorate and give style to the results of the tag cloud search You can find the whole API of widgets here Create a new widget You can create new widgets to add to your customized user interface Using the same example as before you can see that you can easily create new widgets You just have to take care of two things e Visualization define an html div where your widget will display information e Manipulation of in
153. e gt 2012 12 27T14 58 04 lt changedate gt lt changemessage gt Do it all again lt changemessage gt lt name gt rejected lt name gt lt record gt lt record gt lt statusid gt 4 lt statusid gt lt userid gt 6 lt userid gt lt changedate gt 2012 12 27T14 32 10 lt changedate gt lt changemessage gt Ready for review lt changemessage gt lt name gt submitted lt name gt lt record gt lt response gt If the request did not execute successfully then HTTP 500 status code error is returned along with an XML document which includes details of the exception what went wrong An example of such a request is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Metadata not found error id metadata not found when the metadata record requested is not found Returns 500 HTTP code 9 11 4 Defining status actions The behaviour of GeoNetwork when a status changes can be defined by the programmer See java_metadata_status_actions 9 12 Metadata Category services 9 12 1 Update Categories of a metadata record xml metadata category The xml metadata category service updates the categories of a metadat
154. e is capable of querying and harvesting metadata from the GetFeature response from an OGC Web Feature Service WFS The metadata fragments are e transformed into ISO19115 19139 or profile metadata fragments e copied or linked into an ISO19115 19139 or profile template The settings for a WFS Features harvester type are e node string wfsfeatures site url string OGC WES service URL eg http localhost 7070 deegree services the harvester adds the necessary parameters to call the GetFeature service with the query provided from the options icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons options x lang string three letter language code describing language of metadata being har vested almost always eng this value is used to set the metadata language in the records harvested from THREDDS query string An OGC WES GetFeature query outputSchema string Metadata schema of ISO records that will be created from WFS GetFeature harvester A list of possible values for this parameter can be obtained from the xml harvesting info service see wfsFragmentSchemas stylesheet string Stylesheet that turns WFS Features into ISO metadata frag men
155. e is the following Root l 0 n metadata metadata metadata xml optional metadata isol9139 xml info xml applschema optional metadata xml ISO19110 Feature Catalog eS all public documents and thumbnails all private documents and thumbnails 60 Chapter 8 Metadata Exchange Format GeoNetwork Developer Manual Release 2 10 4 0 Note metadata iso19139 xml is generated by GeoNetwork actors on export if the metadata record in metadata xml is an ISO19115 19139 profile On import this record may be selected for loading if the ISO19115 19139 profile is not present 8 4 The info xml file This file contains general information about a metadata It must have an info root element with a manda tory version attribute This attribute must be in the X Y form where X represents the major version and Y the minor one The purpose of this attribute is to allow future changes of this format maintaining compatibility with older readers The policy behind the version is this 1 A change to Y means a minor change All existing elements in the previous version must be left unchanged only new elements or attributes may be added A reader capable of reading version X Y is also capable of reading version X Y with Y gt Y 2 A change to X means a major change Usually a reader of version X Y is not able to read version X Y with X gt X The root element must have
156. e iso19139 schema lt xs element name MD TopicCategoryCode type gmd MD_TopicCategoryCode_Type gt lt xs simpleType name MD_TopicCategoryCode_Type gt lt xs restriction base xs string gt lt xs enumeration value farming gt lt xs enumeration value biota gt lt xs enumeration value boundaries gt lt xs enumeration value climatologyMeteorologyAtmosphere gt lt xs enumeration value economy gt lt xs enumeration value elevation gt lt xs enumeration value environment gt lt xs enumeration value geoscientificInformation gt lt xs enumeration value health gt lt xs enumeration value imageryBaseMapsEarthCover gt lt xs enumeration value intelligenceMilitary gt lt xs enumeration value inlandWaters gt lt xs enumeration value location gt lt xs enumeration value oceans gt lt xs enumeration value planningCadastre gt lt xs enumeration value society gt lt xs enumeration value structure gt lt xs enumeration value transportation gt lt xs enumeration value utilitiesCommunication gt lt xs restriction gt lt xs simpleType gt The following is part of the codelists xml entry manually created for this element lt codelist name gmd MD_TopicCategoryCode gt lt entry gt lt code gt farming lt code gt lt label gt Farming lt label gt lt description gt Rearing of animals and or cultivation of plants
157. eating the localized strings in the loc directory The loc directory contains localized strings specific to this schema arranged by language abbreviation in sub directories You should provide localized strings in whatever languages you expect your schema to be used in Localized strings for this schema can be used in the presentation xslts and schematron error messages For the presentation xslts 40 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 e codelists for controlled vocabulary fields should be in loc lt language_abbreviation gt codelists xml eg loc eng codelists xml e label strings that replace XML element names with more intelligible alternative phrases and rollover help strings should be in loc lt language_abbreviation gt labels xml eg loc eng labels xml e all other localized strings should be in loc lt language abbreviation gt strings xml eg loc eng strings xml Note that because the MCP is a profile of S019115 19139 and we have followed the GeoNetwork naming convention for profiles we need only include the labels and codelists that are specific to the MCP or that we want to override Other labels and codelists will be retrieved from the base schema iso19139 More on codelists xml Typically codelists are generated from enumerated lists in the metadata schema XSDs such as the fol lowing from http www isotc2 1 1 org 2005 gmd identification xsd for gmd MD_TopicCategoryCode in th
158. ect gt lt xsl with param name schema select S schema gt lt xsl with param name edit select Sedit gt If a template for a profile is intended to override a template in the base schema then the template can be defined in the presentation XSLT for the profile with a priority attribute set to a high number and an XPath condition that ensures the template is processed for the profile only For example in the MCP we can override the handling of gmd EX_GeographicBoundingBox in metadata iso19139 xsl by defining a template in metadata isol19139 mcp xsl as follows lt xsl template mode iso19139 match gmd EX_GeographicBoundingBox starts with geonet i 7 3 Example ISO19115 19139 Marine Community Profile MCP 47 GeoNetwork Developer Manual Release 2 10 4 0 Finally a profile may also extend some of the existing codelists in the base schema These extended codelists should be held in a localized codelists xml As an example in iso19139 these codelists are often attached to elements like the following lt gmd role gt lt gmd CI_RoleCode codeList http www isotc211 org 2005 resources Codelist gmxCodelist lt gmd role gt Templates for handling these elements are in the isol9139 presentation XSLT GEONETWORK_DATA_DIR schema_plugins isol9139 present metadata isol9139 xsl These templates use the name of the element eg gmd CI_RoleCode and the codelist XPath eg root gui schemas iso19139 codelists to b
159. eed 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 gt 5 5 Regarding storage you need a Database Management System DBMS like Oracle MySQL Postgresql etc GeoNetwork 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 meta data records the index is small so usually
160. elated to ISO19139 including ISO19119 gt lt xs import namespace http www isotc211l org 2005 srv schemaLocation schema srv srv xsd gt lt xs import namespace http www isotc211 org 2005 gmx schemaLocation schema gmx gmx xsd gt lt xs schema gt At this stage our new GeoNetwork plugin schema for MCP contains schema conversions xml schema ident xml schema xsd schema 7 3 4 Creating the extract XSLTs GeoNetwork needs to extract certain information from a metadata record and translate it into a common simplified XML structure that is independent of the metadata schema Rather than do this with Java coded XPaths XSLTs are used to process the XML and return the common simplified XML structure The three xslts we ll create are e extract date modified xsl this XSLT processes the metadata record and extracts the date the metadata record was last modified For the MCP this information is held in the mcp revisionDate element which is a child of mcp MD_Metadata The easiest way to create this for MCP is to copy extract date modified xsl from the iso19139 schema and modify it to suit the MCP namespace and to use mcp revisionDate in place of gmd dateStamp e extract gml xsl this XSLT processes the metadata record and extracts the spatial extent as a gml GeometryCollection element The gml is passed to geotools for insertion into the spatial index either a shapefile or a spatial database For ISO1911
161. eld name changeDate string string store true index true gt Notice that we are creating a new XML document The Field elements in this document are read by GeoNetwork to create a Lucene document object for indexing see the SearchManager class in the GeoNetwork source Once again because the MCP is a profile of ISO19115 19139 it is probably best to modify index fields xsl from the schema iso19139 to handle the namespaces and additional elements of the MCP At this stage our new GeoNetwork plugin schema for MCP contains extract uuid xsl schema ident xml extract date modified xsl extract gml xsd index fields xsl loc present schema conversions xml schema xsd schema 7 3 8 Creating the sample data directory This is a simple directory Put MEF files with sample metadata in this directory Make sure they have a me f suffix 7 3 Example IS019115 19139 Marine Community Profile MCP 51 GeoNetwork Developer Manual Release 2 10 4 0 A MEF file is a zip archive with the metadata thumbnails file based online resources and an info file describing the contents The contents of a MEF file are discussed in more detail in the next section of this manual Sample data in this directory can be added to the catalog using the Administration menu At this stage our new GeoNetwork plugin schema for MCP contains extract date modified xsl extract gml xsd extract uuid xsl index fields xsl loc present sample data sc
162. eldgroep lt nl gt lt label gt lt record gt lt response gt 9 24 2 Create a new user exception management This example show a request to create a new user that requires authentication to complete succesfully The request is executed without authentication to capture the exception returned by GeoNetwork Source package org geonetwork xmlservices client im im im im im im port port port port port port org org org org org org apache com apache com apache com apache com jdom Document jdom Eleme mons httpclient mons httpclient mons httpclient mons httpclient nt blic class CreateUserClient public static void HttpClient HttpStatus methods PostMethod methods StringRequestEntity main String args 196 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 xx Create request xml Element request new Element request addContent new Elem a a tText newuser addContent new Element username setText Samantha addContent new Element password setText editor2 addContent new Element profile setText Editor addContent new Element nam eet eis eee re addContent new Element city setText Amsterdam addContent new Elem a ene setText Netherlands addContent new Element email setTe
163. elease current connection to the connection pool Element response Xml loadString responseBody false 9 24 Java development with XML services 199 GeoNetwork Developer Manual Release 2 10 4 0 once you are donex post releaseConnection x x Logins a user in GeoNetwork for nexts requests these are managed as authenticated requests x After login x xhttpClient gets with JSSESIONID cookie Using it return True if login it s ok false otherwise x ax private boolean login xx Create request XML Element request new Element request addContent new Element username setText admin addContent new Element password se Text admin xx Create PostMethod specifying login service urlx String loginUrl http localhost 8080 geonetwork srv en xml user login PostMethod post new PostMethod loginUrl try String postData Xml getString new Document request xx Set post data mime type and encoding post setRequestEntity new StringRequestEntity postData application xml UTF8 xx Send login request int result httpclient executeMethod post xx Display status code and authentication session cookiexx System out printin Login response status code result System out printin Authentication session cookie httpclient getState getCookies
164. elect gt lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl with param name text select Skeyword gt lt xsl apply templates gt lt xsl when gt lt xsl otherwise gt lt xsl apply templates mode complexElement select gt lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl apply templates gt lt xsl otherwise gt lt xsl choose gt lt xsl template gt Analyzing this template 1 In view mode the individual keywords from the set are concatenated into a comma separated string with the name of the thesaurus in brackets at the end 2 In edit mode the keywordSet is handled as a complex element ie the user can add individual keyword elements with content and a single thesaurus name 3 This is an example of the type of processing that can be done on an element in a metadata record For profiles templates for elements can be defined in the same way except that the template will process in the mode of the base schema Here is an example showing the first few lines of a template for processing the mcp revisionDate element lt xsl template mode iso19139 match mcp revisionDate gt lt xsl param name schema gt lt xsl param name edit gt lt xsl choose gt lt xsl when test Sedit true gt lt xsl apply templates mode simpleElement sel
165. element These optional attributes are context The qualified name of the metadata schema element that is the parent of the element specified in the name attribute fullContext The qualified xpath of the element specified in the name attribute isoType For profiles of ISO19115 19139 only The qualified name of the element in the base ISO19115 19139 schema that the element specified in the name attribute is a substitute for eg in the Marine Community Profile of ISO19115 19139 mcp MD_Metadata isa substitute for gmd MD_ Metadata in the base ISO19115 19139 metadata schema e codelist Accepts a schema and name attribute as for element but information on any codelist associated with the qualified name of the metadata schema element in the name attribute will be returned instead lt request gt lt element schema isol9139 name gmd constraintLanguage gt lt codelist schema isol9115 name DateTypCd gt lt request gt Note The text returned is localised into the language specified in the the service call eg A call to geonetwork srv eng xml schema info will return text in the English eng language Response If the request executed successfully then HTTP status code 200 will be returned along with an XML document containing the response The root field of the response will be populated with information 9 21 Schema Services 179 GeoNetwork Developer Manual Release 2 10 4 0 about the element
166. element to output Because the MCP is a profile of ISO19115 19139 the easiest path to creating this XSLT is to copy update fixed info xsl from the iso19139 schema and modify it for the changes in namespace required by the MCP and then to include the processing we want A simple example of MCP processing is to make sure that the gmd metadataStandardName and gmd metadataStandard Version elements have the content needed to ensure that the record is recognized as MCP To do this we can add two templates as follows lt xsl template match gmd metadataStandardName priority 10 gt lt xsl copy gt lt gco CharacterString gt Australian Marine Community Profile of ISO 19115 2005 19139 lt gc lt xsl copy gt lt xsl template gt lt xsl template match gmd metadataStandardVersion priority 10 gt lt xsl copy gt lt gco CharacterString gt MCP BlueNet V1 5 lt gco CharacterString gt lt xsl copy gt lt xsl template gt Processing by update fixed info xsl can be enabled disabled using the Automatic Fixes check box in the System Configuration menu By default it is enabled Some important tasks handled in upgrade fixed info xsl e creating URLs for metadata with attached files eg onlineResources with File for download in iso19139 e setting date stamp revision date e setting codelist URLs to point to online ISO codelist catalogs e adding default spatial reference system attributes to spatial extents A specific task requi
167. equest gt lt id gt 2 lt id gt lt selected gt add lt selected gt lt request gt Clear metadata selection example Uri http localhost 8080 geonetwork srv eng metadata select Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt selected gt remove all lt selected gt lt request gt 110 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response The XML response from this service always contains the number of metadata records selected after applying the select operation Example lt xml version 1 0 encoding UTF 8 gt lt request gt lt Selected gt 10 lt Selected gt lt request gt 9 9 Metadata Privilege services 9 9 1 Update privileges on a metadata record xml metadata privileges The xml metadata privileges service updates the privileges on a metadata record using a list of groups and privileges sent as parameters Note All previously assigned privileges will be deleted If versioning for the metadata record is on then the previously assigned privileges will be available in the version history Requires authentication Yes Request Parameters e id or uuid Identifier of metadata to update e _G_O can be multiple elements G Group identifier O Privilege Operation identifier Privilege identifiers e 0 view e 1 download 2 editing e 3 notify 4 dynamic e 5 featured Gro
168. ersion 2 0 gt lt channel gt lt title gt GeoNetwork opensource portal to spatial data and information lt title gt lt link gt http localhost 8080 geonetwork lt link gt lt description gt GeoNetwork opensource provides Internet access to interactive maps satellite imagery and related spatial databases lt description gt lt language gt en lt language gt lt copyright gt All rights reserved Your generic copyright statement lt copyright gt lt category gt Geographic metadata catalog lt category gt lt generator gt GeoNetwork opensource lt generator gt lt tt1l gt 30 lt ttl gt lt item gt lt title gt Hydrological Basins in Africa Sample record please remove lt title gt lt link gt http localhost 8080 geonetwork uuid 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt 11 lt link href http geonetwork3 fao org ows 296 SERVICE wmsSamp VERSION 1 1 1 amp REQU amp BBOX 17 3 34 6 51 1 38 2 amp LAYERS hydrological_basins amp SRS EPSG 432 6 amp WIDTH 200 amp HEIGHT 213 amp FORMAT image png amp TRANSPARENT TRUE amp STYLES default type image png rel alternate title Hydrological basins in Africa gt lt link href http localhost 8080 geonetwork srv eng google kml uuid 5df54bf0 3a7d 44bf 9Yabf 84d772da8dfl amp layers hydrological_basins type application vnd google earth kml xml rel alternate title Hydrol
169. est addContent new Elem ne tText newuser addContent new Element username setText Samantha addContent new Element password setText editor2 addContent new Element profile setText Editor addContent new Element nam Seams renee addContent new Element city setText Amsterdam addContent new Elem en setText Netherlands addContent new Element email setText Samantha mail net xx Create PostMethod specifying service urlx String serviceUrl http localhost 8080 geonetwork srv en user update PostMethod post new PostMethod serviceUrl EEV 4 String postData Xml getString new Document request xx Set post data mime type and encodings post setRequestEntity new StringRequestEntity postData application xml UTF8 xx Send request xx httpClient has been set in login request with JSESSIONID cookie int result httpclient executeMethod post xx Display status codex System out printin Create user response status code if result HttpStatus SC_OK xx Process exception result String responseBody post getResponseBodyAsString System out printin Error code response getAttribute id getValue System out printin Error message response getChildText message catch Exception ex ex printStackTrace finally xx R
170. et user password depending on the value of the operation parameter Only users with profiles Administrator or UserAdmin can create new users Users with profile Administrator can create users in any group while users with profile UserAdmin can create users only in the groups to which they belong Requires authentication Yes Request Parameters operation mandatory newuser username mandatory User login name password mandatory User password profile mandatory User profile surname User surname name User name address User physical address city User address city state User address state zip User address zip country User address country 78 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e email User email e org User organisation departament e kind Kind of organisation e groups Group identifier to set for the user can be multiple groups elements e groupid Group identifier User create request example Url http localhost 8080 geonetwork srv eng xml user update ime type application xml Post request lt request gt lt operation gt newuser lt operation gt lt username gt samantha lt username gt lt password gt editor2 lt password gt lt profile gt Editor lt profile gt lt name gt Samantha lt name gt lt city gt Amsterdam lt city gt lt country gt Netherlands lt country gt lt email gt samantha mail net lt email gt lt groups g
171. etadataNotFoundEx lt class gt lt object gt Could not find metadata parent record gt 1 lt object gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Metadata not found error id metadata not found when the parent metadata record doesn t exist Returns 500 HTTP code 9 15 Metadata Relation services This section describes the services used to show get insert and delete relations between metadata records in GeoNetwork If the metadata schema has elements that support relationships between meta data records eg ISO19115 19139 then the relationships are stored in the Lucene index with the metadata record If a relationship concept does not exist in the metadata schema then the relationship is stored in the Relations table as follows Field Datatype Description id foreign key to Metadata id Source metadata relatedId foreign key to Metadata id Metadata related to the source 9 15 1 Get all related records for a metadata record xml relation This service retrieves all the related records for a source metadata record specified by id in the parame ters The relationships can come from the Lucene index and or the Relations table in the database 138 Chapter 9 XML Services GeoNetwork Developer Manual
172. eter can be obtained from the xml harvesting info service see thredds FragmentStylesheets XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of THREDDS harvester settings in XML lt node id 977 type thredds gt lt site gt lt name gt test thredds with motherlode lt name gt lt uuid gt b3307257 6b2a 48e7 80f5 74acadef f66f lt uuid gt lt account gt lt use gt true lt use gt lt username gt lt password gt lt account gt lt url gt http motherlode ucar edu 8080 thredds catalog satellite 3 9 WEST CONUS 4km cat lt icon gt thredds gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt IMPORTXSLT lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt lang gt eng lt lang gt lt topic gt environment lt topic gt lt createThumbnails gt true lt createThumbnails gt lt createServiceMd gt t rue lt createServiceMd gt lt createCollectionDatasetMd gt true lt createCollectionDatasetMd gt lt createAtomicDatasetMd gt true lt createAtomicDatasetMd gt lt ignoreHarvestOnAtomics gt true lt ignoreHarvestOnAtomics gt lt atomicGeneration gt fragments lt atomicGeneration gt lt modifiedOnly gt true lt modifiedOnly gt lt atomicFragmentStylesheet gt thredds metadata xsl lt atomicfFrag
173. eve Category get request example 9 5 Category services 89 GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng xml category get ime type application xml Post request lt request gt lt id gt 2 lt id gt lt request gt Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document containing the category information is returned An example response is lt response gt lt record gt lt id gt 2 lt id gt lt name gt datasets lt name gt lt label gt lt ara gt Datasets lt ara gt lt cat gt Conjunts de dades lt cat gt lt eng gt Datasets lt eng gt lt label gt lt record gt lt response gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter id when id parameter is empty inv
174. ew gt true lt view gt lt notify gt true lt notify gt lt download gt true lt download gt lt dynamic gt true lt dynamic gt lt featured gt true lt featured gt lt edit gt true lt edit gt lt owner gt true lt owner gt lt ownername gt admin lt ownername gt lt subtemplates gt lt geonet info gt lt Metadata gt Error response HTTP 500 status code is an XML document with the details of what went wrong An example of such a response is as follows lt error id operation not allowed gt lt message gt Operation not allowed lt message gt lt class gt OperationNotAllowedEx lt class gt 96 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt error gt See Exception handling for more details Errors e Request must contain a UUID or an ID if a uuid or id parameter was not provided Returns 500 HTTP code Operation not allowed error id operation not allowed when the user is not allowed to view the metadata record Returns 500 HTTP code 9 6 3 Get user metadata xml user metadata The xml user metadata service can be used to retrieve a metadata records according to the user profile of the authenticated user running the service e Administrator profile return all metadata records e Reviewer or User Administrator profile return all metadata records with groupOwner in the set of groups the user belongs to e Editor
175. ext gt lt report M21 gt Extent defined for dataset lt report M21 gt lt svrl text gt lt svrl successful report gt lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row05 Datas lt svrl fired rule context gmd MD Dataldentificationl x gco isoType gmd MD_I lt svrl successful report ref 20 test Stopic false location x local name lt svrl text gt lt report M6 gt Topic category is lt report M6 gt woe lt svrl text gt lt svrl successful report gt lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row06 Eithe lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row02 Chare lt svrl fired rule context gmd MD_Metadata gco isoType gmd MD Metadata lt svrl active pattern document name ISOFTDS19139 2005 TableAl Rowl9 Detai lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row20 Condi lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row21 Domai lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row22 Short lt svrl active pattern document name ISOFTDS19139 2005 TableAl Rowl5 Check lt svrl active pattern document name ISOFTDS19139 2005 TableAl HierarchyLe lt svrl fired rule context gmd MD Metadata gmd hierarchyLevell x gco isoType lt svrl successful report ref 6 test Shl false location x local name lt svrl text gt
176. f the error See below for a list of identifier values message A message related to the error It can be a short description about the error type or it can contain some other information that details the id code class The Java class name of the Exception that occurred stack Execution path from method where Exception occurred to earliest method called by GeoNetwork Each level in the execution path has an at child x at Information about the code being called when the exception occurred It has the following mandatory attributes class Java class name of the method that was called file Source file where the class is defined method Method name in class 66 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 line Source code line number in file object An optional container for parameters or other values that caused the exception In case a parameter is an XML object this container will contain that object in XML form request A container for request information x language Language used when the service was called service Name of the service that was called Summary of error ids id Meaning of message Meaning of object element element error General message human x readable bad format Reason x bad parameter Name of the parameter Parameter value file not found X File name file upload too big X X
177. fault platform charset instead of a explicit charset Because bad practices are checked for sometimes Findbugs detects issues that are intentional In or der to account for these intentional violations Findbugs has exclude filter files which contain rules for which violations should be ignored In Geonetwork the excludes filter file can be found at lt root gt code_quality findbugs excludes xml For complete details of how to specify matches in the excludes file see http findbugs sourceforge net manual filter html and look at the existing examples in the file The Maven build will fail if any violations are detected so it is important to run FindBugs on each project and fix or exclude each violation that is reported 1 7 6 FindBugs Annotations JSR 305 In order to get the maximum benefit from the Findbugs and eclipse analysis the javax annotation an notations can be used to add metadata to methods fields and parameters The most commonly used annotations are CheckForNull and Nonnull These can be used on a parameter or return value to indicate the parameter or return value must not be null or may be null The findbugs process will enforce these conditions and statically check that null is only ever correctly returned in the case of return values or passed to a method in the case of parameters Some resources for these annotations are http vard lokkur blogspot ch 2012 03 findbugs and jsr 305 html http www infog com news 2008
178. file to take into consideration contains all localised strings and is located at web src webapp loc XX xml harvesting xml where XX refers to a language code This file is used by both JavaScript code and the server 20 Chapter 3 Harvesting GeoNetwork Developer Manual Release 2 10 4 0 3 2 Data storage Harvesting nodes are stored inside the Settings table Further useful information can be found in the chapter Harvesting The SourceNames table is used to keep track of the uuid name couple when metadata get migrated to different sites 3 3 Guidelines To add a new harvesting type follow these steps 6 7 1 Add the proper folder in web src webapp scripts harvesting maybe copying an al ready existing one Edit the harvesting js file to include the new type edit both constructor and init methods Add the proper folder in web src webapp xsl harvesting again it is easy to copy from an already existing one Edit the stylesheet web src webapp xsl harvesting harvesting xs1 and add the new type Add the transformation stylesheet in web src webapp xsl xml harvesting Its name must match the string used for the harvesting type Add the Java code in a package inside org fao geonet kernel harvest harvester Add proper strings in web src webapp loc XX xml harvesting xml Here is a list of steps to follow when adding a new harvesting type 1 Every harvesting node not type must generate its UU
179. formation add some functionality like a search connector so the visualization has data to show Using outside GeoNetwork Although it is a testing functionality in fact you can use this same widgets on your own webpage You just have to make sure that all dependencies are fulfilled and the settings are properly set up As development will go on this functionality will be made easier and documentation will be filled up TODO some simple examples 11 3 TabSearch To use this UI you have to compile the web project with widgets tab profile activated like mvn clean package Pwidgets tab 11 3 1 Widgets The GeoNetwork widget framework provides a list of independent pieces of code that let you build a geonetwork user interface Add widget Widgets are usually pieces of html that will be shown on your user interface You should place them in some html structure so they are visually arranged The widgets are prepared with some configuration options so you can select some of the visual aspects For example on the picture above you an select the number of tags on the cloud or the number of items shown on the latest section To add a widget you should wait for the page to be loaded This may be approached with the onReady function of ExtJS Ext onReady function new GeoNetwork TagCloudView catalogue catalogue query fast true amp summaryOnly true amp from 1 amp to 4 230 Chapter 11 User Interfac
180. ful schema detection the metadata record is validated against the XML schema documents and schematrons if any specified in that schema Authentication required No Request Parameters e data Metadata record Example with an ISO19115 19139 metadata record Url http localhost 8080 geonetwork srv eng xml metadata validation ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt data gt lt CDATA lt gmd MD_Metadata gt lt gmd MD_Metadata gt gt lt data gt lt request gt Response If the validation is successful an HTTP 200 response code is returned along with an XML document giv ing details of the GeoNetwork metadata schema that the record matched and was successfully validated against Example lt xml version 1 0 encoding UTF 8 gt lt response gt lt valid gt y lt valid gt lt schema gt isol9139 lt schema gt lt response gt If the validation was not successful then an HTTP 500 error response code is returned along with an XML document describing the validation problems An example is 144 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt xml version 1 0 encoding UTF 8 gt lt error id xsd val lt message gt XSD Val lt message gt lt stack gt lt stack gt lt object gt lt xsderrors gt lt error gt lt typeOfl lidation error gt lidation error s
181. gether with the xml file download ser vice this is the way that GeoNetwork can be used to provide a simple click through licensing system for file resources attached to metadata records To signify acceptance of the license and download the resources you should use the xml file download service If an exception occurred then the service returns HTTP status code 500 and an XML document describ ing what went wrong An example of such a response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt error gt See Exception handling for more details Errors e IllegalArgumentException Request must contain a UUID or an ID parameter e MetadataNotFoundException Metadata not found e OperationNowAllowedException you don t have download permission over this record 9 19 2 xml file download After your application has received any license conditions that go with the file resources attached to the metadata record from xml file disclaimer you can use this service to download the resources Note only users that have download rights over the record will be able to use this service To obtain these rights your application will need to use xml user login see GeoNetwork standard login xml user login Note this service is protected against users and or applications that do not go through the xml file disclaimer service first
182. gle KML etc can be returned depend ing on metadata 9 6 Search and Retrieve Metadata services 99 GeoNetwork Developer Manual Release 2 10 4 0 description Metadata description pubDate Metadata publication date media Metadata thumbnails georss point Bounding box in georss simplepoint format RSS search response example Mimetype application rsstxml Response lt xml version 1 0 encoding UTF 8 gt lt rss xmlns media http search yahoo com mrss xmlns georss http www georss org gec lt channel gt lt title gt GeoNetwork opensource portal to spatial data and information lt title gt lt link gt http localhost 8080 geonetwork lt link gt lt language gt en lt language gt lt copyright gt All rights reserved Your generic copyright statement lt copyright gt lt category gt Geographic metadata catalog lt category gt lt generator gt GeoNetwork opensource lt generator gt lt ttl gt 30 lt ttl gt lt item gt lt category gt Geographic metadata catalog lt category gt lt description gt lt CDATA gt lt description gt lt pubDate gt 06 Nov 2007 12 13 00 EST lt pubDate gt lt title gt Hydrological Basins in Africa Sample record please remove lt title gt lt link gt http localhost 8080 geonetwork uuid 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt lt link href http geonetwork3 fao org ows 296 SERVICE wmsSamp VERSION 1
183. gmd lt csw ResourceType gt lt csw ResponseHandler gt URI or email address of response handl lt csw Harvest gt GET request Uris ler lt csw ResponseHar http localhost 8080 geonetwork srv eng csw publication request Harvest amp service CSW Response lt xml version 1 0 encoding UTF 8 gt lt csw HarvestResponse xmlns csw http www opengis lt csw Acknowledgement timeStamp 2011 12 05T15 13 lt csw EchoedRequest gt lt csw Harvest xmlns csw http www opengis lt csw Source gt http URL to the target net cat csw 2 0 2 gt 59 net cat csw 2 0 2 xm Ins gmd http CSW server request GetCapabilitiess lt csw ResourceType gt http www isotc211 org schemas 2005 gmd lt csw ResourceTyt lt csw ResponseHandler gt URI or email address of response handl lt csw Harvest gt lt csw EchoedRequest gt lt csw Request Id gt e7684bec 1fa9 4053 814f 7ae970d7a4al lt csw RequestId gt lt csw Acknowledgement gt lt csw HarvestResponse gt Transaction er lt esw Respc The Transaction operation defines an interface for creating modifying and deleting catalogue records This operation requires user authentification to be invoqued 192 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Insert operation example POST request Urls http localhost 8080 geonetwork srv eng csw publication Con
184. gories the categories element will be empty 3 privileges a container for privileges associated to this metadata Privileges are operations that a group which represents a set of users can do on a metadata and are specified by a set of group elements Each one of these has a mandatory name attribute to store the group s name and a set of operation elements used to store the operations allowed on the metadata Each operation element must have a name attribute which value must belong to the following set view download notify dynamic featured If there are no groups or the actor does not have the concept of group the privileges element will be empty A group element without any operation element must be ignored by readers 4 public All metadata thumbnails and any other public file must be listed here This container contains a file element for each file Mandatory attributes of this element are name which repre sents the file s name and changeDate which contains the date of the latest change to the file The public element is optional but if present must contain all the files present in the metadata s public directory and any reader that imports these files must set the latest change date on these using the provided ones The purpose of this element is to provide more information in the case the MEF format is used for metadata harvesting 5 private This element has the same purpose and structure of the public element but
185. group that can edit metadata can be multiple editor elements e id surname name Metadata user owner information Response example lt xml version 1 0 encoding UTF 8 gt lt re lt lt sponse gt group gt lt id gt 3 lt id gt lt name gt bigmetadatausers lt name gt lt description gt Big Metadata User Groups lt description gt lt email gt bigmetadatagroup mail net lt email gt lt referrer gt lt label gt lt en gt Big Metadata Users lt en gt lt label gt group gt lt targetGroup gt lt id gt 2 lt id gt lt name gt sample lt name gt lt description gt Demo group lt description gt lt email gt group mail net lt email gt lt referrer gt lt label gt lt en gt Sample group lt en gt lt label gt lt editor gt lt id gt 12 lt id gt 120 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt surname gt lt name gt lt editor gt lt editor gt lt id gt 13 lt id gt lt surname gt lt name gt Samantha lt name gt lt editor gt lt targetGroup gt lt targetGroup gt lt id gt 6 lt id gt lt name gt RWS lt name gt lt description gt lt email gt lt referrer gt lt label gt lt en gt RWS lt en gt lt label gt lt editor gt lt id gt 7 lt id gt lt surname gt lt name gt Samantha lt name gt lt editor gt lt targetGroup gt lt response gt Unsuccessful execution returns HTTP 500 st
186. gt lt error gt See Exception handling for more details Notes e Version 1 0 of the MEF format does not capture the metadata owner the creator and the group owner During import the user that is performing this operation will become the metadata owner and the group owner will be set to null 9 23 CSW service GeoNetwork opensource catalog publishes metadata using the OGC CSW Catalog Services for the Web protocol supporting HTTP binding to invoke the operations The protocol operations are described in the document OpenGIS Catalogue Services Specification http portal opengeospatial org files artifact_id 20555 186 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 GeoNetwork is compliant with the 2 0 2 version of the specification supporting the following CSW operations e GetCapabilities e DescribeRecord e GetRecordByld e GetRecords e Harvest e Transaction This chapter briefly describes the different operations supported in GeoNetwork and gives some usage examples To get a complete reference of the operations and parameters of each CSW operation refer to the document OpenGIS Catalogue Services Specification The invocation of the operations from a Java client is analogous as described in the chapter for XML services 9 23 1 CSW operations The CSW operations are divided in 2 types Discovery and Publication The Discovery operations are used to query the server about its
187. gt lt at class jeeves server dispatchers ServiceInfo line 129 method execServices gt file ServicelInfo java lt at class jeeves server dispatchers ServiceManager file ServiceManager java line 370 method dispatch gt lt stack gt lt object gt lt request gt lt asd gt ee lt asd gt lt request gt lt object gt lt request gt lt language gt en lt language gt lt service gt mef export lt service gt lt request gt lt error gt 9 2 Login and Logout services 9 2 1 Login services GeoNetwork standard login xml user login The xml user login service is used to authenticate the user in GeoNetwork Authenticated users can use XML services that require authentication such as those used to maintain group or user information Request Parameters e username mandatory Login for the user to authenticate e password mandatory Password for the user to authenticate Login request example gels http localhost 8080 geonetwork srv en xml user login Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt username gt admin lt username gt lt password gt admin lt password gt lt request gt 68 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response When user authentication is successful HTTP status code 200 is returned along with an XML response as follows lt
188. gt Unsuccessful execution returns HTTP 500 status code error and an XML document describing the ex ception that occurred An example of such an error response is lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or his profile has no rights to execute the service Returns 500 HTTP code 9 10 4 Retrieve groups amp users that can be used in metadata ownership transfer xml ownership groups The xml ownership groups service retrieves e all groups that have been assigned privileges over the metadata records owned by the specified user these will be the source groups from which ownership can be transferred e all groups to which the user running the service belongs to A list of the users assigned to the group who have the editor profile is provided with each group These are the target groups and editors to which ownership can be transferred Typically the Retrieve metadata owners xml ownership editors service is used to extract the user ids of editors that are used as parameters to retrieve more detailed information about source groups and target groups amp editors Request Parameters e id mandatory User identifier of the user from whom metadata records will
189. gt lt removed gt 0 lt removed gt lt unretrievable gt 0 lt unretrievable gt lt badFormat gt 0 lt badFormat gt lt doesNotValidate gt 0 lt doesNotValidate gt lt result gt lt info gt lt node gt Notes e this harvester uses two REST services from the GeoPortal API e rest find document with searchText parameter to return an RSS listing of metadata records that meet the search criteria e rest document with id parameter from each result returned in the RSS listing e this harvester has been tested with GeoPortal 9 3 x It should be used for that version of GeoPortal in preference to the CSW harvester 10 3 Harvesting nodes 225 GeoNetwork Developer Manual Release 2 10 4 0 226 Chapter 10 Settings hierarchy CHAPTER 11 User Interface There are four different user interfaces on geonetwork e Classic Perfect for hard environments uses less javascript e Search Uses the new widgets library More responsive than the classic UI Example Search e TabSearch Similar to the Search UI but desktop like as it uses tabs Example TabSearch e HTMLSUI Also based on widgets makes use of latest web technologies Compatibility table Compatibility IE Chrome Firefox Safari 7 8 9 10 Classic X X X X X X Search xX X X X X X TabSearch xX X X X X X HTMLSUI x X X X X X Full compatibility X Compatibility with penalties x Bla
190. h child elements of a complex element to automatically expand in the editor To help in understanding what each of these components is and what is required we will now give a step by step example of how to build a schemaPlugin for GeoNetwork 7 2 Preparation In order to create a schema plugin for GeoNetwork you should check out the schema plugin repos itory from github You can choose between git recommended and subversion 7 2 1 git Install git on your system and execute the following command git clone b 2 10 x git github com geonetwork schema plugins git 7 2 2 subversion svn Install subversion on your workstation and then execute the following command svn co https github com geonetwork schema plugins branches 2 10 x schema plugins Once the git or svn command will complete its work you ll have a directory called schema plugins with some GeoNetwork schema plugins in it To work with the example shown here you should create your new schema plugin in a subdirectory of this directory 7 3 Example ISO19115 19139 Marine Community Profile MCP The Marine Community Profile MCP is a profile of ISO19115 19139 developed for and with the Ma rine Community The profile extends the ISO19115 metadata standard and is implemented using an extension of the XML implementation of ISO19115 described in ISO19139 Both the ISO19115 meta data standard and its XML implementation ISO19139 are available through ISO distribution cha
191. he name of the current or active tab is stored in the global variable currTab available to all presentation XSLTs Logic to decide what to display when a particular tab is active should be contained in the root element processing tab e a root element processing tab This tab should match on the root element of the metadata record For example for the iso19139 schema lt xsl template mode iso19139 match gmd MD_Metadata gt lt xsl param name schema gt lt xsl param name edit gt lt xsl param name embedded gt lt xsl choose gt lt metadata tab gt lt xsl when test ScurrTab metadata gt lt xsl call template name isol9139Metadata gt lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl call template gt lt xsl when gt lt identification tab gt lt xsl when test ScurrTab identification gt lt xsl apply templates mode elementEP select gmd identificationInfo geonet child st lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl apply templates gt lt xsl when gt lt xsl template gt This template is basically a very long choose statement with when clauses that test the value of the currently defined tab in global variable currTab Each when clause will display the set of metadata elements that co
192. he schema is known to GeoNetwork It is also the name of the directory in GEONETWORK_DATA_DIR config schema_plugins under which the schema can be found id A unique identifier assigned to the schema in the schema ident xm1 file version a version string assigned to the schema in the schema ident xm1 file namespaces namespaces used by the metadata schema and records that belong to that schema This is a string suitable for use as a namespace definition in an XML file edit if true then records that use this schema can be edited by GeoNetwork if false then they can t conversions information about the GeoNetwork services that can be called to convert metadata that use this schema into other XML formats If there are valid conversions registered for this schema then this element will have a converter child for each one of these conversions Each converter child has the following attributes which are intended to be used when searching for a particular format that may be produced by a conversion name the name of the GeoNetwork service that invokes the converter nsUri the namespace URI of the XML produced by the conversion schemaLocation the schema location URL of the namespace URI xslt the name of the XSLT in the plugin schema convert subdirectory that is in voked by the GeoNetwork service to carry out the conversion Example response for schemas lt schemas gt lt schema gt lt name gt isol9139
193. he transformation This file should be located in the convert subdirectory of the schema plugin After setting up schema conversions xml our new GeoNetwork plugin schema for MCP contains schema conversions xml schema ident xml 7 3 3 Creating the schema directory and schema xsd file The schema and schema xsd components are used by the GeoNetwork editor and validation functions GeoNetwork s editor uses the XSDs to build a form that will not only order the elements in a metadata document correctly but also offer options to create any elements that are not in the metadata document The idea behind this approach is twofold Firstly the editor can use the XML schema definition rules to help the user avoid creating a document that is structurally incorrect eg missing mandatory elements or elements not ordered correctly Secondly the same editor code can be used on any XML metadata document with a defined XSD 7 3 Example ISO19115 19139 Marine Community Profile MCP 37 GeoNetwork Developer Manual Release 2 10 4 0 If you are defining your own metadata schema then you can create an XML schema doc ument using the XSD language The elements of the language can be found online at http www w3schools com schema or you can refer to a textbook such as Priscilla Walmsley s Defini tive XML Schema Prentice Hall 2002 GeoNetwork s XML schema parsing code understands almost all of the XSD language with the exception of redefine an
194. hema ident xml schema xsd schema 7 3 9 Creating schematrons to describe MCP conditions Schematrons are rules that are used to check conditions and content in the metadata record as part of the two stage validation process used by GeoNetwork Schematron rules are created in the schematrons directory that you checked out earlier see Preparation above An example rule is lt anzlic trunk gml 3 2 0 gmd spatialRepresentation xsd gt lt l TEST 12 gt lt sch pattern gt lt sch title gt loc strings M30 lt sch title gt lt sch rule context gmd MD_Georectified gt lt sch let name cpd value gmd checkPointAvailability gco Boolean 1 or gmd checkt not gmd checkPointDescription or count gmd checkPointDescription gco nilReason lt sch assert test Scpd false gt Sloc strings alert M30 lt sch assert gt lt sch report test Scpd false gt Sloc strings report M30 lt sch report gt lt sch rule gt lt sch pattern gt As for most of GeoNetwork the output of this rule can be localized to different languages The corre sponding localized strings are lt strings gt lt M30 gt ISOFTDS19139 2005 TableAl Row15 Check point description required if available lt alert M30 gt lt div gt checkPointDescription is mandatory if checkPointAvailability 1 c lt strings gt 52 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2
195. in the database with an empty string Current user info update request example Url http localhost 8080 geonetwork srv eng xml user infoupdate Mime type application xml Post request lt request gt lt name gt admin lt name gt lt surname gt admin lt surname gt lt address gt address lt address gt lt city gt Amsterdam lt city gt lt zip gt 55555 lt zip gt lt country gt Netherlands lt country gt lt email gt user mail net lt email gt lt org gt GeoCat lt org gt lt kind gt gov lt kind gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id missing parameter gt lt message gt surname lt message gt lt class gt MissingParameterEx lt class gt 84 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt stack gt lt stack gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code Change current authenticated user password x
196. ing This is the name of the arcde server port integer Port number of arcsde server username string arcsde username password string arcsde password database string Name of arcsde database 220 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of arcsde harvester settings in XML lt node id 1259 type arcsde gt lt site gt lt name gt test arcsde harvester lt name gt lt uuid gt 5b5070d3 464a 484e 94la e56812e46431 lt uuid gt lt account gt lt use gt false lt use gt lt username gt lt password gt lt account gt lt server gt arcsde_server esri com lt server gt lt port gt 5151 lt port gt lt username gt sde_user lt username gt lt password gt sde_password lt password gt lt database gt esri_sde lt database gt lt icon gt esri gif lt icon gt lt site gt lt content gt lt validate gt true lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt
197. ins isol19139 convert ThreddsToFragments POST Request Example lt request gt lt type gt threddsFragment Schemas lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt schemas gt lt record gt lt id gt isol9139 lt id gt lt name gt isol9139 lt name gt lt record gt lt schemas gt lt root gt 172 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 threddsFragmentStylesheets Return WES Fragment conversion stylesheets for a schema previously returned by the request type threddsFragmentSchemas described above These stylesheets are stored in the ThreddsToFragments directory in the convert direc tory of a metadata schema eg for schema isol9139 this directory would be GEONETWORK_DATA_DIR config schema_plugins isol19139 convert ThreddsToFragments POST Request Example lt request gt lt schema gt isol9139 lt schema gt lt type gt threddsFragmentStylesheets lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt stylesheets gt lt record gt lt id gt netcdf attributes xsl lt id gt lt name gt netcdf attributes lt name gt lt schema gt isol9139 lt schema gt lt record gt lt record gt lt id gt thredds metadata xsl lt id gt lt name gt thredds metadata lt name gt lt schema gt isol9139
198. interface LDAP Parameters for LDAP authentication by GeoNetwork 204 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 use boolean If true GeoNetwork will use LDAP authentication for usernames and passwords host string LDAP host port integer Port number on LDAP host defaultProfile string Default GeoNetwork profile to use when the profile user at tribute does not exist in the LDAP attributes login optional credentials used to obtain access to the LDAP service userDN string password string distinguishedNames optional LDAP info used by GeoNetwork to locate user cre dentials base string users string userAttribs A container for user attributes present into the LDAP directory that must be retrieved and used to create the user in GeoNetwork name string password string profile string 10 3 Harvesting nodes All harvesters share a common set of nodes which are retrieved by the harvesting engine for all har vesters These common nodes are described in the hierarchy below e harvesting e node 0 n geonetworklcswlarcsdelfilesystem geonetwork20 oaipmh ogcwaslthreddslwebdavlwfsfeatureslz3950lz3950ConfiglgeoPREST Type of harvesting node site A container for site information Name string Name of harvest instance shown in the harvester user interface uuid string A unique identifier assigned by the s
199. irectory of stylesheets XSLs XML schema descriptions XSDs and other information necessary for GeoNetwork to index view and possibly edit content from XML metadata records To be used in GeoNetwork a schema directory can be manually placed in the config schema_plugins sub directory of the GeoNetwork data directory The default GeoNetwork data directory location is INSTALL_DIR web geonetwork WEB INF data The contents of these schemas are parsed during GeoNetwork initialization If valid they will be available for use when GeoNetwork starts up Schemas can also added to GeoNetwork dynamically if a zip archive of the schema directory is created and then uploaded to GeoNetwork in one of following ways using functions in the Administration menu 1 Server file path specified using file chooser 2 HTTP URL eg http somehost somedirectory iso19139 mcp zip 3 As an online resource attached to an ISO19115 19139 metadata record Uploaded schemas are also stored in the config schema_plugins sub directory of the GeoNet work data directory 7 1 Contents of a GeoNetwork schema When installed a GeoNetwork schema is a directory The following subdirectories can be present e convert Mandatory Directory of XSLTs to convert metadata from or to this schema This could be to convert metadata to other schemas or to convert metadata from other schemas and formats to this schema Eg convert oai_dce xsl e loc Mandatory Directory
200. is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons options x lang string three letter language code describing language of metadata being har vested this value is used to set the metadata language in the records created by this har vester Use http your_geonetwork geonetwork srv eng xml info type isolanguages to get a list of language codes that can be used for this setting topic string ISO Topic Category List of values comes from codelist of ISO topic category element gmd topicCategory createThumbnails boolean if true and service is a WMS then thumbnails will be created for dataset metadata if false then thumbnails will not be created useLayer boolean Create metadata for layer elements using GetCapabilities infor mation useLayerMd boolean Create metadata for layer elements using remote metadata provided in the MetadataURL attribute if the remote metadata doesn t exist isn t rec ognized then GetCapabilities info will be used datasetCategory integer Category id of GeoNetwork category that will be assigned to the dataset metadata records created by the harvester Use http your_geonetwork geonetwork srv eng xml info type categories to get a list of category ids that can be used for this setting outpu
201. it repository on Github De pending 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 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 repository and work on your fork This is a huge benefit because you can push your changes to your repository as much as you want and when a feature is complete you can make a Pull Request Pull requests are the recommended method of contributing back to Geonetwork because Github has code review tools and merges are much easier than trying to apply a patch attached to a ticket The Geonetwork Repository is at https github com geonetwork core geonetwork Follow the instructions on the Github website to get started make accounts how to fo
202. itiesUrl gt http cswserver com services csw request GetCapabilities amp amp servic lt icon gt csw gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt lt search gt lt freeText gt cobblers lt freeText gt lt title gt lt abstract gt lt subject gt lt minscale gt 25000 lt minscale gt lt maxscale gt 400000 lt maxscale gt lt search gt 210 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 lt searches gt lt privileges gt lt group id 1 gt lt operation name view gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting 10 3 4 Harvesting node z3950 This harvester type is capable of querying one or more Z3950 servers and harvesting metadata e node string 23950 site query string Z3950 query in Prefix Query Format mandatory See the dis cussion on PQF in the Z3950 Harvester section of the Users Manual and or http www indexdata com yaz doc tools html PQF icon st
203. l gt lt elements gt lt autodetect gt Some other points about root element autodetect e multiple elements can be specified any element in the set that matches the root element of the record will trigger a match e if the elements have a namespace then the namespace s should be specified on the autodetect element or somewhere in the schema ident xml document before the element that uses them eg as in the above there is a namespace declaration on the autodetect element for clarity 4 Namespaces Find one or more namespaces in the document An example use case is the one used for the csw Record schema Records belonging to the csw Record schema can have three possible root elements csw Record csw SummaryRecord and csw BriefRecord but instead of using a multiple element root autodetect we could use the common csw namespace for autodetect as follows 34 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 lt autodetect gt lt namespaces xmlns csw http www opengis net cat csw 2 0 2 gt lt autodetect gt Some other points about namespaces autodetect e multiple namespaces can be specified all must be present for the record to be recognized as belonging to this schema e the prefix is ignored A namespace match occurs if the namespace URI found in the record matches the namespace URI specified in the namespaces autodetect element 5 Default schema This is the fail safe provision fo
204. l take place likely to be deprecated in the next release of GeoNetwork enable if true then enable optimization at the scheduled interval e oai A container to configure the Open Archives Initiative OAD server in GeoNetwork mdmode if 1 then OAI date searches uses the metadata temporal extent if 2 then the modification date from the database is used tokentimeout time in seconds that a continuation token passed to a client can be used cachesize number of client sessions that the server can manage e inspire A container to configure the Inspire options in GeoNetwork enable if true then inspire indexing of ISO metadata will be enabled enableSearchPanel if true then inspire search panel will be shown in the search interface e harvester A container to configure harvesting options enableEditing if true then harvested records can be edited false means editing will not be enabled e metadata A container to configure the different view edit tabs shown to the user in the viewer editor enableSimpleView simple or default mode means that only those elements present in the template record will be displayed new elements cannot be added true means simple or default view is enabled false means the tab will not be shown enablelsoView true means that tabs showing mandatory core all groupings of metadata elements will be present in the viewer editor for ISO records enableInspire View
205. lName organisationName or posi lt span class validationReportSuggestion gt Suggestions Check contact infc lt div gt lt alert M8 gt lt svrl text gt lt svrl failed assert gt lt svrl active pattern document name ITSOFTDS19139 2005 TableAl Row07 Other lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row16 Units lt svrl active pattern document name ISOFTDS19139 2005 TableAl Rowl3 Descr lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row10 Conte lt svrl active pattern document name ISOFTDS19139 2005 TableAl Rowll Rowl2 lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row08 Datas lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row09 Level lt svrl active pattern document name ISOFTDS19139 2005 TableAl Rowl7 Units lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row18 Distr lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row23 Exter lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row04 Datas lt svrl fired rule context gmd MD Dataldentificationl gco isoType gmd MD_I lt svrl successful report ref 20 test Sextent false location x local r lt svrl t
206. le is shown below lt schemas gt lt schema prefix oai dc nsUrl http www openarchives org OAI 2 0 schemaLocation http www openarchives org OAI 2 0 oai _de xsd gt lt schemas gt In the case of the prefix oai_dc shown above if a schema converter with prefix oai_dc exists in the schema conversions xml file of a GeoNetwork schema then records that belong to this schema will be transformed and included in OAIPMH requests for the oai_dc prefix See Creating the schema conversions xml file for more info To add oai_de support for the MCP the easiest method is to copy oai_dc xsl from the convert directory of the iso19139 schema modify it to cope with the different namespaces and additional elements of the MCP and add it to the schema conversions xml file for the MCP 58 Chapter 7 Schema Plugins CHAPTER 8 Metadata Exchange Format 8 1 Introduction The metadata exchange format MEF in short is a specially designed file format for the purpose of metadata exchange between different platforms A metadata exported as a MEF can be imported by any platform which is able to understand MEF This format has been developed with GeoNetwork in mind so the information it contains is mainly related to GeoNetwork Nevertheless it can be used as an interoperability format between different platforms This format has been designed with the following needs in mind 1 Export a metadata record for backup purposes 2 I
207. lehyperlinks A container for configuration of clickable hyper links in metadata content enable enabled if set to true ie hyperlinks in metadata content will be automatically turned into clickable HTML links localrating A container for configuration of local rating versus remote rating enable local rating enabled if set to true downloadservice A container for configuration of file download interface on links built from ISO online resources with file download protocol leave don t build links or modify ISO online resources with file download protocol simple download file immediately when user clicks on link 9 17 System configuration 149 GeoNetwork Developer Manual Release 2 10 4 0 withdisclaimer when user clicks on link display metadata resource restrictions and dis claimers before downloading file e xlinkResolver A container for configuration of XLink resolver service enable XLinks in metadata records will be resolved if set to true e autofixing A container for configuration of autofixing service enable Autofixing ie update fixed info xsl will be applied to metadata records when they are saved in the editor e searchStats A container for configuration of search statistics collection enable if true then search stats will collected on searches made through the GeoNetwork user interface e indexOptimzer A container to configure if and when Lucene index optimization wil
208. len direct downloaden en de services kunt u bekijken of in uw eigen toepassing gebruiken Wilt u meer weten over het zoeken in het Nationaal georegister Bekijk dan de instructiefilm geodata nationaalgeoregister nl kadastralekaart ows L Met als resultaat Online kaarten C Downloadbare data Data op aanvraag Toon uitgebreide zoekcriteria 232 Chapter 11 User Interface GeoNetwork Developer Manual Release 2 10 4 0 As development will go on this functionality will be made easier and documentation will be filled up TODO some simple examples 11 4 HTML5UI To use this UI you have to compile the web project with html5ui profile activated like mvn clean package Phtml5ui WB My GeoNetwork catalog x G wy D localhost 8080 geonetwork srv eng search debug fast index amp from 1 amp to 50 amp orgName Department 200f 20Sustainability 20and yy A e Google Reader GRedmine G Submit an Article E Otros marcadores English v GeoNetwo ork Aine pensource BROWSE gt gt SEARCH RESULTS ja O Online data j Data for download J No direct download Department of Sustainability and Environment DSE FILTER e T relevance v B Other actions Keywords mw le Localities in Victoria VMADMIN LOCALITY_POLYGON LAND Ownership 1 Comprehensive Elements BOUNDAPIES Administrative 1 This dataset is the definitive set of locality boundaries for the state of Victoria as defined by Local Government
209. lhost 8080 geonetwork srv eng xml metadata batch update children ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 1 lt id gt lt parentUuid gt dal65110 88fd 1lda a88f 000d939bc5d8 lt parentUuid gt lt childrenIds gt 4 lt childrenIds gt lt schema gt isol19139 lt schema gt lt updat eMode gt replace lt updateMode gt lt gmd descriptiveKeywords gt true lt gmd descriptiveKeywords gt lt gmd contact gt true lt gmd contact gt lt gmd extent gt true lt gmd extent gt lt gmd pointOfContact gt true lt gmd pointOfContact gt lt gmd metadataMaintenance gt true lt gmd metadataMaintenance gt lt request gt GET 9 14 Metadata Processing services 137 GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng xml metadata batch update children amp id 1 amp parent Response If the request executed successfully a HTTP 200 status code is returned and some XML describing what was processed An example of such an XML response is lt response gt l child children updated for metadata dal65110 88fd 11da a88f 000d939bc5d8 lt r If the request fails an HTTP 500 status code error is returned and the response contains an XML docu ment with details of the exception An example of such a response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt M
210. lt See also http georss org simple Bounding box in georss simple format simplepoint Bounding box in georss simplepoint format default Bounding box in georss GML format RSS latest request example Urls http localhost 8080 geonetwork srv eng rss latest ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt georss gt default lt georss gt lt maxItems gt 1 lt maxItems gt lt request gt Response The following are the principal fields of the response e channel This is the container for the RSS response title RSS channel title description RSS channel description item Metadata RSS item one item for each metadata retrieved x title Metadata title x link Link to show metadata page Additional link elements with rel alternate to OGC WXS services shapefile images files Google KML etc can be returned depend ing on metadata description Metadata description pubDate Metadata publication date media Metadata thumbnails georss where Bounding box with the metadata extent RSS latest response example Mimetype application rsstxml Response lt xml version 1 0 encoding UTF 8 gt lt rss xmlns media http search yahoo com mrss xmlns georss http www georss org gec 9 6 Search and Retrieve Metadata services 101 GeoNetwork Developer Manual Release 2 10 4 0 xmlns gml http www opengis net gml v
211. lt name gt lt id gt 3 95190a dde4 11ldf 8626 001c2346de4e lt id gt lt version gt 1 0 lt version gt lt namespaces gt xmlins gts http www isotc211 org 2005 gts xmlns gmx http www isotcz lt convertDirectory gt usr local src git geonetwork 2 8 x web src main webapp W lt edit gt true lt edit gt lt conversions gt lt converter name xml_iso19139 nsUri http www isotc211 org 2005 gmd schemaLocat 158 Chapter 9 XML Services EB INF dat GeoNetwork Developer Manual Release 2 10 4 0 lt converter name xml_isol9139Tooai_de nsUri http www openarchives org OAI 2 0 lt conversions gt lt schema gt lt schemas gt Looking at the example schema isol9139 above there are two converters The first is invoked by calling the GeoNetwork service xml_isol9139 eg http somehost geonetwork srv eng xml_iso19139 uuid lt uuid of metadata gt It produces an XML format with names pace URI http www isotc211 org gmd with schemaLocation http www isotc211l org 2005 gmd gmd xsd and xslt name xml_isol19139 be cause the xslt attribute is set to the empty string Categories e categories This is the container for categories category 0 n A single GeoNetwork category This element has an id attribute which represents the local identifier for the category Name Category name label The localised labels used to show the category in the user interface See Localised entities Exam
212. lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs element name MD_Commons substitutionGroup gmd MD_Constraints type mcp MD_Commor For MCP records the GeoNetwork editor will show a choice of elements from the substitution group for gmd MD_Constraints when adding Resource Constraints to the metadata document This will now include mcp MD_Commons Descriptive keywords da Resource specific usage Resource constraints Constraints gmd MD_Constraints Aggregation Information Constraints gmd MD_Constraints Spatial representation type H B Legal constraints gmd MD_LegalConstraints Security constraints gmd MD_SecurityConstraints Commons License mcp MD_Commons Creative Commons License deprecated mcp MD_Creati Data Commons License deprecated mcp MD_DataCommons Spatial resolution K Resolution eames scale Note that by similar process two other elements now deprecated in favour of MD_Commons were also added as substitutes for MD_Constraints If it was necessary to constrain the choices shown in this menu say to remove the deprecated elements and limit the choices to just legal security and commons then this can be done by the following piece of XML in the schema substitutes xml file lt field name gmd MD_Constraints gt lt substitute name gmd MD_LegalConstraints gt lt substitute name gmd MD_SecurityConstraints gt lt substitute
213. lues off default on digital Map type Values off default on paper Map type Values off default on group Filter metadata by group if missing search in all groups attrset dateFrom Filter metadata created after specified date dateTo Filter metadata created before specified date category Metadata category If not specified search all categories Request to search for all metadata example 92 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 UELS http localhost 8080 geonetwork srv eng xml search ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt Request with free text search example Url http localhost 8080 geonetwork srv eng xml search ime type application xml Post request s lt xml version 1 0 encoding UTF 8 gt lt request gt lt any gt africa lt any gt lt request gt Request with a geographic search example Url http localhost 8080 geonetwork srv eng xml search ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt any gt africa lt any gt lt eastBL gt 74 91574 lt eastBL gt lt southBL gt 29 40611 lt southBL gt lt northBL gt 38 47198 lt northBL gt lt westBL gt 60 50417 lt westBL gt lt relation gt overlaps lt relation gt lt sortBy gt relevance lt sortBy gt lt attrset gt geo lt attrset gt lt reques
214. ly limited to a date range prefix and metadata set name If this element is missing an unconstrained search will be performed x from string from date search until string to date search x set string metadata set name on OAIPMH server possible values can be retrieved using http your_oaipmhservername verb ListSets prefix string metadata prefix name on OAIPMH server possible values can be re trieved using http your_oaipmhservername verb ListMetadataFormats XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of OAIPMH harvester settings in XML lt node id 1152 type oaipmh gt lt site gt lt name gt oaitest lt name gt lt uuid gt 0a3e4a4a 4c4c 4f82 860f 551b6cf12341 lt uuid gt lt account gt lt use gt true lt use gt lt username gt lt password gt lt account gt lt url gt http localhost 6060 joai lt url gt lt icon gt oai mhp gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt IMPORTXSLT lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt validate gt false lt validate gt lt options gt lt searches gt lt search gt lt from gt 2013 01 08 lt from gt lt until gt 2013 01 30 lt until gt lt set gt isol9139 lt set gt lt prefix gt gmd lt p
215. m committing until the release tag has been created 2 4 Prerequisites 1 Commit access to GeoNetwork git 13 GeoNetwork Developer Manual Release 2 10 4 0 2 Administration rights to SourceForge server to publish the release 3 Administration rights to geonetwork opensource org to update the website for stable release 2 5 Add release to trac Add the new version to the trac release list http trac osgeo org geonetwork admin ticket versions Add the 3 RC milestone http trac osgeo org geonetwork admin ticket milestones TODO At some point all open tickets for the master branch eg 2 9 0 should be moved to the next RC eg 2 10 0RC1 or 2 10 1 or the next master eg 2 11 0 2 6 Making the release This procedure creates a new development branch and its first RC version TODO Add procedure to only make a new release from an existing dev branch Set version numbers modules gast geoserver installer TODO maybe add other modules if changes version 2 10 0 devversion 2 10 x minorversion RCO masterversion 2 9 0 previousversion 2 8 x sourceforge username YoursSourceforgeUserNam Get the code git clone recursive https github com geonetwork core geonetwork git geonetwork Svers cd geonetwork S version Create a new development branch from master git checkout b S devversion origin master git submodule foreach git checkout b devversion origin master Update version num
216. main java org fao geonet kernel harvest Here too there is one subfolder for each harvesting type The most important classes for the implemen 19 GeoNetwork Developer Manual Release 2 10 4 0 tor are 1 AbstractHarvester This is the main class that a new harvesting type must extends It takes care of all aspects like adding updating removing starting stopping of harvesting nodes Some abstract methods must be implemented to properly tune the behaviour of a particular harvesting type 2 AbstractParams All harvesting parameters must be enclosed in a class that extends this abstract one Doing so all common parameters can be transparently handled by this abstract class All others are small utility classes used by harvesting types 3 1 3 XSL stylesheets Stylesheets are spread in some folders and are used by both the JavaScript code and the server The main folder is located at web src webapp xsl harvesting Here there are some general stylesheets plus one subfolder for each harvesting type The general stylesheets are 1 buttons xsl Defines all button present in the main page activate deactivate run remove back add refresh buttons present in the add new harvesting page back and add and at the bottom of the edit page back and save 2 client error tip xsl This stylesheet is used by the browser to build tooltips when an harvesting error occurred It will show the error class the message and the stackt
217. mentStylesheet gt lt atomicMetadataTemplate gt 7 lt atomicMetadataTemplate gt lt createAtomicSubtemplates gt true lt createAtomicSubtemplates gt lt outputSchemaOnAtomicsDIF gt lt outputSchemaOnAtomicsFragments gt isol9139 lt outputSchemaOnAtomicsFragments gt lt ignoreHarvestOnCollections gt true lt ignoreHarvestOnCollections gt lt collectionGeneration gt fragments lt collectionGeneration gt lt collectionFragmentStylesheet gt thredds metadata xsl lt collectionFragmentStylesheet gt lt collectionMetadataTemplate gt 7 lt collectionMetadataTemplate gt lt createCollectionSubtemplates gt true lt createCollectionSubtemplates gt lt outputSchemaOnCollectionsDIF gt lt outputSchemaOnCollectionsFragments gt isol9139 lt outputSchemaOnCollectionsFragments gt lt datasetCategory gt 2 lt datasetCategory gt lt options gt lt privileges gt lt group id 1 gt lt operation name view gt 216 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 lt group gt lt privileges gt lt categories gt lt category id 3 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting e this harvester does not use the content validate setting 10 3 7 Harvesting node wfsfeatures This harvester typ
218. ml user pwupdate The xml user pwupdate service can be used to change the password of the current authenticated user Requires authentication Yes Request Parameters e password Actual user password e newPassword New password to set for the user Example lt request gt lt password gt admin lt password gt lt newPassword gt admin2 lt newPassword gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id error gt lt message gt Old password is not correct lt message gt lt class gt IllegalArgumentException lt class gt lt stack gt lt stack gt lt error gt See Exception handling for more details 9 4 User services 85 GeoNetwork Developer Manual Release 2 10 4 0 Errors e Service not allowed error id service not allowed when the user is not authenticated Returns 500 HTTP code Old password is not correct Returns 500 HTTP code e Bad parameter newPassword when an empty password is provided Returns 500 HTTP code Remove a user xml user remove The xml user remove service can be used to remove an existing user Only users with profiles Admin istrator or UserAdmin can delete users User
219. mport a metadata record from a previous backup 3 Import a metadata record from a different GeoNetwork version to allow a smooth migration from one version to another 4 Capture metadata plus thumbnails and any data uploaded with the metadata record In the paragraphs below some terms should be intended as follows 1 the term actor is used to indicate any system application service etc that operates on metadata 2 the term reader will be used to indicate any actor that can import metadata from a MEF file 3 the term writer will be used to indicate any actor that can generate a MEF file 8 2 MEF v1 file format A MEF file is simply a ZIP file which contains the following files Root metadata xml info xml public all public documents and thumbnails private all private documents and thumbnails 59 GeoNetwork Developer Manual Release 2 10 4 0 1 metadata xml this file contains the metadata itself in XML format The text encoding of the metadata eg UTF 8 is specified in the XML declaration 2 info xml this is a special XML file which contains information related to the metadata meta data about the metadata Examples of the information in the info xml file are creation date modification date privileges This information is needed by GeoNetwork 3 public this is a directory used to store the metadata thumbnails and other public files There are no restrictions
220. n Commit git submodule foreach git add FIXME don t work due to version git submodule foreach git commit m Update version to version SNAPSHOT for i in S modules do ed Si git add git commit m Update version to version SNAPSHOT cd done git add git commit m Update version to version SNAPSHOT git submodule foreach git push origin master git push origin master 16 Chapter 2 Create a release GeoNetwork Developer Manual Release 2 10 4 0 2 8 Upload and release on SourceForge All of the artifacts generated so far need to be uploaded to the SourceForce File release System 1 WAR distribution 2 Installers exe and jar Note This step requires administrative privileges in SourceForge for the GeoNetwork opensource project 1 Log in to SourceForge 2 Go to the GeoNetwork Files section lt https sourceforge net projects geonetwork files GeoNetwork_opensource 3 Add the new v VERSION folder for this release 4 a Using the commandline secure copy is the simplest way for developers working under a NIX like system scp geonetwork war username frs sourceforge net home frs project g ge geonetwork Geol scp geonetwork VERSION jar username frs sourceforge net home frs project g ge geone scp geonetwork VERSION exe username frs sourceforge net home frs project g ge geone scp docs readme VERSION txt username frs sourceforge net home frs project g ge geo
221. n below lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code 9 11 3 Get status of a metadata record xml metadata status get This service gets the status of a particular metadata record specified by id or uuid as a parameter Requires authentication No Request Parameters e id or uuid Identifier of metadata to obtain status of Example request POST Url http localhost 8080 geonetwork srv eng xml metadata status get Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 5 lt id gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata status get amp id 5 Response If the request executed successfully a HTTP 200 status code is returned and the XML with status values for the metadata record note all changesin status are returned in the response is returned An example follows 9 11 Metadata Status services 125 GeoNetwork Developer Manual Release 2 10 4 0 lt response gt lt record gt lt statusid gt 5 lt statusid gt lt userid gt 4 lt userid gt lt changedat
222. n type services multiple metadata elements describing the service metadata records that operate on the specified metadata record metadata container for a service metadata record title Metadata title abstract A brief explanation of the metadata x Other elements returned by a brief presentation of the service metadata record 9 15 Metadata Relation services 139 GeoNetwork Developer Manual Release 2 10 4 0 relation type fcats multiple metadata elements describing the feature catalog metadata records that are related to the specified metadata record metadata container for feature catalog metadata record title Metadata title abstract A brief explanation of the metadata x Other elements returned by a brief presentation of the feature catalog metadata record relation type hasfeaturecat metadata element describing the metadata record that has a feature catalog relation to this feature catalog record metadata container for metadata record title Metadata title abstract A brief explanation of the metadata x Other elements returned by a brief presentation of the metadata record relation type related elements describe a related metadata record to the specified metadata record id GeoNetwork internal id integer uuid Metadata uuid title Metadata title abstract A brief explanation of the metadata If the response did not execute successfully then an HTTP error code 500 is returned
223. name mcp MD_Commons gt lt field gt The result of this change is shown below Descriptive keywords ia Resource specific usage Resource constraints Legal constraints gmd MD_LegalConstraints Aggregation Information Legal constraints gmd MD_LegalConstraints Spatial representation type Security constraints gmd MD_SecurityConstraints Commons License mcp MD_Commons Spatial resolution Once again a good place to start when building a schema substitutes xml file for the MCP is the schema substitutes xml file for the iso19139 schema 7 3 Example ISO19115 19139 Marine Community Profile MCP 57 GeoNetwork Developer Manual Release 2 10 4 0 7 3 11 Adding components to support conversion of metadata records to other schemas Creating the convert directory If the new GeoNetwork plugin schema is to support on the fly translation of metadata records to other schemas then the convert directory should be created and populated with appropriate XSLTs Supporting OAIPMH conversions The OAIPMH server in GeoNetwork can deliver metadata records from any of the schemas known to GeoNetwork It can also be configured to deliver schemas not known to GeoNetwork if an XSLT exists to convert a metadata record to that schema The file INSTALL_DIR web geonetwork WEB INF config oai prefixes xml describes the schemas known as prefixes in OAI speak that can be produced by an XSLT A simple example of the content of this fi
224. ne U WW U Mm 4 b The same can be accomplished in Windows using WinSCP Or a desktop client like Cyberduck on Windows and Mac OS X 5 Once the upload of the files has been completed use the web interface to set the default download files The i button allows to set the default operating systems for each installer exe for Windows and jar for all other systems Looking for the latest version Download geonetwork install 2 6 4 0 jar 196 5 MB Add File Add Folder Home GeoNetwork opensource v2 6 4 N Name Modified Size 4 Parent folder readme txt lt 30 mins ago 75 8 KB ia geonetwork install 2 6 4 0 exe lt 2 hours ago 196 6 MB i a SHA1 7923 34526e109295dce6dce7d052c09ads42949F Downloads MDS e5065a25f90caftdec0fd4c807alc20a Mirror Status 21 mirrors Download URL http sourceforge net projects geonetwork files GeoNetwork oj Default Download For P Download Button M Ay K A v mT Others Exclude Stats i afz Others Select all Save Cancel 6 The default downloads are ready now 2 8 Upload and release on SourceForge 17 GeoNetwork Developer Manual Release 2 10 4 0 2 9 Update geonetwork opensource website The website requires updates to reflect the new release Update the version number and add a new news entry in the following files website docsrc conf py website docsrc docs rst website docsrc downloads rst website docsrc index rst website docsrc news rst website checkup_docs
225. nk spaces means no information provided for that case 11 1 Classic This is the default user interface in GeoNetwork It is a complete user interface with all the functionalities the rest of the user interfaces have but it is prepared to work on the hardest environments using as less javascript and Ajax as possible for example You don t have to do anything special to run this user interface as it is the default one 11 2 Search To use this UI you have to compile the web project with widgets profile activated like mvn clean package Pwidgets 227 GeoNetwork Developer Manual Release 2 10 4 0 WE Geocat 2 8 0 test server x go G D newgui geocat net geonetwork apps search GeoCat 2 8 0 test server Discovery Visualization User name sees amp Login English Resource ype Find Interactive Maps GIS datasets Satellite Imagery and Related Applications GeoNetwork s purpose is Q Q oJ To improve access to and integrated use of spatial data and information To support decision making To promote multidisciplinary approaches to sustainable development To enhance understanding of the benefits of geographic information Access this catalogue using the following services Catalogue Service for the web CSW de l OGC Open Archive Initiative OAI PMH 239 50 OpenSearch 105 46875 96 32813 GeoNetwork opensource allows to easily share geographically referenced y Options thematic information bet
226. nnels 7 2 Preparation 31 GeoNetwork Developer Manual Release 2 10 4 0 The documentation for the Marine Community Profile can be found at http www aode gov au files MarineCommunityProfilevl 4 pdf The implementation of the Ma rine Community Profile as XML schema definitions is based on the approach described at https www seegrid csiro au wiki AppSchemas MetadataProfiles The XML schema definitions XSDs are available at the URL http bluenet3 antere utas edu au mcp 1 4 Looking at the XML schema definitions the profile adds a few new elements to the base ISO19139 standard So the basic idea in defining a plugin Marine Community Profile schema for GeoNetwork is to use as much of the basic ISO19139 schema definition supplied with GeoNetwork as possible We ll now describe in basic steps how to create each of the components of a plugin schema for GeoNet work that implements the MCP 7 3 1 Creating the schema ident xml file Now we need to provide the information necessary to identify the schema and metadata records that belong to the schema The schema ident xml file for the MCP is as follows lt xml version 1 0 encoding UTF 8 gt lt schema xmlns http geonetwork opensource org schemas schema ident xmlns xsi http www w3 org 2001 XMLSchema instance lt name gt isol9139 mcp lt name gt lt id gt 19c9a2b2 dddb 11df 9df4 001c2346de4c lt id gt lt version gt 1 5 lt version gt lt schemaLocation gt http
227. not considered XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of GeoNetwork harvester settings in XML lt node id 954 type geonetwork gt lt site gt lt name gt test lt name gt lt uuid gt 683bfc02 73e2 4100 a601 369936b6f82a lt uuid gt lt accoun lt use gt lt user lt password gt admin lt password gt lt accou lt host gt h t gt nt gt ttp true lt use gt name gt admin lt username gt localhost 8080 geonetwork lt host gt lt cr lt mefFormatFull lfil lt XS at lt site gt lt content gt lt val ida ter gt RemoteCategory gt true lt createRemoteCategory gt l gt true lt mefFormatFull gt te gt true lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 3 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt 10 3 Harvesting nodes 207 GeoNetwork Developer Manual Release 2 10 4 0 lt search gt lt freeText gt Maps lt freeText gt lt title gt lt title gt lt abstract gt lt abstract gt lt keywords gt lt keywords gt lt digital gt false lt digital gt lt hardcopy gt true lt hardcopy gt lt source gt lt uuid gt b7ce20f2 888a 4139 8802 916730c4be06 lt uuid gt lt name gt My GeoNetwork catalogue lt name gt
228. o gmd MD Dataldentification gmd citation gmd CI Cite lt error gt lt error gt lt message gt ERROR 2 org xml sax SAXParseException cvc type 3 1 3 The value of lt xpath gt gmd identificationInfo gmd MD Dataldentification gmd citation gmd CI Cite lt error gt 104 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt error gt lt message gt ERROR 3 org xml sax SAXParseException cvc datatype valid 1 2 1 is lt xpath gt gmd identificationInfo gmd MD_DataIdentification gmd spatialResol lt error gt lt error gt lt message gt ERROR 4 org xml sax SAXParseException cvc type 3 1 3 The val lt xpath gt gmd identificationInfo gmd MD_DataIdentification gmd spatialResol lt error gt lt xsderrors gt lt object gt lt request gt lt language gt eng lt language gt lt service gt xml metadata insert lt service gt lt request gt lt error gt Errors Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code bad parameter XX XX when a mandatory parameter is empty Returns 500 HTTP code ERROR duplicate key violates unique constraint metadata_uuid_key if another metadata record in catalog has the same uuid of
229. oNetwork Developer Manual Release 2 10 4 0 9 10 3 Retrieve metadata owners xml ownership editors The xml ownership editors service can be used to retrieve the users with editor profile that own meta data records Requires authentication Yes Request Parameters e None Retrieve metadata owners request example Url http localhost 8080 geonetwork srv eng xml ownership editors ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt Response Successful execution returns HTTP status code 200 and an XML document with the results The ele ments of the response are as follows e root This is the container for the response editor Container for each editor user information x id User identifier username User login x name User name surname User surname profile User profile Example lt xml version 1 0 encoding UTF 8 gt lt root gt lt editor gt lt id gt 1 lt id gt lt username gt admin lt username gt lt name gt admin lt name gt lt surname gt admin lt surname gt lt profile gt Administrator lt profile gt lt editor gt lt editor gt lt id gt 2 lt id gt lt username gt samantha lt username gt 118 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt name gt Samantha lt name gt lt surname gt Smith lt surname gt lt profile gt Editor lt profile gt lt editor gt lt root
230. oding UTF 8 gt 190 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt env Envelope xmlns env http www w3 org 2003 05 soap envelope gt lt env Body gt lt csw GetRecords xmlns csw http www opengis net cat csw 2 0 2 service CSW vers lt csw Query typeNames csw Record gt lt csw Constraint version 1 1 0 gt lt Filter xmlns http www opengis net ogc xmlns gml http www opengis net c lt PropertyIsLike wildCard singleChar _ escape gt lt PropertyName gt AnyText lt Propert yName gt lt Literal gt africa lt Literal gt lt PropertyIsLike gt lt Filter gt lt csw Constraint gt lt csw Query gt lt csw GetRecords gt lt env Body gt lt env Envelope gt The GeoNetwork opensource catalog CSW Publication service operations are accessible through the url http localhost 8080 geonetwork srv eng csw publication Harvest The Harvest operation defines an interface for indirectly creating modifying and deleting catalogue records by invoking a CSW client harvesting run from the server to a specified target It can be run in ei ther synchronous or asynchronous mode and the harvesting run can be executed just once or periodically This operation requires user authentification to be invoked Synchronous one run Harvest example POST request Url http localhost 8080 geonetwork srv eng csw publication Content type application xml Post da
231. ogical basins in Africa gt lt category gt Geographic metadata catalog lt category gt lt description gt lt CDATA gt lt description gt lt pubDate gt 06 Nov 2007 12 13 00 EST lt pubDate gt lt guid gt http localhost 8080 geonetwork uuid 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt gi lt media content url geonetwork srv eng resources get id 11 fname thumbnail_s gif amp access public type image gif width 100 gt lt media text gt Major hydrological basins and their sub basins lt media text gt lt Bounding box in georss GML format http georss org gt lt georss where gt lt gml Envelope gt lt gml lowerCorner gt 34 6 17 3 lt gml lowerCorner gt lt gml upperCorner gt 38 2 51 1 lt gml upperCorner gt lt gml Envelope gt lt georss where gt lt item gt lt channel gt lt rss gt 9 7 Metadata insert update and delete services These services provide insert update and delete operations for metadata records They could be used by a metadata editing program external to GeoNetwork This is the Create Update Delete part of the metadata CRUD operations in GeoNetwork For read retrieve operations the R in CRUD see Search and Retrieve Metadata services 9 7 1 Insert metadata xml metadata insert The xml metadata insert service allows you to insert a new record into the catalogue Requires authentication Yes 102 Chapter 9 XML Services
232. ok gt If the response headers are examined they will look something like the following Expires Thu 01 Jan 1970 00 00 00 GMT Set Cookie JSESSIONID 1xh3kpownhmjh Path geonetwork Content Type application xml charset UTF 8 Pragma no cache Cache Control no cache Transfer Encoding chunked The authentication process sets the JSESSIONID cookie with the authentication token This token should be sent as part of the request to all services that need authentication If the execution of the login request is not successful then an HTTP 500 status code error is returned along with an XML document that describes the exception what went wrong An example of such a response is lt error id user login gt lt message gt User login failed lt message gt lt class gt UserLoginEx lt class gt lt stack gt lt at class org fao geonet services login Login file Login java line 90 method lt at class jeeves server dispatchers ServiceInfo file ServiceInfo java line 238 lt at class jeeves server dispatchers ServiceInfo file ServiceInfo java line 141 lt at class jeeves server dispatchers ServiceManager file ServiceManager java line lt at class jeeves server JeevesEngine file JeevesEngine java line 621 method c lt at class jeeves server sources http JeevesServlet file JeevesServlet java lines lt at class jeeves server
233. onality like a search connector so the visualization has data to show Using outside GeoNetwork Although it is a testing functionality in fact you can use this same widgets on your own webpage You just have to make sure that all dependencies are fulfilled and the settings are properly set up As development will go on this functionality will be made easier and documentation will be filled up TODO some simple examples It contains two maps preview map and big map You can access the big map clicking on the preview map Both maps have synchronized layers so if you add or remove or change style on one map layer you will see that the other map also changes Tested in Chrome Firefox and IE gt 8 also works but with some penalties on IE7 Changing Style Basic changing styling is pretty easy with this UI Colors There is a file on web client src main resources apps html5ui css colors css which contains all the colors of the app Page design The html is loaded from web src main webapp xsl search xsl This xsl is interpreted by jeeves and trans formed to show the basic page The page scheme is basically the same on all links so if you change the position of some html elements they will be changed on all views Don t forget that some of the elements are also placed with css Specific css for this UI not shared with other UIs like search or tabsearch is placed on web client src main resources apps html5ui css main css
234. onfigurations of this user interface defined on two javascript files 236 Chapter 11 User Interface GeoNetwork Developer Manual Release 2 10 4 0 js Settings js You can find here some global configuration settings for the UI Usually you won t have to change any of them There are constants like e GeoNetwork Settings facetListConfig used to configure the keywords for the facet search e OpenLayers ProxyHostURL relative or absolute path to url required by openlayers js map Settings js You can find here some specific map configuration settings for the UI You can use this file to set up the kind of projection and default base layers the maps will use There are constants like e GeoNetwork map PROJECTION Basic projection for maps EPSG 900913 by default e GeoNetwork map BACKGROUND LAYERS Base layers for the maps e GeoNetwork map MAIN_ MAP OPTIONS Used by the constructor of the main big map e GeoNetwork map MAP_OPTIONS When the user interface creates a new secondary map it uses this options on the constructor Right now it works for the mini map but will be used on each view a secondary map is shown Changing more complex features Debugging To debug javascript you only have to add a debug or debug true parameter to the url like this http srv eng search debug Adding more widgets Widgets are usually added on the file web client src main resources apps htm15ui js App js or one of its
235. onse to an update request is lt response gt lt operation gt updated lt operation gt lt response gt An example of a response to a create request is lt response gt lt operation gt added lt operation gt lt response gt If the request fails then a HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example of such a response is lt error id missing parameter gt lt message gt name lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details 9 3 Group services 71 GeoNetwork Developer Manual Release 2 10 4 0 Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile is not permitted to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter name when name it s empty Returns 500 HTTP code e ERROR duplicate key violates unique constraint groups name key when trying to create a new group using an existing group name Returns 500 HTTP code Update label translations xml group update The xml group update service can be used to update translations of a group name Only users with Administrator profile can update group name translations Requires authentication Yes
236. ontaining the definition of the harvester as is described in the response section of the xml harvesting get service above If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is lt error id object not found gt lt message gt Object not found lt message gt lt class gt ObjectNotFoundEx lt class gt lt error gt See Exception handling for more details 9 20 3 Get information for Harvester definition xml harvesting info This service can be used to obtain information from the server that is relevant to defining a harvester eg harvester icons stylesheets etc Request and Response All requests must have a type parameter which defines the type of information required The requests and responses for each value of the type parameter are icons Return the list of icons that can be used when creating a harvester instance Icons are usually set in site icon harvester setting POST Request Example lt request gt lt type gt icons lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt icons gt lt icon gt wfp gif lt icon gt lt icon gt unep gif lt icon gt lt icon gt webdav gif lt icon gt lt icon gt gn20 gif lt icon gt lt icon gt thredds gif lt icon gt lt icon gt wfs gif lt icon gt lt icon gt csw gif l
237. or gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e ERROR insert or update on table operationallowed violates foreign key operational lowed_operationid_fkey if an operation identifier provided is not valid Returns 500 HTTP code e ERROR insert or update on table operationallowed violates foreign key operational lowed_groupid_fkey if a group identifier provided is not valid Returns 500 HTTP code 114 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 9 10 Metadata Ownership services These services allow retrieval and management of metadata ownership where the owner of a metadata record is the user who created it Only users with Administrator and UserAdmin profiles can execute these services 9 10 1 Batch new owner xml metadata batch newowner The xml metadata batch newowner service allows you to set the owner of a selected set of metadata records Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select metadata records Note Only those metadata records for which the user running the service has ownership rights on will be updated If metadata versioning is on then ownership changes will be recorded in the
238. or parentUuid This is the identifier of the metadata which we are inserting a relationship for e childId integer or parentUuid This is the identifier of the metadata which will be related to metadata record specified by parentId or parentUuid Here is an example of POST XML request lt request gt lt parentId gt 1 lt parentId gt lt childId gt 2 lt childId gt lt request gt 142 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Response Normally an HTTP status code 200 is returned along with an XML document containing a response root element with an attribute indicating whether the relationship already exists and the parentId and childId parameters from the request Example lt response alreadyExist false gt lt parentId gt 1 lt parentId gt lt childId gt 2 lt childId gt lt response gt Note this service returns this response even if the metadata records specified in the parameters do not exist If the response did not execute successfully then an HTTP error code 500 is returned along with an XML document describing the exception what went wrong See Exception handling for more details xml relation delete This service deletes a relationship between a parent metadata record and a child metadata record The relationship is held in the Relations table ie relationships removed using this service are those that cannot be held in a metadata record Request e parentld
239. ork another commit git push origin myfeature this pushed your new branch to Github now you are ready to make a Pull Request to c HE 1 4 Build GeoNetwork Once you checked out the code from Github repository go inside the GeoNetwork s root folder and execute the maven build command mvn clean install If the build is succesful you ll get an output like ZZ mj rj OO INFO INFO INFO Reactor Summary INFO INFO G oN twork Opensource ais eee sled an ane Baa dw lee Yee dowel eee SUCCESS 1 825s INFOJ Caching silt Module aie ers andes Soe vande ane eee eal as SUCCESS 1 579s INFO Jeeves mod le mss arava Sele de als Meee eee Ree ee 4 ei oe acs SUCCESS 1 140s INFOJ Oaipmh modules 2 seas mima bind ed eee he Be Se ee ee SUCCESS 0 477s INFO ArcSDE module dummy api ursus seeden dee ees SUCCESS 0 503s INFO GeoNetwork Web module 2 ee eee ee ee d ida dai ee eee eee ee SUCCESS 31 758s INFO GeoServer module ws cede ae et eee se eee eee es ee eH ae SUCCESS 16 510s INFO Gast module ursus alas Hae Suna ee eae ed eae eee ad wale SUCCESS 24 961s T T I zZ j O BUILD SUCCESSFUL 1 4 Build GeoNetwork 5 GeoNetwork Developer Manual Release 2 10 4 0 Total time 1 minute 19 seconds Final Memory 79M 123M INFO Finished at Tue Aug 03 16 49 15
240. ork scripts harvesting folder Here there is a subfolder for each harvesting type plus some classes for the main page These are 1 harvesterjs This is an abstract class that must be implemented by harvesting types It defines some information retrieval methods getType getLabel etc used to handle the harvesting type plus one getUpdateRequest method used to build the XML request to insert or update entries 2 harvester model js Another abstract class that must be implemented by harvesting types When creating the XML request the only method substituteCommon takes care of adding common information like privileges and categories taken from the user interface 3 harvester view js This is an important abstract class that must be implemented by harvesting types It takes care of many common aspects of the user interface It provides methods to add group s privileges to select categories to check data for validity and to set and get common data from the user interface 4 harvesting js This is the main JavaScript file that takes care of everything It starts all the sub modules loads XML strings from the server and displays the main page that lists all harvesting nodes 5 model js Performs all XML requests to the server handles errors and decode responses 6 view js Handles all updates and changes on the main page 7 util js just a couple of utility methods 3 1 2 Java code The harvesting package is located in web src
241. otalDeleted gt lt csw TransactionSummary gt lt csw TransactionResponse gt Errors e User is not authenticated 194 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt xml version 1 0 encoding UTF 8 gt lt oOws lt ows ExceptionReport xmlns ows http www opengis net ows xmlns xsi http www w lt ows Exception exceptionCode NoApplicableCode gt lt ows ExceptionText gt Cannot process transaction User not authenticated lt ows Exc lt ows Exception gt ExceptionReport gt 9 24 Java development with XML services In this chapter are shown some examples to access GeoNetwork XML services in Java Apache http commons library is used to send the requests and retrieve the results 9 24 1 Retrieve groups list This example shows a simple request without requiring authentication to retrieve the GeoNetwork groups Source package org geonetwork xmlservices client import import import import import public publ k k E ry St Po TE org apache commons httpclient HttpClient org apache commons httpclient methods PostMethod org apache commons httpclient methods StringRequestEntity org jdom Document org jdom Element class GetGroupsClient ic static void main String args Create request xmlxx ment request new Element request Create PostMethod specifying ser
242. ou can use this same widgets on your own webpage You just have to make sure that all dependencies are fulfilled and the settings are properly set up As development will go on this functionality will be made easier and documentation will be filled up TODO some simple examples 240 Chapter 11 User Interface Index E Exception Handling 66 M mef export 184 mef import 186 R rss latest 100 rss search 98 X xml category create update 87 xml category get 89 xml category remove 90 xml category update 88 xml config get 148 xml config set 153 xml file disclaimer 163 xml file download 164 xml forward 161 xml group create update 70 xml group get 73 xml group remove 74 xml group update 72 xml harvesting add 168 xml harvesting get 165 xml harvesting history 176 xml harvesting history delete 178 xml harvesting info 169 xml harvesting remove 175 xml harvesting run 175 xml harvesting start 175 xml harvesting stop 175 xml info 154 xml metadata batch delete 108 xml metadata batch newowner 115 xml metadata batch processing 134 xml metadata batch update categories 128 xml metadata batch update children 136 xml metadata batch update privileges 113 xml metadata batch update status 123 xml metadata batch version 131 xml metadata category 126 xml metadata delete 107 xml metadata get 95 xml metadata insert 102 xml metadata privileges 111 xml metadata processing 133 xml metad
243. pe application soap xml Post data lt xml version 1 0 encoding UTF 8 gt lt env Envelope xmlns env http www w3 org 2003 05 soap envelope gt lt env Body gt lt csw GetCapabilities xmlns csw http www opengis net cat csw 2 0 2 service CSW gt lt ows AcceptVersions xmlns ows http www opengis net ows gt lt ows Version gt 2 0 2 lt ows Version gt lt ows AcceptVersions gt lt ows AcceptFormats xmlns ows http www opengis net ows gt lt ows OutputFormat gt application xml lt ows OutputFormat gt lt ows AcceptFormats gt lt csw GetCapabilities gt lt env Body gt lt env Envelope gt DescribeRecord DescribeRecord operation allows a client to discover elements of the information model supported by the target catalogue service The operation allows some or all of the information model to be described Request examples GET request http localhost 8080 geonetwork srv eng csw request DescribeRecord service CSW version POST request Url http localhost 8080 geonetwork srv eng csw Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw DescribeRecord xmlns csw http www opengis net cat csw 2 0 2 service CSW versi SOAP request 188 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng csw Content type application soap xml Post data l
244. ple response lt categories gt lt category id 1 gt lt name gt datasets lt name gt lt label gt lt eng gt Datasets lt eng gt lt fre gt Jeux de donn es lt fre gt lt label gt lt category gt lt categories gt Operations e operations This is the container for the operations operation 0 n This is a possible operation on a metadata record This element has an id attribute which represents the local identifier for the operation name Short name for the operation reserved Can be y or n and is used to distinguish between system reserved and user defined operations label The localised labels used to show the operation in the user interface See Lo calised entities Example response for operations 9 18 Site Information and Request Forwarding Services 159 GeoNetwork Developer Manual Release 2 10 4 0 lt operations gt lt operation id 0 gt lt name gt view lt name gt lt label gt lt eng gt View lt eng gt lt fre gt Voir lt fre gt lt label gt lt operation gt lt operations gt Regions e regions This is the container for geographical regions region 0 n This is a region container element This element has an id attribute which represents the local identifier for the operation north North coordinate of the bounding box south South coordinate of the bounding box west West coordinate of the bounding box east east coordinate of
245. profile return all metadata records owned by the user Requires authentication Yes Request e sortBySelect optional parameter specifying sort order of metadata records returned Get metadata request example Url http localhost 8080 geonetwork srv eng xml user metadata Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt Response Successful response is an XML document with a response container and the user metadata records as children of that container Each child has a geonet info element which gives GeoNetwork specific metadata about the metadata record An example response with some content removed for brevity is as follows lt response gt lt metadata record 1 gt lt gmd MD Metadata gt lt gmd MD_Metadata gt 9 6 Search and Retrieve Metadata services 97 GeoNetwork Developer Manual Release 2 10 4 0 lt metadata record 2 gt lt gmd MD Metadata gt lt gmd MD_Metadata gt lt response gt Error response is an XML document with error container and the details of the error Example lt error id service not allowed gt lt message gt Service not allowed lt message gt lt object gt xml user metadata lt object gt lt request gt lt language gt eng lt language gt lt service gt xml user metadata lt service gt lt request gt lt error gt See Exception handling for more details Errors e
246. queried or changed through the two services described in this section xml config get and xml config set The second group of parameters must be changed manually by editing the config xml files in INSTALL_DIR web geonetwork WEB INF The GAST tool can be used to help configure the database parameters see the section on the GAST tool in the user manual 9 17 2 xml config get This service returns the system configuration parameters as an XML document Request Parameters None Response The response is an XML tree similar to the system hierarchy into the settings structure The response has the following elements e site A container for site information name Site name organisation Site organisation name svnUuid Subversion Uuid used for metadata versioning siteld Uuid of site used to uniquely identify site e platform Details of development platform version Version string of software subVersion Additional version string e server A container for server information host Name of the host from which the site is reached port Port number of the previous host protocol http or https e Intranet Information about the Intranet of the organisation network IP address that specifies the intranet netmask netmask used to identify intranet e 23950 Configuration of Z39 50 server enable true means that the Z39 50 server component is running 148 Chapter 9 XML
247. r when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter id when id parameter is empty invalid Returns 500 HTTP code 9 5 Category services 91 GeoNetwork Developer Manual Release 2 10 4 0 9 6 Search and Retrieve Metadata services 9 6 1 Search metadata xml search The xml search service can be used to retrieve metadata records from GeoNetwork Requires authentication Optional Request Search configuration parameters all values are optional remote Search in local catalog or in a remote catalog Values off default on extended Values on off default timeout Timeout for request in seconds default 20 hitsPerPage Results per page default 10 similarity Lucene accuracy for searches default 0 8 sortBy Sorting criteria Values relevance default rating popularity changeDate title Search parameters all values are optional eastBL southBL northBL westBL Bounding box to restrict the search relation Bounding box criteria Values equal overlaps default encloses fullyOutsideOf intersection crosses touches within any Text to search in a free text search title Metadata title abstract Metadata abstract themeKey Metadata keywords To search for several use a value like Global or watersheds template Indicates if search for templates or not Values n default y dynamic Map type Values off default on download Map type Va
248. r records that don t match any of the in stalled schemas The value for the default schema is specified in the appHandler configuration of the INSTALL_DIR web geonetwork WEB INF config xml config file or it could be a default specified by the operation calling autodetect eg a value parsed from a user bulk load ing some metadata records For flexibility and accuracy reasons it is preferable that records be detected using the autodetect information of an installed schema The default schema is just a catch all method of assigning records to a specific schema The config element in INSTALL_DIR web geonetwork WEB INF config xml looks like the following lt appHandler class org fao geonet Geonetwork gt lt param name preferredSchema value isol9139 gt lt appHandler gt More on autodetect evaluation The rules for autodetect are evaluated as follows for each autodetect rule type in attributes namespaces elements namespaces root element for each schema if schema has autodetect rule type then check rule for a match if match add to list of previous matches end if end for each if more than one match throw SCHEMA RULE CONFLICT EXCEPTION if one match then set matched first match and break loop end for each if no match then if namespaces of record and default schema overlap then set match default schema else throw NO SCHEMA MATCHES EXCEPTION
249. r settings descriptions below privileges 0 1 This is a container for privileges to assign to each harvested metadata record x group integer 0 n A local group The value is the local identifier of the group There can be several group nodes each with its own set of privileges operation integer 0 n Privilege to assign to the group The value is the numeric id of the operation like O view 1 download 2 edit etc categories 0 1 This is a container for categories to assign to each harvested metadata record x category integer 0 n A local category The value is the local identifier of the category info Container for status information about harvesting from this node x lastRun string When the harvester was last run The value is the current time in milliseconds since 1 January 1970 If empty then the harvester has not yet been run Settings for each of the different harvesters that show the additional elements specific to those harvesters are in the following sections 10 3 1 Harvesting node geonetwork This is the native harvesting supported by GeoNetwork 2 1 and above e node string geonetwork site Contains host and account information x host string eg http localhost 8080 geonetwork x createRemoteCategory boolean True If local category exists with same name as the remote category then assign harvested metadata to that category False Ignore categories mefForm
250. race 3 client node row xsl This is also used by the browser to add one row to the list of harvesting nodes in the main page 4 harvesting xsl This is the main stylesheet It generates the HTML page of the main page and includes all panels from all the harvesting nodes In each subfolder there are usually 4 files 1 xxx xsl This is the server stylesheets who builds all panels for editing the parameters XXX is the harvesting type Usually it has the following panels site information search criteria options privileges and categories 2 client privil row xsl This is used by the JavaScript code to add rows in the group s privileges panel 3 client result tip xsl This is used by the JavaScript code which inherits from harvester view js to show the tool tip when the harvesting has been successful 4 client search row xsl Used in some harvesting types to generate the HTML for the search criteria panel As you may have guessed all client side stylesheets those used by JavaScript code start with the prefix client Another set of stylesheets are located in web src webapp xsl xml harvesting and are used by the xml harvesting get service This service is used by the JavaScript code to retrieve all the nodes the system is currently harvesting from This implies that a stylesheet one for each harvesting type must be provided to convert from the internal setting structure to an XML structure suitable to clients The last
251. rdName gt lt gmd metadataStandardVersion gt lt gco CharacterString gt 1 5 experimental MCP BlueNet V1 5 experimental MCP BlueNet V1 5 lt gco CharacterString gt lt gmd metadataStandardVersion gt lt elements gt lt autodetect gt Some other points about elements autodetect e multiple elements can be specified eg as in the above both metadataStandardName and meta dataStandardVersion have been specified all must be match for the record to be recognized as belonging to this schema e multiple values for the elements can be specified eg as in the above a match for gmd metadataStandardVersion will be found for 1 5 experimental OR MCP BlueNet V1 5 experimental OR MCP BlueNet V1 5 the vertical line or pipe character I is used to separate the options here e if the elements have a namespace then the namespace s should be specified on the autodetect element or somewhere in the schema ident xml document before the element in which they are used eg in the above there are there namespace declarations on the autodetect element so as not to clutter the content 3 Root element root element of the document must match An example use case is the one used for the eml gbif schema Documents belonging to this schema always have root element of eml eml so the autodetect section for this schema is lt autodetect xmlns eml eml ecoinformatics org eml 2 1 1 gt lt elements type root gt lt eml em
252. red for the MCP update fixed info xsl was to automatically create an online resource with a URL pointing to the metadata show service with parameter set to the metadata uuid This required some changes to the update fixed info xsl supplied with iso19139 In particular e the parent elements may not be present in the metadata record e processing of the online resource elements for the metadata point of truth URL should not interfere with other processing of online resource elements Rather than describe the individual steps required to implement this and the decisions required in the XSLT language take a look at the update fixed info xs1 already present for the MCP schema in the iso19139 mcp directory and refer to the dot points above 7 3 Example ISO19115 19139 Marine Community Profile MCP 55 GeoNetwork Developer Manual Release 2 10 4 0 Creating the templates directory This is a simple directory Put XML metadata files to be used as templates in this directory Make sure they have a xml suffix Templates in this directory can be added to the catalog using the Administration menu Editor behaviour Adding schema suggestions xml and schema substitutes xml e schema suggestions xml The default behaviour of the GeoNetwork advanced editor when build ing the editor forms is to show elements that are not in the metadata record as unexpanded ele ments To add these elements to the record the user will have to click on the
253. refix gt lt stylesheet gt lt search gt lt searches gt lt privileges gt lt group id 1 gt lt operation name view gt lt group gt 10 3 Harvesting nodes 213 GeoNetwork Developer Manual Release 2 10 4 0 lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt Notes e this harvester does not use the content importXslt setting e this harvester does not use the content validate setting this will change 10 3 6 Harvesting node thredds This harvester type is capable of harvesting metadata from a THREDDS Thematic Real time Environ mental Data Directory Service The metadata fragments are e transformed into ISO19115 19139 or profile metadata fragments e copied or linked into an ISO19115 19139 or profile template The harvester supports metadata fragments following the Unidata Data Discovery Conventions http www unidata ucar edu software netcdf java formats DataDiscoveryAttConvention html from two types of THREDDS datasets e collections essentially datasets that contain other datasets like directories in a filesystem tree e atomics datasets that do not contain other datasets like files in a filesystem tree The settings fora THREDDS harvester type are e node string thredds site x url string THREDDS catalog server URL should al ways be the URL
254. register nl kadastralekaart ows L The widgets are prepared with some configuration options so you can select some of the visual aspects For example on the picture above you an select the number of tags on the cloud or the number of items shown on the latest section To add a widget you should wait for the page to be loaded This may be approached with the onReady function of ExtJS Ext onReady function new GeoNetwork TagCloudView catalogue catalogue query fast true amp summaryOnly true amp from 1 amp to 4 renderTo cloud tag onSuccess app loadResults p On this example we just have to set up four properties on the constructor the catalogue variable which 234 Chapter 11 User Interface GeoNetwork Developer Manual Release 2 10 4 0 makes all the query which will be sent to the server to provide the items to show the renderTo id of the div where the tag cloud will be drawn and the onSuccess function which will decorate and give style to the results of the tag cloud search You can find the whole API of widgets here Create a new widget You can create new widgets to add to your customized user interface Using the same example as before you can see that you can easily create new widgets You just have to take care of two things e Visualization define an html div where your widget will display information e Manipulation of information add some functi
255. rganization lt organization gt lt svnUuid gt c7799284 e786 4425 a6cf 824bb07e478e lt svnUuid gt lt siteld gt b7ce20f2 888a 4139 8802 916730c4be06 lt siteld gt lt site gt lt platform gt lt version gt 2 8 0 lt version gt lt subVersion gt RC2 lt subVersion gt lt platform gt Server lt host gt localhost lt host gt lt port gt 8080 lt port gt lt protocol gt http lt protocol gt lt server gt lt intranet gt lt network gt 127 0 0 1 lt network gt lt netmask gt 255 0 0 0 lt netmask gt lt intranet gt lt z3950 gt lt enable gt true lt enable gt lt port gt 2100 lt port gt lt z3950 gt lt proxy gt lt use gt false lt use gt lt host gt lt port gt lt username gt lt password gt lt proxy gt lt feedback gt lt email gt lt mailServer gt lt host gt lt port gt 25 lt port gt lt mailServer gt lt feedback gt lt removedMetadata gt lt dir gt WEB INF data removed lt dir gt lt removedMet adata gt lt ldap gt 9 17 System configuration 151 GeoNetwork Developer Manual Release 2 10 4 0 lt use gt false lt use gt lt host gt lt port gt lt defaultProfile gt RegisteredUser lt defaultProfile gt lt uidAttr gt uid lt uidAttr gt lt distinguishedNames gt lt base gt dc fao dc org lt base gt lt users gt ou people lt users gt lt distinguishedNames gt lt userAttribs gt lt name gt cn lt name gt lt profile gt profile
256. ring This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons x repositories repository 0 n Contains the Z3950 repository ids that will be harvested Z3950 repository ids in GeoNetwork can be obtained through the Site Information xml info service XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of Z3950 harvester settings in XML lt node id 1090 type z3950 gt lt site gt lt name gt testz3950 lt name gt lt uuid gt 8554ec2b 2b80 4 f 9e 9d9d 028e2407ee8 9 lt uuid gt lt account gt lt use gt true lt use gt lt username gt 10 3 Harvesting nodes 211 GeoNetwork Developer Manual Release 2 10 4 0 lt password gt lt account gt lt query gt attrset geo attr 1 1016 attr 4 6 attr 2 3 water lt query gt lt icon gt Z3950 gif lt icon gt lt repositories gt lt repository id act gt lt repository id geonetwork auscope gt lt repository id product gt lt repository id publication gt lt repository id source gt lt repository id geonetwork aims gt lt repositories gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt none lt import
257. rk etc http help github com Once you have the repository forked or cloned locally you can begin to work A clone contains all branches so you can list the branches with Chapter 1 Software development GeoNetwork Developer Manual Release 2 10 4 0 git branch a Just look at last section ignoring remotes origin To checkout a branch just git checkout 2 8 x Typically work is done on branches and merged back so when developing normally you will go change to the branch you want to work on create a branch from there work and then merge the changes back or make a Pull Request on Github There are many great guides See the links above but here is a quick sequence illustrating how to make a change and commit the change git checkout master master is the trunk and main development branch the checkout command checks out the requested branch git checkout b myfeature th b requests that the branch be created Ygit branch will list all the branches you have checked out locally at some poir Ygit branch a will list all branches in repository checked out or not work work work git status S what files have been modified or added git add lt new or modified files gt Add all files to be committed git add u will add all modified but not untract git commit Commit often it is VERY fast to commit NOTE doing a commit is a local operation It does not push the change to Github more w
258. rrespond to the tab definition using elementEP directly as in the when clause for the identification tab above or via a named template as in the metadata tab above For the MCP our template is similar to the one above for iso19139 except that the match would be on mcp MD_Metadata and the processing mode may differ see the section An alternative XSLT de sign for profiles below for more details e a brief template which must be called lt schema name gt Brief This template processes the meta data record and extracts from it a format neutral summary of the metadata for purposes such as displaying the search results Here is an example for the eml gbif schema because it is fairly short lt xsl template match eml gbifBrief gt lt xsl for each select metadata x 1 gt lt metadata gt lt title gt lt xsl value of select normalize space dataset title 1 gt lt title gt lt abstract gt lt xsl value of select dataset abstract gt lt abstract gt lt xsl for ach select dataset keywordSet keyword gt lt xsl copy of select gt lt xsl for each gt 7 3 Example ISO19115 19139 Marine Community Profile MCP 45 GeoNetwork Developer Manual Release 2 10 4 0 lt geoBox gt lt westBL gt lt xsl value of select dataset coverage geographicCoverage boundingCoord lt eastBL gt lt xsl value of select dataset coverage geographicCoverage boundingCoord
259. rs are changed the new harvesting type must use them during the next harvesting without requiring server restart 22 Chapter 3 Harvesting CHAPTER 4 Schema Plugins 23 GeoNetwork Developer Manual Release 2 10 4 0 24 Chapter 4 Schema Plugins CHAPTER 5 Metadata schemas and profiles A metadata schema describes 1 the names descriptions and any value codelists of the elements in the metadata schema how the elements of the metadata schema are laid out in a metadata document structure constraints on elements and content in a metadata document 2 3 4 5 6 documentation on how the elements of the metadata schema should be used sample metadata documents scripts to convert metadata documents to and from other metadata schemas A metadata schema is usually an implementation of a metadata standard A metadata profile is an adaptation of a metadata schema to suit the needs of a particular community A metadata profile contains all the components of a metadata schema but may extend restrict or redefine these components 25 GeoNetwork Developer Manual Release 2 10 4 0 26 Chapter 5 Metadata schemas and profiles CHAPTER 6 Implementing a metadata schema or profile There are many ways in which a metadata schema or profile can be implemented This section will describe the way in which metadata schemas are implemented on https github com metadata schemas E
260. rship and privileges of metadata owned of user John id 2 in group RWS id 5 to user Samantha id 7 in group NLR id 6 Transfer ownership request example Url http localhost 8080 geonetwork srv eng xml ownership transfer Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt sourceUser gt 2 lt sourceUser gt lt sourceGroup gt 5 lt sourceGroup gt lt targetUser gt 7 lt targetUser gt lt targetGroup gt 6 lt targetGroup gt lt request gt Response The response contains the following fields e response This is the container for the response privileges Number of privileges transferred from source group to target group metadata Number of metadata records transferred from source user to target user Transfer ownership response example lt xml version 1 0 encoding UTF 8 gt lt response gt lt privileges gt 4 lt privileges gt lt metadata gt 2 lt metadata gt lt response gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or his profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter XXXX when a mandatory parameter is empty or invalid Returns 500 HTTP code 9 10 Metadata Ownership services 117 Ge
261. s lt error id bad parameter gt lt message gt type lt message gt lt class gt BadParameterEx lt class gt lt error gt See Exception handling for more details 9 20 4 Update a Harvester Instance xml harvesting update This service can be used to change the parameters of a harvester instance Note You cannot change the harvester type Request The simplest way to use this service is to 1 use the xml harvesting get service to obtain the XML definition of the harvester that you want to update 2 modify the parameters as required 3 call this service with the modified XML definition of the harvester as the request The XML request is the same as that used in xml harvesting add Response If the update succeeded then HTTP status code 200 is returned along with an XML document containing the harvester definition as supplied in the request If an error occurred then HTTP status code 500 is returned along with an XML document which contains details of what went wrong An example of such an error response is 174 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt error id object not found gt lt message gt Object not found lt message gt lt class gt ObjectNotFoundEx lt class gt lt error gt See Exception handling for more details 9 20 5 Control or Remove a Harvester Instance xml harvesting remove xml harvesting start xml harvesting stop
262. s with profile Administrator can delete any user except themselves while users with profile UserAdmin can delete users only in the groups where they belong except themselves Requires authentification Yes Request Parameters e id mandatory Identifier of user to delete User remove request example Url http localhost 8080 geonetwork srv eng xml user remove ime type application xml Post request lt request gt lt id gt 2 lt id gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id error gt lt message gt You cannot delete yourself from the user database lt message gt lt class gt IllegalArgumentException lt class gt lt stack gt lt stack gt lt error gt See Exception handling for more details 86 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Errors Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code Missing parameter error id missing parameter when the id parameter is not provided Re turns 500 HTTP code You cannot delete yourself from the
263. se example lt xml version 1 0 encoding UTF 8 gt lt response from 1 lt summary count 7 lt keywords gt lt keyword lt keyword lt keyword lt keyword lt keyword lt keyword lt keyword lt keyword lt keyword lt keyword lt keywords gt lt summary gt coun coun coun coun count count count count count count oN o o EN GEGE FF GE AGP GE Fr Gr CA to 7 gt type local gt name Global gt name World gt name watersheds gt name Biology gt name water resources gt name endangered plant species gt name Africa gt name Eurasia gt name endangered animal species gt name Antarctic ecosystem gt lt metadata xmlns gmx http www isotc211 org 2005 gmx gt lt geonet info xmlns geonet http www fao org geonetwork gt lt id gt 12 lt id gt lt uuid gt bce179f91 11c1 4878 b9b4 2270abde98eb lt uuid gt lt schema gt isol9139 lt schema gt lt createDate gt 2007 07 25T12 05 45 lt createDate gt lt changeDate gt 2007 11 06T12 10 47 lt changeDate gt lt source gt 881a1630 d4e7 4c9c aa01 7a9bbbbc47b2 lt source gt 94 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 lt category gt maps lt category gt lt category gt interactiveResources lt category gt lt score gt 1 0 lt score gt lt geonet info gt lt metadata gt lt metadata xmlns gmx h
264. ser password depending on the value of the operation parameter Only users with profiles Administrator or UserAdmin can reset users password Users with profile Administrator can reset the password for any user while users with profile UserAd min can reset the password for users only in the groups where they belong Requires authentication Yes Request Parameters operation mandatory resetpw id mandatory Identifier of the user to reset the password username mandatory User login name password mandatory User new password profile mandatory User profile Reset user password request example Uri http localhost 8080 geonetwork srv eng xml user update Mime type 82 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt operation gt resetpw lt operation gt lt id gt 2 lt id gt lt username gt editor lt username gt lt password gt newpassword lt password gt lt profile gt Editor lt profile gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id missing parameter gt lt message
265. settings in XML lt node id 978 type geoPREST gt lt site gt lt name gt qldtest lt name gt lt uuid gt 4b9de966 1d5f 4133 97da f4232fb7761la lt uuid gt lt account gt lt use gt true lt use gt lt username gt lt password gt lt account gt lt baseUrl gt http qspatial information qld gov au geoportal lt baseUr1 gt lt icon gt default gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt true lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt searches gt lt search gt lt freeText gt Barrier Reef lt freeText gt lt search gt lt search gt lt freeText gt Cadastral lt freeText gt lt search gt lt searches gt lt privileges gt lt group id 1 gt lt operation name view gt lt operation name dynamic gt lt operation name featured gt lt group gt lt privileges gt 224 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt result gt lt total gt 119 lt total gt lt added gt 87 lt added gt lt updated gt 32 lt updated gt lt unchanged gt 0 lt unchanged gt lt unknownSchema gt 0 lt unknownSchema
266. sing the encoding specified into the prologue of the XML document Using this form any type of request can be made structured or not so any service can be called 3 SOAP The content type is application soap xml SOAP is a simple protocol used to access objects and services using XML Clients that use this protocol can embed XML requests into a SOAP structure On the server side GeoNetwork will remove the SOAP structure and feed the content to the service Its response will be embedded again into a SOAP structure and sent back to the caller It makes sense to use this protocol if it is the only protocol understood by the client Response The response of an XML service always has a content type of application xml the only exception are those services which return binary data The document encoding is the one specified in the document prologue which is UTF 8 all GeoNetwork services return documents in the UTF 8 encoding On a GET request the client can force a SOAP response by adding the application soap xml content type to the Accept header parameter 9 1 2 Exception handling A response document having an error root element means that the XML service raised an exception This can happen under several conditions bad parameters internal errors et cetera In this cases the returned XML document has the following structure e error This is the root element of the document It has a mandatory id attribute that represents the identifier o
267. st lt request gt lt site gt lt url gt lt url gt lt type gt lt type gt lt account gt lt username gt lt username gt lt password gt lt password gt lt account gt lt site gt lt params gt lt params gt lt request gt Where e site A container for site information where the request will be forwarded e url Refers to the remote URL to connect to Usually it points to a GeoNetwork XML service but it can point to any XML service e type If set to GeoNetwork then use GeoNetwork authentication schema Any other value or if the element is missing refers to a generic node e account This element is optional If present the provided credentials will be used to authenticate to the remote site e params Container for the request parameters Request for info from a remote server lt request gt lt site gt lt url gt http mynode org 8080 geonetwork srv eng xml info lt url gt lt site gt lt params gt lt request gt lt type gt site lt type gt lt request gt lt params gt lt request gt Note This service uses the proxy configuration See System Configuration section of the user manual Response Response from the remote service 162 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 9 19 File download services This section provides a detailed explanation of GeoNetwork file download services These are the ser vices you woul
268. st fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is shown below lt error id service not allowed gt lt message gt Service not allowed lt message gt lt class gt ServiceNotAllowedEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code 9 10 2 Transfer ownership xml ownership transfer The xml ownership transfer service can be used to transfer ownership and privileges of metadata from one user to another This service should be used with data retrieved from previous invocations to the services xml ownership editors and xml ownership groups as described below Requires authentication Yes Request Parameters e sourceUser mandatory Identifier of the user whose metadata will be transferred to a new owner e sourceGroup mandatory Identifier of one of the user groups of sourceUser e targetUser mandatory Identifier of the user who will become the new owner of the metadata currently owned by sourceUser 116 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e targetGroup mandatory Identifier of one of the user groups of the targetUser Example In the next example we are going to transfer the owne
269. st gt lt id gt 2 lt id gt lt request gt Response If the request executed succesfully then an HTTP 200 status code is returned and an XML document containing the group information is returned An example response is lt response gt lt record gt lt id gt 1 lt id gt lt name gt all lt name gt lt description gt lt email gt lt referrer gt lt label gt lt ara gt All lt ara gt lt cat gt All lt cat gt lt chi gt All lt chi gt lt dut gt Iedereen lt dut gt lt eng gt All lt eng gt lt label gt 9 3 Group services 73 GeoNetwork Developer Manual Release 2 10 4 0 lt record gt lt response gt If the request fails then an HTTP 500 status code error is returned and the response contains an XML document with the details of the exception what went wrong An example error response is lt error id missing parameter gt lt message gt id lt message gt lt class gt MissingParameterEx lt class gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter id when id parameter is empty invalid Returns 500 HTTP code Remove a group xml group remove
270. sted metadata fragments from atom datasets in the THREDDS catalog atomicGeneration fragments default Use fragments default refers to DIF metadata extraction which will be deprecated outputSchemaOnAtomicFragments string Metadata schema of ISO records that will be created from THREDDS catalog atomic metadata A list of possible values for this parameter can be obtained from the xml harvesting info service see threddsFragmentSchemas atomicMetadataTemplate integer Template record that harvested frag ments will copied or linked into to create metadata records Use http your_geonetwork geonetwork srv eng xml info type templates to get a list of template metadata record ids that can be used for this setting createAtomicSubtemplates boolean If true then subtemplates are created from the metadata fragments harvested from the THREDDS catalog atoms The subtemplates are stored in the GeoNetwork database and linked into the atomicMetadataTemplate template record to create the harvested metadata records If false then subtemplates are not created instead the harvested fragments are copied into the atomicMetadataTem plate record to create normal metadata records 10 3 Harvesting nodes 215 GeoNetwork Developer Manual Release 2 10 4 0 x atomicFragmentStylesheet string Stylesheet that turns atom metadata fragments in the THREDDS catalog into ISO metadata fragments A list of possible values for this param
271. t lt data gt lt CDATA lt gmd MD_Metadata xmlns gmd http www isotc211 org 2005 gmd xmlns xsi http www w3 org 2001 XMLSchema instance lt gmd DQ_DataQuality gt lt gmd dataQualityInfo gt lt gmd MD_Metadata gt gt lt data gt lt request gt Response If request is executed successfully HTTP 200 status code is returned and an XML document with details of the successful request Example success response lt response gt lt id gt 32 lt id gt lt showvalidationerrors gt false lt showvalidationerrors gt lt minor gt false lt minor gt lt response gt If request fails an HTTP status code 500 server error is returned and the response is an XML document with the exception Example error response lt error id bad parameter gt lt message gt id lt message gt lt class gt BadParameterEx lt class gt lt stack gt lt stack gt lt request gt lt request gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or his profile has no rights to execute the service Returns 500 HTTP code 106 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code e bad parameter XXXX when a mandatory parameter is empty or when the update id doesn t
272. t icon gt lt icon gt filesystem gif lt icon gt lt icon gt fao gif lt icon gt 9 20 Harvesting services 169 GeoNetwork Developer Manual Release 2 10 4 0 lt icon gt default gif lt icon gt lt icon gt Z3950 gif lt icon gt lt icon gt oai mhp gif lt icon gt lt icon gt esri gif lt icon gt lt icons gt lt root gt importStylesheets Return the list of stylesheets that can be used when creating a harvester instance The id element in the response can be used in the content importxslt harvester setting for those harvesters that support it POST Request Example lt request gt lt type gt icons lt type gt lt request gt URL http localhost 8080 geonetwork srv eng xml harvesting info Response Example lt root gt lt stylesheets gt lt record gt lt id gt ArcCatalog8_to_IS019115 xsl lt id gt lt name gt ArcCatalog8_to_1IS019115 lt name gt lt record gt lt record gt lt id gt CDMCoords to IS019139Keywords xsl lt id gt lt name gt CDMCoords to 1IS019139Keywords lt name gt lt record gt lt stylesheets gt lt root gt oaiPmhServer Request information about the sets and prefixes of an OAIPMH server This request requires an addi tional url attribute on the type parameter specifying the name of the OAIPMH server to query POST Request Example lt request gt lt type url http localhost 8080 geonetwork srv eng oaipmh gt oaiPmhServer lt type gt lt request gt U
273. t xml version 1 0 encoding UTF 8 gt lt env Envelope xmlns env http www w3 org 2003 05 soap envelope gt lt env Body gt lt csw DescribeRecord xmlns csw http www opengis net cat csw 2 0 2 service CSW lt env Body gt lt env Envelope gt GetRecordByld GetRecordByld request retrieves the default representation of catalogue metadata records using their identifier To retrieve non public metadata a previous xml user login service invocation is required See login service Request examples GET request http localhost 8080 geonetwork srv eng csw request GetRecordByld amp service CSW version z POST request Url http localhost 8080 geonetwork srv eng csw Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw GetRecordById xmlns csw http www opengis net cat csw 2 0 2 service CSW vers lt csw Id gt 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt csw Id gt lt csw ElementSetName gt full lt csw ElementSetName gt lt esw GetRecordById gt SOAP request Url http localhost 8080 geonetwork srv eng csw Content type application soap xml Post data lt xml version 1 0 encoding UTF 8 gt lt env Envelope xmlns env http www w3 org 2003 05 soap envelope gt lt env Body gt 9 23 CSW service 189 GeoNetwork Developer Manual Release 2 10 4 0 lt esw GetRecordById xmlns csw http www opengis net cat cs
274. t 2 lt groups gt lt groups gt 4 lt groups gt lt request gt Response If the request executed successfully then HTTP 200 status code is returned with an XML document containing an empty response element If the request fails then an HTTP 500 status code error is returned with an XML document describing the exception what went wrong An example of such a response is lt error id error gt lt message gt User with username samantha already exists lt message gt lt class gt IllegalArgumentException lt class gt lt stack gt lt stack gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Missing parameter error id missing parameter when mandatory parameters are not pro vided Returns 500 HTTP code 9 4 User services 79 GeoNetwork Developer Manual Release 2 10 4 0 bad parameter when a mandatory fields is empty Returns 500 HTTP code User with username XXXX already exists error id error when a user with that username is already present Returns 500 HTTP code Unknown profile XXXX error id error when the profile is not valid Returns 500 HTTP code ERROR duplicate key violates unique constraint users username key when trying to create a new user using an existing username Returns 500 HTTP code
275. t class gt MetadataNotFoundEx lt class gt lt object gt Metadata not found gt 6 lt object gt 9 12 Metadata Category services 127 GeoNetwork Developer Manual Release 2 10 4 0 lt request gt lt language gt eng lt language gt lt service gt xml metadata category lt service gt lt request gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code Metadata not found error id metadata not found if a metadata record with the identifier provided does not exist Returns 500 HTTP code 9 12 2 Batch update categories xml metadata batch update categories The xml metadata batch update categories service updates the categories of a selected set of metadata using the categories sent as parameters Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select the metadata records to update Note Only those metadata records for which the user running the service has ownership rights on will be updated and all categories previously assigned will be deleted If metadata versioning is on then category changes will be recorded in the version history Requires authentication Yes 9 12 3 Request Parameters e _C can be multiple elements
276. t clients 9 18 1 Site Information xml info This service can be used to retrieve information about a GeoNetwork site The information that can be requested includes site name and id users groups metadata schemas as well as lists of privileges metadata status values spatial regions local metadata categories and so on 154 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Request The XML request should contain at least one type parameter to indicate the kind of information to retrieve Multiple type parameters can be specified The set of allowed values is e site Returns general information about the site like its name id etc e users Depending upon the profile of the user making the call information about users of the site will be returned The rules are e Administrators can see all users e User administrators can see all users they administer and all other user administrators in the same group set The group set is defined by all groups visible to the user administrator except for the All and Intranet groups e An authenticated user can only see their own information e A guest cannot see any user information at all e groups Returns all user groups visible to the requesting user Note If the user is not authenti cated only the Intranet and A11 groups will be returned e sources Returns all GeoNetwork sources remote sites that are known about at the site This will include e
277. t gt Request to search using dates and keywords example Urls http localhost 8080 geonetwork srv eng xml search ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt title gt africa lt title gt lt themekey gt Global or World lt themekey gt 9 6 Search and Retrieve Metadata services 93 GeoNetwork Developer Manual Release 2 10 4 0 lt dateFrom gt 2000 02 03T12 47 00 lt dateFrom gt lt dateTo gt 2010 02 03T12 49 00 lt dateTo gt lt request gt Response The response is the metadata record with additional geonet info section The main fields are e response Response container summary Attribute count indicates the number of metadata records retrieved x keywords List of keywords that are part of the metadata resultset Each keyword contains the value and the number of occurences in the retrieved metadata records metadata Container for each metadata record found Each container has a geonet info element with the following information x id Metadata internal identifier uuid Metadata Universally Unique Identifier UUID x schema Metadata schema x createDate Metadata creation date x changeDate Metadata last modification date source Source catalogue the metadata x category Metadata category Can be multiple elements score Value indicating the accuracy of search Metadata search respon
278. t importXslt setting 10 3 3 Harvesting node csw This harvester type is capable of querying an OGC Catalogue Services for the Web CSW server and harvesting metadata e node string csw site 10 3 Harvesting nodes 209 GeoNetwork Developer Manual Release 2 10 4 0 x capabUrl string URL of the GetCapabilities statement This will be used to retrieve the operations and server address icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons search 0 n Contains search parameters If this element is missing an unconstrained search will be performed x freeText string x title string x abstract string x subject string minscale integer minimum scale denominator x maxscale integer maximum scale denominator XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of CSW harvester settings in XML lt node id 1122 type csw gt lt site gt lt name gt blonks lt name gt lt uuid gt 723953dc 1308 4905 abc0 9869f18af132 lt uuid gt lt account gt lt use gt true lt use gt lt username gt frogmouth lt username gt lt password gt tawny lt password gt lt account gt lt capabil
279. t xsl copy gt lt xsl apply templates select x node gt lt xsl copy gt lt xsl template gt e Put the process XSLT into the process directory of the relevant metadata schema plugin eg if your process XSLT applies to isol9139 metadata records then it should be in the process directory of the isol9139 schema GEONETWORK DATA DIR config schema plugins isol9139 process 9 14 2 Process a metadata record with an XSLT xml metadata processing This service applies an XSLT to a metadata record specified by id or uuid Request Parameters e id or uuid Identifier of metadata to process e save Set to 1 to save the processed metadata default 0 will not save the processed metadata and will return the processed metadata for inspection e process Name of an XSLT in the process directory of a metadata schema in GeoNetwork For example anonymizer xsl exists in the process directory of metadata schema iso19139 to use this XSLT you would specific anonymizer as the process parameter value e Parameters of the process XSLT in order Each parameter of the process XSLT needs to be speci fied with a value if no default exists in the process XSLT or with no value if the default is suitable You will need to examine the process XSLT to determine which parameters to specify and what the default values are if any Example request for the anonymizer process XSLT POST Url http localhost 8080 geonetwork sr
280. tSchema string Metadata schema of ISO records that will be created from OGCWxS GetCapabilities harvester A list of possible values for this parameter can be obtained from the xml harvesting info service see ogcwxsOutputSchemas 222 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 XML Example Harvester settings in XML are used by the harvester services see Harvesting services Example of OGCWxS GetCapabilities harvester settings in XML lt node id 1138 type ogcewxs gt lt site gt lt name gt test ogcwxs lt name gt lt uuid gt 87852766 536a 40b7 875a 3ab5f 24fa78 lt uuid gt lt account gt lt use gt false lt use gt lt username gt lt password gt lt account gt lt url gt http localhost 6060 deegree2 services lt url gt lt ogctype gt WFS1 1 0 lt ogctype gt lt icon gt default gif lt icon gt lt site gt lt content gt lt validate gt false lt validate gt lt importxslt gt none lt importxslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt true lt oneRunOnly gt lt status gt inactive lt status gt lt lang gt eng lt lang gt lt topic gt elevation lt topic gt lt createThumbnails gt true lt createThumbnails gt lt useLayer gt true lt useLayer gt lt useLayerMd gt t rue lt useLayerMd gt lt datasetCategory gt 2 lt datasetCategory gt lt outputSchema gt isol9139 lt outputSchema gt lt options gt
281. ta lt xml version 1 0 encoding UTF 8 gt lt csw Harvest xmlns csw http www opengis net cat csw 2 0 2 xmlns gmd http www is lt csw Source gt http URL to the target CSW server request GetCapabilities amp amp se lt csw ResourceType gt http www isotc211 org schemas 2005 gmd lt csw ResourceType gt lt csw Harvest gt GET request Url http localhost 8080 geonetwork srv eng csw publication request Harvest amp service CSW Response lt xml version 1 0 encoding UTF 8 gt lt csw HarvestResponse xmlns csw http www opengis net cat csw 2 0 2 gt 9 23 CSW service 191 GeoNetwork Developer Manual Release 2 10 4 0 lt csw TransactionResponse gt lt csw TransactionSummary gt lt csw totaliInserted gt 22 lt csw totaliInserted gt lt csw totalUpdated gt 0 lt csw totalUpdated gt lt csw totalDeleted gt 0 lt csw totalDeleted gt lt csw TransactionSummary gt lt csw TransactionResponse gt lt csw HarvestResponse gt Aynchronous one run Harvest example POST request Uri http localhost 8080 geonetwork srv eng csw publication Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw Harvest xmlns csw http www opengis net cat csw 2 0 2 xm Ins gmd http www is lt csw Source gt http URL to the target CSW server request GetCapabilities amp amp se lt csw ResourceType gt http www isotc211 org schemas 2005
282. ta record extract gml xsl Mandatory Extract the spatial extent from the metadata record as a GML Ge ometryCollection element extract thumbnails xsl Optional Extract the browse graphic thumbnail from the metadata record extract uuid xsl Mandatory Extract the UUID of the metadata record index fields xsl Mandatory Index the metadata record content in Lucene Creates the Lucene document used by GeoNetwork to index the metadata record content set thumbnail xsl Optional Set the browse graphic thumbnail in the metadata record set uuid xsl Optional Set the UUID of the metadata record suggest xsl Optional XSLT run by metadata suggestions service The XSLT contains processes that can be registered and run on different elements of a metadata record eg expand keyword field with comma separated content into multiple keyword fields See http trac osgeo org geonetwork wiki proposals MetadataEditorSuggestion for more info unset thumbnail xsl Optional Remove the browse graphic thumbnail from the metadata record update child from parent info xsl Optional XSLT to specify which elements in a child record are updated from a parent record Used to manage hierarchical relationships between metadata records update fixed info xsl Optional XSLT to update fixed content in metadata records The following configuration files can be present oasis catalog xml Optional An oasis catalog describing any mappings
283. tadata batch delete Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt GET 108 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng xml metadata batch delete Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully deleted e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the request fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is shown below lt error id service not allowed gt Service not allowed lt object gt xml metadata batch delete lt object gt lt error gt See Exception handling for more details Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the ser
284. template of the schema profile 3 The main template can initially process the element in a mode particular to the profile and if this is not successful ie no template matches and thus no HTML elements are returned process the element in the mode of the base schema The advantage of this design is that overriding a template for an element in the base schema does not need the priority attribute or an XPath condition check on the schema name Here is an example for the MCP iso19139 mep with base schema iso19139 e the main template which must be called metadata iso19139 mep xsl lt main templat the way into processing iso19139 mcp gt lt xsl template name metadata isol9139 mcp gt lt xsl param name schema gt 48 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 lt xsl param name edit select false gt lt xsl param name embedded gt lt process in profile mode first gt lt xsl variable name mcpElements gt lt xsl apply templates mode iso19139 mcp select gt lt xsl with param name schema select Sschema gt lt xsl with param name edit select Sedit gt lt xsl with param name embedded select Sembedded gt lt xsl apply templates gt lt xsl variable gt lt xsl choose gt lt if we got a match in profile mode then show it gt lt xsl when test count mcpElements x gt 0 gt lt xsl copy of select Sm
285. tent type application xml Post data lt xml version 1 0 encoding UIF 8 gt lt csw Transaction xmlns csw http www opengis net cat csw 2 0 2 version 2 0 2 servic lt csw Insert gt lt gmd MD_Metadata xmlns gmd http www isotc211 org 2005 gmd xmlns xsi http www lt gmd MD_Metadata gt lt csw Insert gt lt csw Transaction gt Response lt xml version 1 0 encoding UTF 8 gt lt csw TransactionResponse xmlns csw http www opengis net cat csw 2 0 2 gt lt csw TransactionSummary gt lt csw totaliInserted gt 1 lt csw totalInserted gt lt csw totalUpdated gt 0 lt csw totalUpdated gt lt csw totalDeleted gt 0 lt csw totalDeleted gt lt csw TransactionSummary gt lt csw TransactionResponse gt Update operation example POST request Url http localhost 8080 geonetwork srv eng csw publication Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw Transaction xmlns csw http www opengis net cat csw 2 0 2 version 2 0 2 servic lt csw Update gt lt gmd MD_Metadata xmlns gmd http www isotc211 org 2005 gmd xmlns xsi http www lt gmd MD_Metadata gt lt csw Constraint version 1 1 0 gt lt oge Filter gt lt ogc PropertyIsEqualTo gt lt oge PropertyName gt title lt ogc PropertyName gt lt ogce Literal gt Eurasia lt ogc Literal gt lt oge PropertyIsEqualTo gt lt oge Filter gt lt csw Constraint gt 9 2
286. ter id when id parameter is empty invalid Returns 500 HTTP code 9 4 User services 9 4 1 User Retrieval Services List of Users xml info type users The xml info service can be used to retrieve the users defined in GeoNetwork See Site Information xml info User groups list xml usergroups list The xml usergroups list service can be used to retrieve the list of groups that a user belongs to Requires authentication Yes Request Parameters e id User identifier multiple id elements can be specified 9 4 User services 75 GeoNetwork Developer Manual Release 2 10 4 0 User groups list request example Url http localhost 8080 geonetwork srv eng xml usergroups list Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 3 lt id gt lt request gt Response If the request executes successfully then HTTP status code 200 is returned with an XML document containing the groups that the user belongs to The elements in the response are e group This is the container for each user group element returned e id Group identifier e name Group name e description Group description User groups list response example lt groups gt lt group gt lt id gt 3 lt id gt lt name gt RWS lt name gt lt description gt lt group gt lt groups gt If the request fails then an HTTP 500 status code error is returned and the response contains
287. that should be used for this schema eg mapping URLs to local copies such as schemaLocations eg http www isotc21 l org 2005 gmd gmd xsd is mapped to schema gmd gmd xsd Path names used in the oasis catalog are relative to the location of this file which is the schema di rectory schema xsd Optional XML schema directory file that includes the XSDs used by this metadata schema If the schema uses a DTD then this file should not be present Metadata records from 30 Chapter 7 Schema Plugins GeoNetwork Developer Manual Release 2 10 4 0 schemas that use DTDs cannot be edited in GeoNetwork schema conversions xml Optional XML file that describes the converters that can be applied to records belonging to this schema This information is used to show these conversions as options for the user to choose when a metadata record belonging to this schema is shown in the search results e schema ident xml Mandatory XML file that contains the schema name identifier version number and details on how to recognise metadata records that belong to this schema This file has an XML schema definition in INSTALL DIR web geonetwork xml validation schemaPlugins schema ident xsd which is used to validate it when the schema is loaded schema substitutes xml Optional XML file that redefines the set of elements that can be used as substitutes for a specific element schema suggestions xml Optional XML file that tells the editor whic
288. the bounding box label The localised labels used to show the region in the user interface See Localised entities Example response for regions lt regions gt lt region id 303 gt lt north gt 82 99 lt north gt lt south gt 26 92 lt south gt lt west gt 37 32 lt west gt lt east gt 39 24 lt east gt lt label gt lt eng gt Western Europe lt eng gt lt label gt lt region gt lt regions gt Status e statusvalues This is the container for the metadata status value information status 0 n A metadata status value This element has an id attribute which represents the local identifier of the status value x name The status value name reserved Can be y or n and is used to distinguish between system reserved and user defined status values x label The localised labels used to show the status value in the user interface See Localised entities 160 Chapter 9 XML Services GeoNetwork Developer Manual Release 2 10 4 0 Example response for status lt statusvalues gt lt status id 0 gt lt name gt unknown lt name gt lt reserved gt y lt reserved gt lt label gt lt eng gt Unknown lt eng gt lt label gt lt status gt lt statusvalues gt z3950repositories e z3950repositories This is the container for the Z3950 repositories that have been configured for this site repository 0 n A Z3950 Repository container id The repository id This
289. the following children 1 general a container for general information It must have the following children e uuid this is the universally unique identifier assigned to the metadata and must be a valid UUID This element is optional and when omitted the reader should generate one A meta data without a UUID can be imported several times into the same system without breaking uniqueness constraints When missing the reader should also generate the siteld value createDate This date indicates when the metadata was created changeDate This date keeps track of the most recent change to the metadata siteld This is an UUID that identifies the actor that created the metadata and must be a valid UUID When the UUID element is missing this element should be missing too If present it will be ignored siteName This is a human readable name for the actor that created the metadata It must be present only if the siteld is present schema The name of the schema for the metadata record in metadata xml When the MEF is imported by a GeoNetwork actor this name should be the name of a metadata schema handled by the actor eg iso19139 If the GeoNetwork actor does not have such a schema it may try and select another metadata with a schema that is present eg the metadata in metadata isol9139 xml could be loaded because the iso19139 schema is present e format Indicates the MEF export format The element s value must belong to the following
290. to identify view and validate MCP metadata records Now we will add the remaining components necessary to create and edit MCP metadata records We ll start with the XSLTs that set the content of various elements in the MCP metadata records Creating set uuid xsl e set uuid xsl this XSLT takes as a parameter the UUID of the metadata record and writes it into the appropriate element of the metadata record For the MCP this element is the same as the base ISO schema called iso19139 in GeoNetwork namely gmd fileldentifier However because the MCP uses a different namespace on the root element this XSLT needs to be modified Creating the extract set and unset thumbnail XSLTs If your metadata record can have a thumbnail or browse graphic link then you will want to add XSLTs that extract set and unset this information so that you can use the GeoNetwork thumbnail editing inter face The three XSLTs that support this interface are e extract thumbnails xsl this XSLT extracts the thumbnails browse graphics from the metadata record turning it into generic XML that is the same for all metadata schemas The elements need to have content that GeoNetwork understands The following is an example of what the thumbnail interface for iso19139 expects we ll duplicate this requirement for MCP 7 3 Example ISO19115 19139 Marine Community Profile MCP 53 GeoNetwork Developer Manual Release 2 10 4 0 lt gmd graphicOverview gt
291. ts A list of possible values for this parameter can be obtained from the xml harvesting info service see wfsFragmentStylesheets 10 3 Harvesting nodes 217 GeoNetwork Developer Manual Release 2 10 4 0 XML Example streamFeatures boolean If true then responses will be saved to disk and features will be extracted using the streaming XML parser Use for large WES GetFeatures responses createSubtemplates boolean If true then subtemplates are created from the metadata fragments harvested from the WES GetFeatures response The subtemplates are stored in the GeoNetwork database and linked into the templateId template record to create the harvested metadata records If false then subtemplates are not created instead the harvested fragments are copied into the templateld record to create normal metadata records templateld integer Template record that harvested fragments will copied or linked into to create metadata records Use http your_geonetwork geonetwork srv eng xml info type templates to get a list of template metadata record ids that can be used for this setting recordsCategory integer Category id of GeoNetwork category that will be assigned to the metadata records created by the harvester Use http your_geonetwork geonetwork srv eng xml info type categories to get a list of category ids that can be used for this setting Harvester settings in XML are used by the harvester services see Harvesting services
292. ttp www isotc211 org 2005 gmx gt lt geonet info xmlns geonet http www fao org geonetwork gt lt id gt 11 lt id gt lt uuid gt 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt uuid gt lt schema gt isol9139 lt schema gt lt createDate gt 2007 07 19T14 45 07 lt createDate gt lt changeDate gt 2007 11 06T12 13 00 lt changeDate gt lt source gt 881a1630 d4e7 4c9c aa01 7a9bbbbc47b2 lt source gt lt category gt maps lt category gt lt category gt datasets lt category gt lt category gt interactiveResources lt category gt lt score gt 0 9178859 lt score gt lt geonet info gt lt metadata gt lt response gt 9 6 2 Get metadata xml metadata get The xml metadata get service can be used to retrieve a metadata record stored in GeoNetwork Requires authentication Optional Request One of the following parameters e uuid Metadata Universal Unique Identifier UUID e id Metadata internal identifier Get metadata request example Urls http localhost 8080 geonetwork srv eng xml metadata get Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt uuid gt aa9bc613 8eef 4859 a9eb 4df35d8b21e4 lt uuid gt lt request gt Response Successful response HTTP status code 200 is the XML metadata record with additional geonet info section The principal fields for geonet info are e schema Metadata schema 9 6 Search and Retrieve
293. uild select list drop down menus when editing and to display a full description when viewing See templates near the template named isol19139Codelist These templates can handle the extended codelists for any profile because they e match on any element that has a child element with attribute codeList e use the schema name in the codelists XPath e fall back to the base iso19139 schema if the profile codelist doesn t have the required codelist However if you don t need localized codelists it is often easier and more direct to extract codelists directly from the gnxCodelists xml file This is in fact the solution that has been adopted for the MCP The gmxCodelists xml file is included in the presentation xslt for the MCP using a statement like lt xsl variable name codelistsmcp select document schema resources Codelist gmxCodelists xml gt Check the codelist handling templates in met adata isol9139 mcp xs1 to see how this works An alternative XSLT design for profiles In all powerful languages there will be more than one way to achieve a particular goal This alterna tive XSLT design is for processing profiles The idea behind the alternative is based on the following observations about the GeoNetwork XSLTs 1 All elements are initially processed by apply templates in mode elementEP 2 The template elementEP see INSTALL DIR web geonetwork xsl metadata xsl eventually calls the main
294. up and Operation Identifiers can be obtained using Site Information xml info service Request example POST 9 9 Metadata Privilege services 111 GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng xml metadata privileges ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt 12 gt lt 11 gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata privileges id 66 1 24 1 1 Response If the request executed successfully then the XML response contains the identifier of the metadata whose privileges have been updated Example lt response gt lt id gt 6 lt id gt lt response gt If the request was unsuccessful then the XML response contains details of the error returned An example of such a response is lt error id metadata not found gt lt message gt Metadata not found lt message gt lt class gt MetadataNotFoundEx lt class gt lt object gt 6 lt object gt lt request gt lt language gt eng lt language gt lt service gt xml metadata privileges lt service gt lt request gt lt error gt See Exception handling for more details Errors Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Metadata not found
295. uthentication Yes Request Parameters e save Set to 1 to save the processed metadata default 0 will not save the processed metadata e process Name of an XSLT in the process directory of a metadata schema in GeoNetwork For example the anonymizer XSLT exists in the process directory of metadata schema iso19139 to use this XSLT you would specific anonymizer as the process parameter value e Parameters of the process XSLT in order Each parameter of the process XSLT needs to be speci fied with a value if no default exists in the process XSLT or with no value if the default is suitable You will need to examine the process XSLT to determine which parameters to specify and what the default values are if any Example request for the anonymizer process XSLT POST Daele http localhost 8080 geonetwork srv eng xml metadata batch processing Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt save gt 0 lt save gt lt process gt anonymizer lt process gt lt email gt john p bead bonce com lt email gt lt request gt GET 9 14 Metadata Processing services 135 GeoNetwork Developer Manual Release 2 10 4 0 Url http localhost 8080 geonetwork srv eng xml metadata batch processing amp save 0 amp process e Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the met
296. v eng xml metadata processing Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt id gt 6 lt id gt lt save gt 0 lt save gt 9 14 Metadata Processing services 133 GeoNetwork Developer Manual Release 2 10 4 0 lt process gt anonymizer lt process gt lt email gt john p bead bonce com lt email gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata processing amp id 6 amp save 0 amp process ar Response If the processing specified in the request succeeded and the parameter save was set to 1 or left out then the XML response contains the id of the metadata record that was processed For example lt response gt lt id gt 1 lt id gt lt response gt If the processing specified in the request succeeded and the parameter save was set to 0 then the XML response contains the id of the metadata record and the processed metadata record For example if processing an isol19139 metadata record then the response would contain the processed iso19139 metadata record as follows lt response gt lt id gt 2 lt id gt lt record gt lt gmd MD Metadata gt lt gmd MD_Metadata gt lt record gt lt response gt If the processing specified in the request failed an XML error response is returned with the reason For example here is the response when processing was requested on a metadata record belonging to
297. version history Requires authentication Yes Request Once the metadata records have been selected the xml metadata batch newowner service can be in voked with the following parameters e user mandatory New owner user identifier e group mandatory New owner group user identifier Request example POST Url http localhost 8080 geonetwork srv eng xml metadata batch newowner ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt user gt 2 lt user gt lt group gt 2 lt group gt lt request gt GET Urls http localhost 8080 geonetwork srv eng xml metadata batch newowner user l group 1 9 10 Metadata Ownership services 115 GeoNetwork Developer Manual Release 2 10 4 0 Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully updated e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the reque
298. vice Returns 500 HTTP code 9 8 Metadata Select services These services are for creating and managing a set of selected metadata records The se lected set is normally used by the metadata batch services eg Batch update privileges xml metadata batch update privileges Batch new owner xml metadata batch newowner Batch update status _ xml metadata batch update status Batch update categories xml metadata batch update categories Batch start versioning xml metadata batch version Batch process metadata records with an XSLT xml metadata batch processing and Batch Delete xml metadata batch delete 9 8 Metadata Select services 109 GeoNetwork Developer Manual Release 2 10 4 0 9 8 1 Select metadata records xml metadata select This service can be used to build and manage a selected set of metadata Request Parameters e id Identifier of metadata to select can be more than one e selected Selection state Values add add all remove remove all Select all metadata example Url http localhost 8080 geonetwork srv eng metadata select Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt lt selected gt add all lt selected gt lt request gt Select a metadata record example Url http localhost 8080 geonetwork srv eng metadata select Mime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt r
299. vice url x ring serviceUrl http localhost 8080 geonetwork srv en xml group list stMethod post new PostMethod serviceUrl y String postDat xx Set post post setReques x Send requ HttpClient htt a Xml getString new Document request data mime type and encodingx tEntity new StringRequestEntity postData application xml UTF8 est pclient new HttpClient int result httpclient executeMethod post xx Display s System out pri x Display r System out pri System out pri tatus codex ntln Response status code result esponsexx ntln Response body ntln post getResponseBodyAsString 9 24 Java development with XML services 195 GeoNetwork Developer Manual Release 2 10 4 0 Output catch Exception ex ex printStackTrace finally Release current connection to the connection pool once rel post Response status code Response body lt xml version 1 0 encoding UTF 8 gt lt response gt Lec ord gt lt id gt 2 lt id gt lt name gt sample lt name gt lt description gt Demo group lt description gt lt email gt group mail net lt email gt lt referrer gt you are donexx leaseConnection 200 lt label gt lt en gt Sample group lt en gt lt fr gt Sample group lt fr gt lt es gt Sample group lt es gt lt de gt Beispielgruppe lt de gt lt nl gt Voorbe
300. vices 107 GeoNetwork Developer Manual Release 2 10 4 0 Errors e Service not allowed error id service not allowed when the user is not authenticated or their profile has no rights to execute the service Returns 500 HTTP code e Metadata not found error id metadata not found if the identifier provided did not corre spond to an existing metadata record Returns 500 HTTP code e Operation not allowed error id operation not allowed when the user is not authorized to edit the metadata To edit a metadata one of the following must be true The user is the metadata owner The user is an Administrator The user has edit rights over the metadata The user is a Reviewer and or UserAdmin and the metadata groupOwner is one of his groups Returns 500 HTTP code 9 7 4 Batch Delete xml metadata batch delete The xml metadata batch delete service deletes the metadata records in the selected set Note This service requires a previous call to the xml metadata select service see Select meta data records xml metadata select to select the metadata records to delete Note Only those metadata records for which the user running the service has ownership rights on will be deleted If metadata versioning is on then deletions will be recorded in the version history Requires authentication Yes 9 7 5 Request Parameters None Example request POST Uri http localhost 8080 geonetwork srv eng xml me
301. vices o oco o re ua en dm rde te ed 9 12 Metadata Category Services 2 beat ua wa ae ee SR an EE Da eS 9 13 Metadata Versioning Services eure do daa a dn wad A a deden He a A 9 14 Metadata Processing services 22 saar ne a ee ed ne OE e 9 15 Metadata Relation Services d 4 umd rn ee wed rk Ba ee k ea 9 16 Metadata Validatton Servie s o e aus are bn ee end a ed ee atie OAT System CONASUTAHON e s na na a ek i ek A a it al a ee a a 9 18 Site Information and Request Forwarding Services ee 9 19 File download servic S c ane 24 dn art re de dee eae ea eS 9 20 Harvesting Services aa acar vate ae eden ee de an er dte a RE ee ke E G O2 iSChemaiSErVICes lus a Ara eh we Ge ee lt A a ed ag A aed aS A S s 022 MEF SERVICES ans x og aen eRe ba and Heh AO oh we Hrs we a VINES SERVIC Sos e oe erties neden We Eee Mee eee tie ea eee pede one 9 24 Java development with XML services aaau ee Settings hierarchy TON Introduction as ze dane 4 ALAS dak a ee eS ee Dees 10 2 System node sse zea ten Goa ewe a a ee ER de eS ae ee hw hea we ae 10 3 Harvesting nodes se so 4048 84 de haba da hee ba Be Bo a Bw eS User Interface Ta GCHASSI 4 hha ha ae SO isk Ok de cM i Ea he aes dudes we OO LD Search EEN 11 3 TabSearch n oo a oe ee at Be go a ew eee a Ake wo we ak a var a 114 HTMESUI gt nec oe a Owe ae lr BAS ER HS RS Hee OR Ge wae Index 59 59 59 60 61 65
302. w 2 0 2 service CSW ve lt csw 1d gt 5df54bf0 3a7d 44bf 9abf 84d772da8df1 lt csw Id gt lt csw ElementSetName gt full lt csw ElementSetName gt lt esw GetRecordById gt lt env Body gt lt env Envelope gt GetRecords GetRecords request allows to query the catalogue metadata records specifying a query in OCG Filter or CQL languages To retrieve non public metadata a previous xml user login service invocation is required See login service Request examples GET request using CQL language Urls http localhost 8080 geonetwork srv eng csw request GetRecords amp service CSW version 2 0 POST request Uri http localhost 8080 geonetwork srv eng csw Content type application xml Post data lt xml version 1 0 encoding UTF 8 gt lt csw GetRecords xmlns csw http www opengis net cat csw 2 0 2 service CSW version lt csw Query typeNames csw Record gt lt csw Constraint version 1 1 0 gt lt Filter xmlns http www opengis net ogc xmlns gml http www opengis net gml gt lt PropertyIsLike wildCard singleChar _ escape gt lt PropertyName gt AnyText lt Propert yName gt lt Literal gt africa lt Literal gt lt PropertyIsLike gt lt Filter gt lt csw Constraint gt lt csw Query gt lt csw GetRecords gt SOAP request Url http localhost 8080 geonetwork srv eng csw Content type application soap xml Post data lt xml version 1 0 enc
303. ween different organizations For more information please contact Advanced Search Options Latestnews Hydrological Basins in Geoscience Australia s Physiographic Map of North X Buscar a Africa Sample record Open Day Photographs and Cental Eurasia AJL please remove 26th August 2007 Sample record please remove BEE Hydrological basins in Globally threatened Natural polar ecosystems Europe species of the world Powered by GeoNetwork newgui geocat net geonetwork apps search 11 2 1 Widgets The GeoNetwork widget framework provides a list of independent pieces of code that let you build a geonetwork user interface Add widget Widgets are usually pieces of html that will be shown on your user interface You should place them in some html structure so they are visually arranged The widgets are prepared with some configuration options so you can select some of the visual aspects For example on the picture above you an select the number of tags on the cloud or the number of items shown on the latest section To add a widget you should wait for the page to be loaded This may be approached with the onReady function of ExtJS Ext onReady function new GeoNetwork TagCloudView catalogue catalogue query fast true amp summaryOnly true amp from 1 amp to 4 renderTo cloud tag onSuccess app loadResults On this example we just have to set up four properties on th
304. ww isotc211 org 2005 gmd prefi ns prefix in attribute values uri http www isotc211 org 2005 srv prefi ns prefix in attribute values uri http www isotc211 org 2005 gco prefi ns prefix in attribute values uri http www fao org geonetwork prefix ns prefix in attribute values uri http www w3 org 1999 xlink prefix gt ractive pattern document name CharacterString must have content or its d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt d rule context gco CharacterString gt fir 9 16 Metadata Validation services 145 GeoNetwork Developer Manual Release 2 10 4 0 lt svrl fired rule context gco CharacterString gt lt svrl fired rule context gco CharacterString gt lt svrl active pattern document name CRS attributes constraints gt lt svrl active pattern document name ISOFTDS19139 2005 TableAl Row24 A nan lt svrl fired rule context gmd CI_ResponsibleParty gt lt svrl failed assert ref _31 test S count amp gt 0 location x local name N lt svrl text gt lt alert M8 gt lt div gt You must specify one or more of individua
305. x xFind Bugs gt Find Bugs x FindBugs violations will show up as warnings 1 7 4 Code Quality Tools and Maven During the build process FindBugs and Checkstyle are ran If a violation is found then the build will fail Usually the easiest way of resolving violations are to use eclipse and run check style or find bugs on the class or project with the failure Usually a detailed report will be provided in eclipse along with suggested fixes If the violation is determined to be an intentional violation the code_quality findbugs excludes xml or code_quality checkstyle_suppressions xml should be updated to suppress the report ing of the violation See Find Bugs and Checkstyle sections for more details Since the FindBugs and Checkstyle processes can be quite time consuming adding Dskip Tests to the maven commandline will skip those processes as well as tests For example mvn install DskipTests Or if you want to run the tests but skip static analysis mvn install P run static analysis That disables the profile that executes the static analysis tasks 10 Chapter 1 Software development GeoNetwork Developer Manual Release 2 10 4 0 1 7 5 FindBugs FindBugs is a tool that statically analyzes Java class files and searches for potential bugs It excels at finding issues like unclosed reasources inconsistent locking of resources refering null known null values It also checks for bad practices like using de
306. xml harvesting run These services are described in on section because they share a common request interface Their purpose is to remove start stop or run a harvester 1 remove Remove a harvester Deletes the harvester instance 2 start When created a harvester is in the inactive state This operation makes it active which means it will be run at the enxt scheduled time 3 stop Makes a harvester inactive it will no longer be executed at the scheduled time Note this will not stop a harvester that is already performing a harvest 4 run Start the harvester now Used to test the harvesting Request A set of ids to operate on Example lt request gt lt id gt 123 lt id gt lt id gt 456 lt id gt lt id gt 789 lt id gt lt request gt Response Similar to the request but every id has a status attribute indicating the success or failure of the operation For example the response to the previous request could be lt response gt lt id status 0k gt 123 lt id gt lt id status not found gt 456 lt id gt lt id status inactive gt 789 lt id gt lt response gt The table below summarises for each service the possible status values Status value remove start stop run ok X X X X not found X X X X inactive X already inactive X already active X already running X 9 20 Harvesting services 175 GeoNetwork Developer Manual Release 2 10 4 0
307. xsl in the INSTALL_DIR web geonetwork xs1 directory Example of an xml file disclaimer response for a GeoNetwork node Note the lt metadata gt and lt license gt elements are not shown in full as they are too big lt response gt lt id gt 22 lt id gt lt uuid gt d8c8call ecc8 45dc b424 171a9e212220 lt uuid gt lt fname gt roam rsf aus bathy topo contours sff lt fname gt lt fname gt mse09_M8 nc lt fname gt lt access gt private lt access gt lt metadata gt lt gmd MD_Metadata xmlns gmd http www isotc211 org 2005 gmd xmilns xsi http lt gmd MD_Metadata gt lt metadata gt lt license gt lt html gt lt head gt 9 19 File download services 163 GeoNetwork Developer Manual Release 2 10 4 0 lt link href http localhost 8080 geonetwork favicon ico rel shortcut lt link href http localhost 8080 geonetwork favicon ico rel icon tyg lt link rel stylesheet type text css href http localhost 8080 geone lt link rel stylesheet type text css href http localhost 8080 geone lt head gt lt body gt Se Big bereed th gt lt body gt lt html gt lt license gt lt response gt The idea behind this service is that you will receive an HTML presentation of the constraints restrictions on the resource that you can show to a user for an accept decline response The HTML presentation is controlled by the server so to
308. xslt gt lt content gt lt options gt lt every gt 0 0 0 x lt every gt lt oneRunOnly gt false lt oneRunOnly gt lt status gt inactive lt status gt lt options gt lt privileges gt lt group id 1 gt lt operation name view gt lt operation name dynamic gt lt operation name featured gt lt group gt lt privileges gt lt categories gt lt category id 2 gt lt categories gt lt info gt lt lastRun gt lt running gt false lt running gt lt info gt lt node gt 10 3 5 Harvesting node oaipmh This harvester type is capable of querying an OAIPMH Open Archives Initiative Protocol for Metadata Harvesting version 2 0 server and harvesting metadata e node string oaipmh site url string OAIPMH server URL icon string This is the icon that will be used as the metadata source logo The image is taken from the images harvesting folder and copied to the images logos folder A list of the possible values that can be used for this parameter can be obtained from the xml harvesting info service see icons options 212 Chapter 10 Settings hierarchy GeoNetwork Developer Manual Release 2 10 4 0 x validate boolean Validate metadata before saving to database This option will be deprecated in favour of content validate search 0 n Contains search parameters which because they are constrained to follow the OAIPMH version 2 0 standard are curious
309. xt Samantha mail net xx Create PostMethod specifying service url String serviceUrl http localhost 8080 geonetwork srv en user update PostMethod post new PostMethod serviceUrl try String postData Xml getString new Document request xx Set post data mime type and encodings post setRequestEntity new StringRequestEntity postData xx Send requestx HttpClient httpclient new HttpClient int result httpclient executeMethod post xx Display status codex System out printin Response status code result xx Display responsex System out printin Response body String responseBody post getResponseBodyAsString System out printin responseBody if result HttpStatus SC OK xx Process exceptions System out printin Error code response getAttribute id getValue System out printin Error message response getChildText message catch Exception ex ex printStackTrace finally Release current connection to the connection pool once you are done post releaseConnection Element response Xml loadString responseBody false application xml UTF8 9 24 Java development with XML services 197 GeoNetwork Developer Manual Release 2 10 4 0 Output Response status code 401 Response body lt xml version 1 0 encoding UTF 8 gt lt error id
310. y and anyAttribute although the last two can be handled under special circumstances In the case of the Marine Commuity Profile we are basically defining a number of extensions to the base standard ISO19115 19139 These extensions are defined using the XSD extension mechanism on the types defined in ISO19139 The following snippet shows how the Marine Community Profile extends the gmd MD_Metadata element to add a new element called revisionDate lt xs schema targetNamespace http bluenet3 antcrc utas edu au mcp xmilns mcp http bluenet3 antcrc utas edu au mcp gt lt xs element name MD_Metadata substitutionGroup gmd MD_Metadata type mcp MD_Metadata_Type gt lt xs complexType name MD_Metadata_Type gt lt xs annotation gt lt xs documentation gt Extends the metadata element to include revisionDate lt xs documentation gt lt xs annotation gt lt xs complexContent gt lt xs extension base gmd MD_Metadata_Type gt lt xs sequence gt lt xs element name revisionDate type gco Date_PropertyType minOccurs 0 gt lt xs sequence gt lt xs attribute ref gco isoType use required fixed gmd MD_Metadata gt lt xs extension gt lt xs complexContent gt lt xs complexType gt lt xs schema gt In short we have defined a new element mcp MD_Metadata with type mcp MD_Metadata_Type which is an extension of gmd MD_Metadata_Type By extension we mean that the new type includes all of th
311. y those metadata records that the user running the service has editing rights over will be versioned If a metadata record is already versioned then no action is taken Requires authentication Yes Request Parameters None Example request POST Url http localhost 8080 geonetwork srv eng xml metadata batch version ime type application xml Post request lt xml version 1 0 encoding UTF 8 gt lt request gt GET Url http localhost 8080 geonetwork srv eng xml metadata batch version 9 13 Metadata Versioning services 131 GeoNetwork Developer Manual Release 2 10 4 0 Response If the request executed successfully then HTTP 200 status code is returned and an XML document with a summary of how the metadata records in the selected set have been processed An example of such a response is shown below lt response gt lt done gt 5 lt done gt lt notOwner gt 0 lt notOwner gt lt notFound gt 0 lt notFound gt lt response gt The response fields are e done number of metadata records successfully updated e notOwner number of metadata records skipped because the user running this service did not have ownership rights e notFound number of metadata records skipped because they were not found may have been deleted If the request fails an HTTP 500 status code error is returned and the response is an XML document with the exception An example of such a response is shown below
312. ystem configuration settings e harvesting contains nodes that describe the settings used by harvesters In the following sections the indentation is used to show hierarchy names in bold represent keys the datatype of the value is shown in parenthesis after the key an italic font is used to indicate types string integer boolean enumerated values separated by a I represent the set of allowed values a missing datatype means that the value of the node is not used square brackets indicate cardinality If they are missing a cardinality of 1 1 should be inferred 10 2 System node Some examples of system configuration settings nodes contained in the system node are shown in the hierarchy below e system information on system configuration settings e site Contains information about the site e name string Name used to present this site to other sites Used to fill comboboxes or lists 203 GeoNetwork Developer Manual Release 2 10 4 0 organisation string Name of the organization company institute that is running GeoNetwork siteld string A UUID that uniquely identifies the site It is generated by the installer platform Contains information about the current software version version string GeoNetwork s version in the X Y Z format subVersion string A small extra description about the version like alpha 1 beta etc server Used when it is necessary to build absolute URLs to
313. ystem when the harvesting node is created x useAccount boolean Indicates if the harvester has to authenticate to access the data username string credentials to be used for authentication password string credentials to be used for authentication options every string Harvesting schedule similar to the Unix CRON format x oneRunOnly boolean If true the harvester will harvest just once and then it will set the status to inactive 10 3 Harvesting nodes 205 GeoNetwork Developer Manual Release 2 10 4 0 status activelinactive Indicates if the harvesting from this node is stopped inactive or if the harvester is waiting for the next scheduled harvest active content A container for options relating to processing content after harvesting but before storage in the GeoNetwork database x importxslt string Name of XSLT to apply to metadata records before being stored and indexed in GeoNetwork note not every harvester supports this option see notes section for each harvester in the harvester settings descriptions below A list of the possible XSLTs that can be used for this parameter can be obtained from the xml harvesting info service see importStylesheets validate boolean If true the harvester will validate the metadata record against the matching metadata schema in GeoNetwork note not every harvester supports this option see notes section for each harvester in the harveste
Download Pdf Manuals
Related Search
Related Contents
3. Maintenance and Disassembly n°49/Janvier-février 2013/Davantage de bois local dans la 8 juillet 2009 - Université François Rabelais Craftsman 61pc Manufacturer's Warranty Manuale Utente Bedienungsanleitung Kenmore 15 cu. ft. Top Freezer Refrigerator - Bisque Manufacturer's Warranty (Espanol) SierraView MV-xx Manual MODE D`EMPLOI - whirlpool documents Copyright © All rights reserved.
Failed to retrieve file