configuration.rst 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. .. _community_metadata_configuration:
  2. Getting Started
  3. ===============
  4. .. contents:: :local:
  5. :depth: 1
  6. Installation
  7. ------------
  8. To install the GeoServer Metadata extension:
  9. - Visit the GeoServer :website:`download` page and navigate to the download page for the version of GeoServer your are using. The **metadata** download is listed under extensions. The file name is called :file:`geoserver-*-metadata-plugin.zip`, where ``*`` matches the version number of GeoServer you are using.
  10. - Extract this file and place the JARs in :file:`WEB-INF/lib`.
  11. - Perform any configuration required by your servlet container, and
  12. then restart. On startup, Metadata module will create a configuration
  13. directory ``metadata`` in the GeoServer Data Directory. The module will scan all `yaml <https://yaml.org/>`__ files in the ``metadata`` directory.
  14. Basic configuration
  15. --------------------
  16. By default the metadata module will add an extra tab to the edit layer page. Open the layer: navigate to :menuselection:`Layers --> Choose the layer --> Metadata tab`.
  17. .. figure:: images/empty-default.png
  18. The initial UI. Note the :guilabel:`Metadata fields` panel is still empty
  19. The content of the :guilabel:`Metadata fields` is configured by placing one or multiple `yaml <https://yaml.org/>`__ files describing the UI components in the metadata configuration folder, see :ref:`tutorial_metadata` for a real life example.
  20. Example UI configuration:
  21. .. code:: YAML
  22. attributes:
  23. - key: metadata-identifier
  24. fieldType: UUID
  25. - key: metadata-datestamp
  26. label: Date
  27. fieldType: DATETIME
  28. - key: data-language
  29. fieldType: DROPDOWN
  30. values:
  31. - dut
  32. - eng
  33. - fre
  34. - ger
  35. - key: topic-category
  36. fieldType: SUGGESTBOX
  37. occurrence: REPEAT
  38. values:
  39. - farming
  40. - biota
  41. - boundaries
  42. - climatologyMeteorologyAtmosphere
  43. - economy
  44. - elevation
  45. - key: data-date
  46. fieldType: COMPLEX
  47. typename: data-identification-date
  48. occurrence: REPEAT
  49. types:
  50. - typename: data-identification-date
  51. attributes:
  52. - key: date
  53. fieldType: DATE
  54. - key: date-type
  55. fieldType: DROPDOWN
  56. values:
  57. - creation
  58. - publication
  59. - revision
  60. This configuration results in the following GUI:
  61. .. figure:: images/basic-gui.png
  62. There are 3 main parts in the `yaml <https://yaml.org/>`__:
  63. - **attributes:** a list of GUI components that will be rendered in the tab. They can be a basic type or a complex type, a complex type is a collection of basic types.
  64. - **types:** a list that defines the fields in each complex type.
  65. - **tabs** optionally, attributes may be displayed on separate tabs.
  66. :ref:`community_metadata_uiconfiguration` gives an overview of all supported types and advanced features.