Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate RLI metadata standard v1.4 to SourceModel and -View #7

Open
henhuy opened this issue Nov 30, 2018 · 5 comments
Open

Integrate RLI metadata standard v1.4 to SourceModel and -View #7

henhuy opened this issue Nov 30, 2018 · 5 comments

Comments

@henhuy
Copy link
Contributor

henhuy commented Nov 30, 2018

I would be nice to use JSON field holding metadata in source model.
An extra widget-template could be used to show metadata-json nicely!

Refs to #4

@nesnoj
Copy link
Member

nesnoj commented Mar 5, 2019

I tried to add a sample source by creating a JSON via RLI's Meta-Tool. It's added, but in the sources list it's not correctly displayed (see screenie below).

According to the template

<a href="{{item.render_url}}" target="_blank">{{item.author}}</a>

the author property seems to be used for display a list element. Although it violates the v1.4 metadata standard (which, as I'm aware of, is not implemented yet) I tried to add this property but it doesn't seem to be used.
Which format do you currently use for the JSON @henhuy?

Also, the highlighting of source or category does currently not work, at least on my end.. what about your app?

image

Metadata I used:

{
  "name": "twsg_1_and_2",
  "title": "TWSG Zone I+II",
  "identifier": "",
  "description": "Trinkwasserschutzgebiete Zone I+II in Anhalt-Bitterfeld-Wittenberg",
  "language": "de-DE",
  "keywords": [
    "Trinkwasser",
    "Schutzgebiet"
  ],
  "publicationDate": "2017-12-31",
  "context": {
    "homepage": "https://reiner-lemoine-institut.de/kopernikus-projekt-enavi/",
    "documentation": "",
    "sourceCode": "",
    "contact": "https://github.com/nesnoj",
    "grantNo": ""
  },
  "spatial": {
    "location": "none",
    "extent": "Anhalt-Bitterfeld-Wittenberg",
    "resolution": "10m"
  },
  "temporal": {
    "referenceDate": "",
    "start": "",
    "end": "",
    "resolution": ""
  },
  "sources": [
    {
      "title": "INSPIRE ST Schutzgebiete Naturschutz",
      "description": "Schutzgebiete gemäß Naturschutzgesetz Sachsen-Anhalt und Ramsar-Konvention,  transformiert ins INSPIRE-Datenmodell für das Thema \"Schutzgebiete\"",
      "path": "https://www.metaver.de/trefferanzeige?cmd=doShowDocument&docuuid=5AB24BD9-178E-41AF-B54B-56F2E768BD8B",
      "license": "GeoNutzV",
      "copyright": "© Landesamt für Umweltschutz (LAU) Sachsen-Anhalt"
    }
  ],
  "licenses": [],
  "contributors": [],
  "resources": [],
  "review": {
    "path": "",
    "badge": ""
  },
  "metaMetadata": {
    "metadataVersion": "OEP-1.4",
    "metadataLicense": {
      "name": "CC0-1.0",
      "title": "Creative Commons Zero v1.0 Universal",
      "path": "https://creativecommons.org/publicdomain/zero/1.0/"
    }
  },
  "_comment": {
    "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)",
    "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)",
    "units": "Use a space between numbers and units (100 m)",
    "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)",
    "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)",
    "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)",
    "none": "If not applicable use (none)"
  }
}

@nesnoj
Copy link
Member

nesnoj commented Mar 11, 2019

Any clues, @henhuy?

henhuy added a commit that referenced this issue Mar 12, 2019
@henhuy
Copy link
Contributor Author

henhuy commented Mar 12, 2019

You were right - metadata template and model were "broken".
I changed code to show some information - maybe we can think about what to show there together.
Note: I used a new json querying package "jmespath" (very cool!) to get information from metadata. So you have to install this one, to maek it work.
Hope this helps!

@nesnoj
Copy link
Member

nesnoj commented Mar 13, 2019

Holy cow, that new package looks quite helpful.
Yea sources list works now, thank you! 👍

@henhuy
Copy link
Contributor Author

henhuy commented Mar 13, 2019

Yes - I stumbled upon this package at https://realpython.com/python-refactoring/#4-handling-complex-dictionaries-with-query-tools and find it very cool indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants