Skip to content

Commit

Permalink
#2 enable inspire validation through geonapi action
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 18, 2019
1 parent abc49ed commit c788657
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: geoflow
Version: 0.0.9002
Version: 0.0.9003
Date: 2019-10-18
Title: R engine to orchestrate and run geospatial (meta)data workflows
Authors@R: c(
Expand Down
2 changes: 1 addition & 1 deletion R/geoflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' \tabular{ll}{
#' Package: \tab geoflow\cr
#' Type: \tab Package\cr
#' Version: \tab 0.0.9002\cr
#' Version: \tab 0.0.9003\cr
#' Date: \tab 2019-10-18\cr
#' License: \tab MIT\cr
#' LazyLoad: \tab yes\cr
Expand Down
11 changes: 9 additions & 2 deletions R/geoflow_action_geonapi_publish_iso_19139.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ geonapi_publish_iso_19139 <- function(entity, config, options){
stop("Package 'geonapi' is required for this action")
}

geometa_inspire <- if(!is.null(options$geometa_inspire)) options$geometa_inspire else FALSE
if(geometa_inspire){
config$logger.info("INSPIRE geometa option enabled: The record will be checked against the INSPIRE reference validator prior its CSW-T publication")
}

#shortcut for gn config
GN <- config$software$output$geonetwork

Expand All @@ -28,15 +33,17 @@ geonapi_publish_iso_19139 <- function(entity, config, options){
#insert metadata (once inserted only visible to the publisher)
group <- if(!is.null(options$group)) options$group else "1"
category <- if(!is.null(options$category)) options$category else "datasets"
created = GN$insertMetadata(geometa = md, group = group, category = category)
created = GN$insertMetadata(geometa = md, group = group, category = category,
geometa_inspire = geometa_inspire)

#config privileges
config <- GNPrivConfiguration$new()
config$setPrivileges("all", privileges)
GN$setPrivConfiguration(id = created, config = config)
}else{
#update a metadata
updated = GN$updateMetadata(id = metaId, geometa = md)
updated = GN$updateMetadata(id = metaId, geometa = md,
geometa_inspire = geometa_inspire)

#config privileges
gn_config <- GNPrivConfiguration$new()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/eblondel/geoflow.svg?branch=master)](https://travis-ci.org/eblondel/geoflow)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/geoflow)](https://cran.r-project.org/package=geoflow)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.0.9002-blue.svg)](https://github.com/eblondel/geoflow)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.0.9003-blue.svg)](https://github.com/eblondel/geoflow)
[![DOI](https://zenodo.org/badge/DOI//10.5281/zenodo.3138920.svg)](https://doi.org//10.5281/zenodo.3138920)

**R engine to orchestrate and run geospatial (meta)data workflows**
Expand Down
2 changes: 1 addition & 1 deletion man/geoflow.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c788657

Please sign in to comment.