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

Add INSPIRE validator #105

Closed
eblondel opened this issue Aug 23, 2018 · 3 comments

Comments

@eblondel
Copy link
Owner

commented Aug 23, 2018

This task will consist in adding an embedded INSPIRE metadata validator (based on INSPIRE metadata validation web-service) into geometa. The user will be able to get the INSPIRE validation report. INSPIRE metadata validation indicator will be appended as XML comments in the generated ISO 19139 XML.

@eblondel eblondel self-assigned this Aug 23, 2018

@eblondel eblondel added this to Need sponsors in R Consortium 2019 Sep 14, 2018

@eblondel eblondel moved this from Need sponsors to Unsupported in R Consortium 2019 Sep 14, 2018

@eblondel eblondel moved this from Unsupported to To do in R Consortium 2019 Jan 14, 2019

@eblondel eblondel removed this from To do in R Consortium 2019 Jan 17, 2019

@eblondel eblondel added this to the 0.5 milestone Jan 17, 2019

eblondel added a commit that referenced this issue Jan 17, 2019

eblondel added a commit that referenced this issue Jan 17, 2019

@eblondel

This comment has been minimized.

Copy link
Owner Author

commented Jan 17, 2019

The INSPIRE metadata validator can be used in several ways:

  • directly using the validator and get the validation report
inspireValidator = INSPIREMetadataValidator$new()
inspireValidator$getValidationReport(md) #with md being the metadata object
  • using shortcuts, with the parameter inspire (TRUE/FALSE) available through methods $encode() and $save()
md$encode(inspire = TRUE)
md$save("mymetadata.xml", inspire = TRUE)

These two methods will add further XML comments targeting the INSPIRE validation as footer of the ISO 19139 XML. An example on an empty object ISOMetadata$new() would look like that:

<gmd:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gfc="http://www.isotc211.org/2005/gfc" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" xmlns:gmlrgrid="http://www.opengis.net/gml/3.3/rgrid" xmlns:xlink="http://www.w3.org/1999/xlink">
  <gmd:characterSet>
    <gmd:MD_CharacterSetCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#MD_CharacterSetCode" codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>
  </gmd:characterSet>
  <gmd:hierarchyLevel>
    <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MX_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode>
  </gmd:hierarchyLevel>
  <!--Metadata Creation date/time: 2019-01-17T19:02:42-->
  <!--ISO 19139 XML generated by geometa R package - Version 0.5-->
  <!--ISO 19139 XML compliance: NO-->
  <!--INSPIRE compliance: NO-->
  <!--INSPIRE completeness: 5.56%-->
  <!--INSPIRE Report: http://inspire-geoportal.ec.europa.eu/resources/sandbox/INSPIRE-14472bd2-1a82-11e9-9b61-52540023a883_20190117-190239/datasets/1/resourceReport-->
  <!--geometa R package information:	Contact: Emmanuel Blondel emmanuel.blondel1@gmail.com	URL: https://github.com/eblondel/geometa/wiki	BugReports: https://github.com/eblondel/geometa/issues-->
</gmd:MD_Metadata>

eblondel added a commit that referenced this issue Jan 29, 2019

eblondel added a commit that referenced this issue Jan 29, 2019

@juliettefabre

This comment has been minimized.

Copy link

commented Feb 4, 2019

Thanks Emmanuel for this new feature, it works perfectly!

@eblondel eblondel modified the milestones: 0.5, R Consortium 2019 - M1 Mar 18, 2019

@eblondel eblondel closed this Mar 20, 2019

@eblondel

This comment has been minimized.

Copy link
Owner Author

commented Apr 30, 2019

A section has been added to the online documentation for this feature: https://github.com/eblondel/geometa/wiki#encoding-validation-inspire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.