diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/manual/README.md b/docs/manual/README.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/manual/docs/index.md b/docs/manual/docs/index.md new file mode 100644 index 00000000..86de52fd --- /dev/null +++ b/docs/manual/docs/index.md @@ -0,0 +1,17 @@ +--- +hide: + - navigation +--- + +# GeoNetwork MicroServices {#toc} + +Welcome to GeoNetwork MicroServices. + +
+ +- :fontawesome-solid-signs-post: [OGCAPI-Records](ogcapi/index.md) + + --- + + Implementation of OGCAPI-Records. +
\ No newline at end of file diff --git a/docs/manual/docs/ogcapi/catalog.md b/docs/manual/docs/ogcapi/catalog.md new file mode 100644 index 00000000..199a540c --- /dev/null +++ b/docs/manual/docs/ogcapi/catalog.md @@ -0,0 +1,41 @@ +# Catalog.yaml definition {#toc} + + +See [Catalog Definition in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#req_records-api_catalog-response). + +The properties come from the source's (portal sub-portal) in the GeoNetwork "sources" table, column "serviceRecord". +This can be configured in the `GN GUI: Admin Console-Settings-sources` for sub-portals. + +There is no GUI to set this for the "main" portal - do this in GN GUI: Admin Console-Settings-Settings-Catalog Service for the Web (CSW)-Record to use for GetCapabilities (`system/csw/capabilityRecordUuid`). + + +|Property| Description | Elastic Index JSON Property | +|--------| ----------- | --------------------------- | +| id | A unique identifier for this catalog. | metadataIdentifier| +| created | The date this collection was created. | createDate| +| updated | The more recent date on which this collection was changed. |changeDate | +| conformsTo | The extensions/conformance classes used in this catalog object. | `not used` | +| type | Fixed value of "Catalog". | always "Catalog" | +| itemType | Fixed value of "record", "catalog" or both. | always "record"| +| title | A human-readable name given to this catalog. | resourceTitleObject| +| description | A free-text description of this catalog. | resourceAbstractObject| +| extent | The spatiotemporal coverage of this catalog. | spatial: geom
temporal: resourceTemporalDateRange | +| crs | A list of coordinate reference systems used for spatiotemporal values. | coordinateSystem| +| keywords | A list of free-form keywords or tags associated with this collection. |tag | +themes | A knowledge organization system used to classify this collection. | allKeywords| +| language | The language used for textual values (i.e. titles, descriptions, etc.) of this collection object. |mainLanguage | +| languages | The list of other languages in which this collection object is available. |otherLanguage | +| recordLanguages | The list of languages in which records from the collection can be represented. |`not used` | +| contacts | A list of contacts qualified by their role(s). |contact | +| license | The legal provisions under which this collection is made available. |MD_LegalConstraintsUseLimitationObject | +| rights | A statement that concerns all rights not addressed by the license such as a copyright statement. | `not used`| +| recordsArrayName | The name of the array property in the catalog used to encode records in-line. The default value is records. | `not used`| +| records | An array of records encoded in-line in the catalog. |`not used` | +| links | A list of links related to this catalog. | `filled with Java code`| +| linkTemplates | A list of link templates related to this catalog. | `not used`| +| schemes | A list of schemes related to this catalog. |`not used`| + +See `ElasticIndexJson2CollectionInfo.java` for more details. + +NOTE: For `Contact.address`, we only fill in the `deliveryPoint` because that's all that's available in the Elastic Index JSON. + diff --git a/docs/manual/docs/ogcapi/conformance.md b/docs/manual/docs/ogcapi/conformance.md new file mode 100644 index 00000000..d377e007 --- /dev/null +++ b/docs/manual/docs/ogcapi/conformance.md @@ -0,0 +1,4 @@ +# Conformance {#toc} + + +See [Conformance in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#conformance_class). diff --git a/docs/manual/docs/ogcapi/index.md b/docs/manual/docs/ogcapi/index.md new file mode 100644 index 00000000..0703666f --- /dev/null +++ b/docs/manual/docs/ogcapi/index.md @@ -0,0 +1,15 @@ + +# GeoNetwork MicroServices OGCAPI-Records {#toc} + + +This service module implements the ([OGCAPI-Records](https://ogcapi.ogc.org/records)). + +| Endpoint Name | Endpoint Location | Meaning | +| -------- | ------- | -------- | +| [Landing Page](landingpage) | / | Home Page | +| [Conformance declaration](conformance) | /conformance | Conformance Documents | +| [OpenAPI Documentation](openapi) | /openapi | OpenAPI (Swagger) description document | +| [Record collections](record-collections) | /collections | List of Catalogs
(GN portals) | +| [Record collection](record-collection) | /collections/{collectionId} | Information about a single Catalog
(GN portal) | +| [Records](records) | /collections/{collectionId}/items | Records in a Catalog
Search, etc... | +| [Record](record) | /collections/{collectionId}/items/{recordId} | Single Metadata Record | \ No newline at end of file diff --git a/docs/manual/docs/ogcapi/landingpage.md b/docs/manual/docs/ogcapi/landingpage.md new file mode 100644 index 00000000..b79f840e --- /dev/null +++ b/docs/manual/docs/ogcapi/landingpage.md @@ -0,0 +1,26 @@ +# Landing Page {#toc} + +The Landing Page will show information about the server. It has links to the [Conformance declaration](conformance), the [OpenAPI Documentation](openapi), and the [Record collections](record-collections). + +See [Landing Page in the OGCAPI specification](https://docs.ogc.org/is/17-069r3/17-069r3.html#_api_landing_page). + + +## JSON Model + +The JSON model follows the ["landingPage.yml"](https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/landingPage.yaml) definition in the OGCAPI Specification. + +| JSON Tag| Meaning | +| -------- | ------- | +| title | Title for the server | +| description | Description of the server | +| links | Links to other documents | + + +The GeoNetwork OGCAPI-Records implementation also include a non-standard item: + +| JSON Tag| Meaning | +| -------- | ------- | +| systemInfo | Metadata for the Server. See the [catalog.yaml](../catalog) description. | + + +This metadata information is taken from the Service Record linked to the GeoNetwork's main portal. diff --git a/docs/manual/docs/ogcapi/openapi.md b/docs/manual/docs/ogcapi/openapi.md new file mode 100644 index 00000000..3c229492 --- /dev/null +++ b/docs/manual/docs/ogcapi/openapi.md @@ -0,0 +1,4 @@ +# OpenApi Description Document {#toc} + +This is the [OpenApi (Swagger) Description Document](https://swagger.io/). + diff --git a/docs/manual/docs/ogcapi/record-collection.md b/docs/manual/docs/ogcapi/record-collection.md new file mode 100644 index 00000000..7c6d18a2 --- /dev/null +++ b/docs/manual/docs/ogcapi/record-collection.md @@ -0,0 +1,7 @@ +# Record Collection {#toc} + +See [Record Collection in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#clause-record-collection). + +##JSON Model + +See the [catalog.yaml](../catalog) description. \ No newline at end of file diff --git a/docs/manual/docs/ogcapi/record-collections.md b/docs/manual/docs/ogcapi/record-collections.md new file mode 100644 index 00000000..7dcfe581 --- /dev/null +++ b/docs/manual/docs/ogcapi/record-collections.md @@ -0,0 +1,11 @@ +# Record Collections {#toc} + +This gives a summary of all the Record Collections (Catalogs) on the Server. In GeoNetwork this is the main portal, plus any sub-portals described. + + +See [Record Collections in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#record-collections). + + +## JSON MODEL + +See the [catalog.yaml](../catalog) description. \ No newline at end of file diff --git a/docs/manual/docs/ogcapi/record.md b/docs/manual/docs/ogcapi/record.md new file mode 100644 index 00000000..52985c11 --- /dev/null +++ b/docs/manual/docs/ogcapi/record.md @@ -0,0 +1,6 @@ +# Record {#toc} + +See [Record in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#clause-record-core). + + + \ No newline at end of file diff --git a/docs/manual/docs/ogcapi/records.md b/docs/manual/docs/ogcapi/records.md new file mode 100644 index 00000000..0c259aeb --- /dev/null +++ b/docs/manual/docs/ogcapi/records.md @@ -0,0 +1,4 @@ +# Records {#toc} + +See [Records in the OGCAPI specification](https://docs.ogc.org/DRAFTS/20-004.html#clause-record-collection). + diff --git a/docs/manual/mkdocs.yml b/docs/manual/mkdocs.yml new file mode 100644 index 00000000..73c44668 --- /dev/null +++ b/docs/manual/mkdocs.yml @@ -0,0 +1,152 @@ +# Project information +site_name: GeoNetwork Opensource Microservices +site_description: GeoNetwork Opensource Microservices. +site_dir: target/html +site_url: https://docs.geonetwork-opensource.org/ + +# Repository +repo_name: geonetwork-microservices +repo_url: https://github.com/geonetwork/geonetwork-microservices +edit_uri: edit/main/docs/manual/docs + +# Copyright +copyright: Copyright © 2024 FAO-UN and others + +extra_css: + - assets/stylesheets/extra.css + +# Configuration +theme: + name: material + language: en + custom_dir: overrides + logo: assets/images/geonetwork-logo.svg + favicon: assets/images/geonetwork-logo.png + icon: + repo: fontawesome/brands/github + palette: + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: blue + toggle: + icon: material/weather-night + name: Switch to dark mode + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode + features: + - toc.follow + - navigation.tracking + - navigation.top + - navigation.tabs + - navigation.prune + - navigation.indexes + - navigation.footer + - header.autohide + - content.tabs.link + - content.code.copy + - content.action.view + - content.action.edit + - announce.dismiss + +# Plugins - install using: pip3 install -r requirements.txt +plugins: + - exclude: + glob: + - annexes/gallery/bin/README.md + - i18n: + docs_structure: suffix + reconfigure_material: true + languages: + - locale: en + name: English + build: true + default: true + site_name: 'GeoNetwork MicroServices OpenSource' + - locale: fr + name: Français + build: !ENV [FRENCH,true] + site_name: 'GeoNetwork MicroServices OpenSource' + site_description: Catalogue GeoNetwork pour répertorier, rechercher et examiner les enregistrements. + nav_translations: + Home: Home + Search: Search + Record: Record + Map: Map + - search + +# Customizations +extra: + version: + provider: mike + default: stable + alias: true + homepage: https://geonetwork-opensource.org/ + social: + - icon: fontawesome/brands/github + link: https://github.com/geonetwork + - icon: fontawesome/brands/docker + link: https://hub.docker.com/_/geonetwork + - icon: geonetwork/logo_bw + link: https://geonetwork-opensource.org/ + name: GeoNetwork Website + +# For use with --strict to produce failures on build warnings +validation: + nav: + omitted_files: warn + not_found: warn + absolute_links: warn + links: + not_found: warn + absolute_links: warn + unrecognized_links: warn + +# Extensions +# - These are carefully chosen to work with pandoc markdown support for whole document translation +markdown_extensions: + - admonition + - attr_list + - def_list + - pymdownx.details + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + options: + custom_icons: + - overrides/.icons + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.smartsymbols + - pymdownx.snippets + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - pymdownx.tabbed: + alternate_style: true + - tables + - md_in_html + +# Page tree +nav: + - 'GeoNetwork MicroServices': index.md + - 'OGCAPI-Records': + - ogcapi/index.md + - ogcapi/landingpage.md + - ogcapi/conformance.md + - ogcapi/openapi.md + - ogcapi/record-collections.md + - ogcapi/record-collection.md + - ogcapi/records.md + - ogcapi/record.md + diff --git a/docs/manual/overrides/.icons/geonetwork/logo.svg b/docs/manual/overrides/.icons/geonetwork/logo.svg new file mode 100644 index 00000000..d1ebaec7 --- /dev/null +++ b/docs/manual/overrides/.icons/geonetwork/logo.svg @@ -0,0 +1,28 @@ + + + + gn_logo + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/manual/overrides/.icons/geonetwork/logo_bw.svg b/docs/manual/overrides/.icons/geonetwork/logo_bw.svg new file mode 100644 index 00000000..61c0c2d9 --- /dev/null +++ b/docs/manual/overrides/.icons/geonetwork/logo_bw.svg @@ -0,0 +1,15 @@ + + + + gn_logo + Created with Sketch. + + + + diff --git a/docs/manual/overrides/assets/images/geonetwork-logo.png b/docs/manual/overrides/assets/images/geonetwork-logo.png new file mode 100644 index 00000000..f8926bf7 Binary files /dev/null and b/docs/manual/overrides/assets/images/geonetwork-logo.png differ diff --git a/docs/manual/overrides/assets/images/geonetwork-logo.svg b/docs/manual/overrides/assets/images/geonetwork-logo.svg new file mode 100644 index 00000000..73bb4876 --- /dev/null +++ b/docs/manual/overrides/assets/images/geonetwork-logo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/docs/manual/overrides/assets/stylesheets/extra.css b/docs/manual/overrides/assets/stylesheets/extra.css new file mode 100644 index 00000000..07b39e34 --- /dev/null +++ b/docs/manual/overrides/assets/stylesheets/extra.css @@ -0,0 +1,79 @@ + +img + em, .browser-border + em, .browser-mockup + em { + display: block; + text-align: left; + font-size: 0.7rem; + font-style: normal; +} +.md-typeset .admonition, .md-typeset details { + font-size: 0.75rem; +} + +/* definition list used to display general inputs */ +.md-typeset dl dd { + margin: 10px 0; +} +[dir=ltr] .md-typeset dd { + margin-left: 0; +} +.md-typeset dl dd code { + border: 1px solid rgba(230, 230, 230, 0.7); + padding: 8px 12px; +} + +.browser-border { + border: 1px solid rgba(230, 230, 230, 0.7); + border-radius: 3px; + background: #fff; + margin: 10px 0 5px 0; +} +.browser-mockup { + border: 1px solid rgba(230, 230, 230, 0.7); + border-top: 2em solid rgba(230, 230, 230, 0.7); + /*box-shadow: 0 0.1em 1em 0 rgba(0, 0, 0, 0.4);*/ + position: relative; + border-radius: 3px; + margin: 10px 0 5px 0; +} + +.browser-mockup:before { + display: block; + position: absolute; + content: ''; + top: -1.25em; + left: 1em; + width: 0.5em; + height: 0.5em; + border-radius: 50%; + background-color: #f44; + box-shadow: 0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5; +} + +.browser-mockup.with-tab:after { + display: block; + position: absolute; + content: ''; + top: -2em; + left: 5.5em; + width: 20%; + height: 0; + border-bottom: 2em solid white; + border-left: 0.8em solid transparent; + border-right: 0.8em solid transparent; +} + +.browser-mockup.with-url:after { + display: block; + position: absolute; + content: ''; + top: -1.6em; + left: 5.5em; + width: calc(100% - 6em); + height: 1.2em; + border-radius: 2px; + background-color: white; +} + +.browser-mockup > * { + display: block; +} diff --git a/docs/manual/overrides/main.html b/docs/manual/overrides/main.html new file mode 100644 index 00000000..f2432066 --- /dev/null +++ b/docs/manual/overrides/main.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block outdated %} + GeoNetwork 4.4 is latest. + Click here to go to stable. +{% endblock %} diff --git a/docs/manual/overrides/partials/copyright.html b/docs/manual/overrides/partials/copyright.html new file mode 100755 index 00000000..40f52ada --- /dev/null +++ b/docs/manual/overrides/partials/copyright.html @@ -0,0 +1,41 @@ + + + + diff --git a/docs/manual/pom.xml b/docs/manual/pom.xml new file mode 100644 index 00000000..e74e55a0 --- /dev/null +++ b/docs/manual/pom.xml @@ -0,0 +1,108 @@ + + + + + gn-ms-docs + org.geonetwork-opensource.cloud + 4.4.5-0 + + 4.0.0 + gn-ms-guide + GeoNetwork MicroServices Guide + pom + + + Creative Commons Attribution 3.0 License + http://creativecommons.org/licenses/by/3.0/ + repo + + + + + + + maven-antrun-plugin + 3.0.0 + + + + docs + compile + + run + + + + + + + + + + + + + + + + maven-assembly-plugin + 3.3.0 + + + make-assembly + package + + single + + + + + src/assembly/guide.xml + + + + + + + + maven-deploy-plugin + + true + + + + + maven-install-plugin + + true + + + + + + + + \ No newline at end of file diff --git a/docs/manual/requirements.txt b/docs/manual/requirements.txt new file mode 100644 index 00000000..f9aaca20 --- /dev/null +++ b/docs/manual/requirements.txt @@ -0,0 +1,5 @@ +mkdocs-material>=9.5.3 +mkdocs-static-i18n>=1.0.5 +mkdocs-include-markdown-plugin +mkdocs-exclude +mike==2.0.0 \ No newline at end of file diff --git a/docs/manual/src/assembly/guide.xml b/docs/manual/src/assembly/guide.xml new file mode 100644 index 00000000..58394d44 --- /dev/null +++ b/docs/manual/src/assembly/guide.xml @@ -0,0 +1,13 @@ + + manual + + zip + + + + target/html + + + + + diff --git a/docs/pom.xml b/docs/pom.xml new file mode 100644 index 00000000..1d41005e --- /dev/null +++ b/docs/pom.xml @@ -0,0 +1,45 @@ + + + + + gn-cloud-microservices + org.geonetwork-opensource.cloud + 4.4.5-0 + + 4.0.0 + gn-ms-docs + Root Documentation module + pom + + + General Public License (GPL) + http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt + + + + manual + + \ No newline at end of file