Schema Configuration

From NGDCWiki

(Difference between revisions)
Jump to: navigation, search
m
Current revision (14:54, 30 April 2013) (view source)
m (Replacing page with 'out of date content - see history tab')
 
Line 1: Line 1:
-
[http://geonetwork-opensource.org/documentation/how-to/geonetwork-shema-template-howto Configure Schema].  This documentation provides a a guideline for adding a custom schema to geonetwork, but is not entirely complete or correct.  Please use the steps below as a supplement to the geonetwork documentation.
+
out of date content - see history tab
-
 
+
-
1. Create a directory for the new schema in the geonetwork schema directory.  This directory will contain the schema definitions (xsd files) and some xsl files required by geonetwork. Sub directories called convert and loc should also be included in the schema directory.
+
-
::''C:\Program Files\geonetwork\web\geonetwork\xml\schemas[nmmr-schema]''
+
-
2. Define schema element labels. The labels.xml file defines the labels used by elements in the schema template.<br/>
+
-
::''C:\Program Files\geonetwork\web\geonetwork\xml\schemas\nmmr-schema\loc\en[labels.xml]''<br/>
+
-
::''<element name="algoinfo"><label>Algorithm Information</label><description/></element>''
+
-
3. Add schema xsd's to schema directory.  For the time being the nmmr-schema is using the fgdc-std xsd's that were included with the geonetwork install.  These xsd's are being incrementally migrated to the nmmr-schema.<br/>
+
-
4. Add required xsl's to schema directory. Some geonetwork specific stylesheets need to be included in the nmmr-schema directory.  These xsl's are listed in step four of the geonetwork configuration document.<br/>
+
-
5. Define search elements.  By default, geonetwork's search engine will search the title, abstract, keywords, and extent.  Additional elements can be searched my modifying the search xsl files.
+
-
::''C:\Program Files\geonetwork\web\geonetwork\xml\search\lucene.xsl''
+
-
::''C:\Program Files\geonetwork\web\geonetwork\xml\search\lucene-utils.xsl''
+
-
6. Create an xsl for displaying schema content.  Each schema contains an xsl that defines how content will be displayed and edited.
+
-
::''C:\Program Files\geonetwork\web\geonetwork\xsl\[metadata-nmmr-schema.xsl]''
+
-
7. Modify geonetwork config files.  Several config files need to be updated with references to the new schema.  These files are defined in the geonetwork documentation.<br/>
+
-
8. Load schema template into geonetwork. The schema template is an xml file containing all the elements for the schema.  This xml file must not contain any element values.  It should just contain the xml elements. Then nmmr has a feature called 'Get blank xml record'.  This feature was used to create an empty nmmr-schema.xml file.  Once the schema template is generated it must be loaded into the geonetwork database. The default installation of geonetwork uses an open source database called Mckoi.  Geonetwork recommends 'Druid' (open source database client)for accessing Mckoi.  I found that Squirrel was an easier more effective client.  I ran into with both Druid and Squirrel while trying to insert the nmmr template into Mckoi.  It appears that both clients have a size limitation for inserts of ~ 64k.  Since the nmmr-schema was 84k this caused the insert to fail.  I was able to work around this problem by breaking the file in half and performing two inserts.  The second insert was a concatenation.
+
-
::''update metadata set data=data||'data values''
+
-
 
+
-
[[Category:Geonetwork]]
+

Current revision

out of date content - see history tab

Personal tools