-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#181 support M4 - MCC existing classes + MD_metadata as MDB class
- Loading branch information
Showing
26 changed files
with
497 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#' ISODataQualityScope | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO extent | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISO Scope | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @examples | ||
#' md <- ISODataQualityScope$new() | ||
#' md$setLevel("dataset") | ||
#' xml <- md$encode() | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISODataQualityScope <- R6Class("ISODataQualityScope", | ||
inherit = ISOAbstractObject, | ||
private = list( | ||
xmlElement = "DQ_Scope", | ||
xmlNamespacePrefix = "GMD" | ||
), | ||
public = list( | ||
#'@field level level | ||
level = NULL, | ||
|
||
#'@description Initializes object | ||
#'@param xml object of class \link{XMLInternalNode-class} | ||
initialize = function(xml = NULL){ | ||
super$initialize(xml = xml) | ||
}, | ||
|
||
#'@description Set level | ||
#'@param level object of class \link{ISOScope} or any \link{character} | ||
#' among values returned by \link{ISOScope} | ||
setLevel = function(level){ | ||
if(is(level, "character")){ | ||
level <- ISOScope$new(value = level) | ||
} | ||
self$level <- level | ||
} | ||
) | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#' ISOProgress | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO status | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISO progress status | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @examples | ||
#' #possible values | ||
#' values <- ISOProgress$values(labels = TRUE) | ||
#' | ||
#' #pending status | ||
#' pending <- ISOProgress$new(value = "pending") | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' ISO/TS 19115-3:2016 - Geographic information — Metadata — Part 3: XML schema implementation for fundamental concepts | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISOProgress<- R6Class("ISOProgress", | ||
inherit = ISOCodeListValue, | ||
private = list( | ||
xmlElement = "MD_ProgressCode", | ||
xmlNamespacePrefix = list( | ||
"19115-1/2" = "GMD", | ||
"19115-3" = "MCC" | ||
) | ||
), | ||
public = list( | ||
|
||
#'@description Initializes object | ||
#'@param xml object of class \link{XMLInternalNode-class} | ||
#'@param value value | ||
#'@param description description | ||
initialize = function(xml = NULL, value, description = NULL){ | ||
super$initialize(xml = xml, id = private$xmlElement, value = value, description = description, | ||
setValue = FALSE, addCodeSpaceAttr = FALSE) | ||
} | ||
) | ||
) | ||
|
||
ISOProgress$values <- function(labels = FALSE){ | ||
return(ISOCodeListValue$values(ISOProgress, labels)) | ||
} | ||
|
||
#' ISOStatus | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO status | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISO progress status | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @examples | ||
#' #possible values | ||
#' values <- ISOStatus$values(labels = TRUE) | ||
#' | ||
#' #pending status | ||
#' pending <- ISOStatus$new(value = "pending") | ||
#' | ||
#' @note deprecated - use \link{ISOProgress} instead | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISOStatus<- R6Class("ISOStatus", | ||
inherit = ISOCodeListValue, | ||
private = list( | ||
deprecated = TRUE, | ||
xmlElement = "MD_ProgressCode", | ||
xmlNamespacePrefix = list( | ||
"19115-1/2" = "GMD", | ||
"19115-3" = "MCC" | ||
) | ||
), | ||
public = list( | ||
|
||
#'@description Initializes object | ||
#'@param xml object of class \link{XMLInternalNode-class} | ||
#'@param value value | ||
#'@param description description | ||
initialize = function(xml = NULL, value, description = NULL){ | ||
warnings("Class 'ISOStatus' is deprecated, please use 'ISOProgress' instead!") | ||
ISOProgress$new(xml = xml, value = value, description = description) | ||
} | ||
) | ||
) | ||
|
||
ISOStatus$values <- function(labels = FALSE){ | ||
return(ISOProgress$values(labels = labels)) | ||
} |
Oops, something went wrong.