The Canadian GeoNetwork community is pleased share the ISO Harmonized North American Profile (HNAP) schema plugin. This is a bilingual extension of the North American Profile of ISO 19115:2003 - Geographic information - Metadata used nationally.
For details on this release see 3.10.11 Milestone release notes for details.
User Manual (HNAP) is provided for end-users. The user manual explores catalog use using HNAP examples. This is an end-user supliment to the far more technical GeoNetwork User and Developer Manuals.
This user manual is available for local installation.
The project issue tracker is used for communication, with ongoing topics tagged discussion.
Use GeoNetwork 3.10.x, not tested with prior versions!
The schema plugin editor makes use of a number of controls for editing structured text fields requiring newer releases of core-geonetwork.
The plugin can be deployed manually in an existing GeoNetwork installation:
-
Download from releases page.
Each release includes a
jar,zip, anddocdownload. -
Extract contents of the
schema-iso19139.ca.HNAPzip download intoWEB-INF/data/config/schema_plugins/iso19139.ca.HNAP. -
Copy the
schema-iso19139.ca.HNAPjar to geonetworkWEB-INF/libs -
Copy the
schema-iso19139.ca.HNAPdoc to geonetworkdoc -
Restart geonetwork
There is some custom initialization code run when GeoNetwork starts up:
-
The plugin includes will check the GeoNetwork Data Directory
ThesauriDirto see if the HNAP Thesauruses are already installed. -
If they are not (i.e. this is the very first run of GeoNetwork with the HNAP Schema), the required thesaurus files are are copied from the
jarinto to the correct location in the Data Directory.
See SchemaInitializer.java for details.
The best approach is to add the plugin as a submodule:
-
Use add-schema.sh for automatic deployment:
./add-schema.sh iso19139.ca.HNAP https://github.com/metadata101/iso19139.ca.HNAP 3.10.x -
Build the application:
mvn clean install -Penv-prod -DskipTests -
Once the application is built, the war file contains the schema plugin:
cd web mvn jetty:run -Penv-dev
-
Copy the
iso19139.ca.HNAPfolder fromschemas/iso19139.ca.HNAP/src/main/plugininto geonetworkWEB-INF/data/config/schema_plugins/. -
Copy
schema-iso19139.ca.HNAPjar fromtargetinto geonetworkWEB-INF/libs. -
Restart geonetwork
Documentation is sphinx-build with sphinx-rtd-theme. GeoCat has provided a writing guide on the use of rst directives and formatting.
Generated docs:
mvn clean compile -Pdocs
Docs generated into target/html/index.html:
open target/html/index.html
Package docs into zip:
mvn package -Pdocs
windows:
pip install -U sphinx
pip install hieroglyph recommonmark sphinx-copybutton
macOS:
brew install python
brew install sphinx-doc
pip install hieroglyph recommonmark sphinx-copybutton
jenkins:
mvn clean install -Pdocs
git add docs
git commit -m "update docs"
git push
Translation workflow:
-
Before you start:
pip install sphinx-intl -
Generate
potfiles, and generate messages for translation:mvn compile -PtranslateThis performs:
sphinx-build -b gettext src/sphinx target/gettext sphinx-intl -c src/sphinx/conf.py update -p target/gettext -l fr -
Each
rstfile has a matching messagespofile insrc/local/fr/LC_MESSAGES.Message files follow the
gettextportable objectpoformat:#: ../../src/sphinx/index.rst:3 338fd9f388f64839963b54e20898e403 msgid "User Manual" msgstr "Manuel d'Utilisateur"Messages are described using:
#a comment documenting the line number, and a uuid used to help as content is updated over timemsgidorigionalmsgstrtranslation, please take care not to break sphinx directives
Plenty of tools are available to work with ``po` files.
-
Optional: translates images, figures and screen snaps:
img/sample.pngorigional, `img/sample_fr.png`` translation.figure/example.svgorigional,figure/example_fr.svgtranslation.
Transifex workflow (optional):
-
Create an account on transifex: https://www.transifex.com/
Transifex offers a cloud based editor for internationalization, it is good at suggesting translations by remembering prior translation of similar phrases.
-
Translate content at: https://www.transifex.com/geonetwork/metadata101/
Developers transifex workflow:
-
Before you start: install the transifex command line client:
pip install transifex-clientAnd setup your ``~/.transifexrc` using::
tx init --token API_KEY --no-interactiveUse https://www.transifex.com/user/settings/api/ to generate the
API_KEYabove. -
Stage the
endocs into.tx/configfor transifex to work with:tx config mapping-bulk --project metadata101 --file-extension '.pot' --source-file-dir 'target/gettext' --source-lang en --type PO --expression 'src/locale/<lang>/LC_MESSAGES/{filepath}/{filename}.po' --executeIf you look into
.tx/configyou will see each fileis mapped:[metadata101.target_gettext_index] file_filter = src/locale/<lang>/LC_MESSAGES/index.po source_file = target/gettext/index.pot source_lang = en type = PO -
Push the changes mapped in
.tx/configto transifex:tx push --source -
Pull changes mapped in
.tx/configfrom transifex:tx pull --all
For more information:
- https://www.sphinx-doc.org/en/master/usage/advanced/intl.html
- https://www.gnu.org/software/gettext/
- https://sphinx-intl.readthedocs.io/en/master/quickstart.html
- https://docs.readthedocs.io/en/stable/guides/manage-translations.html
- https://docs.transifex.com/integrations/sphinx-doc
-
Update the
pom.xmlversion information for release:find . -name `pom.xml` -exec sed -i '' 's/3.10-SNAPSHOT/3.10.7-0/g' {} \; -
Update the src/main/plugin/iso19139.ca.HNAP/schema-ident.xm
appMinorVersionSupported:sed -i '' 's/3.10-SNAPSHOT/3.10.7-0/g' src/main/plugin/iso19139.ca.HNAP/schema-ident.xml -
Build everything, including documentation:
mvn clean install -Pdocs -
Commit and tag
git add pom.xml git commit -am "Version 3.10.7" git tag -a 3.10.7 -m "Release 3.10.7" git push origin 3.10.7 -
Navigate to release page: https://github.com/metadata101/iso19139.ca.HNAP/releases
Click
Edit tagbutton:-
Title:
iso19139.ca.HNAP 3.10.7 Release -
Content: Copy from README.md
-
Upload artifacts from
targetto the new github page.
-
-
Restore the
pom.xmlandschema-ident.xmlversion information.find . -name `pom.xml` -exec sed -i '' 's/3.10.7-0/3.10-SNAPSHOT/g' {} \; sed -i '' 's/3.10.7-0/3.10-SNAPSHOT/g' src/main/plugin/iso19139.ca.HNAP/schema-ident.xml -
Create the next milestone: https://github.com/metadata101/iso19139.ca.HNAP/milestones
- Title:
3.10.8 - Date: leave empty
- Content:
Released in conjunction with core-geonetwork 3.10.8.
- Title:
-
Update
README.mdto link to new milestone:For details on this release see [3.10.10 Milestone](https://github.com/metadata101/iso19139.ca.HNAP/milestone/9?closed=1) release notes for details. -
Commit
git add pom.xml README.md git commit -m "Start 3.10.8 development" git push