Skip to content

Commit

Permalink
#181 - M5 new abstract classes for MDQ + rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Dec 12, 2024
1 parent 317647f commit 1fb0f3d
Show file tree
Hide file tree
Showing 35 changed files with 817 additions and 92 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export(ISOAbstractCitation)
export(ISOAbstractCompleteness)
export(ISOAbstractConstraints)
export(ISOAbstractContentInformation)
export(ISOAbstractDataEvaluation)
export(ISOAbstractDataQuality)
export(ISOAbstractDistribution)
export(ISOAbstractExtent)
Expand All @@ -107,6 +108,7 @@ export(ISOAbstractMDContentInformation)
export(ISOAbstractMaintenanceInformation)
export(ISOAbstractMetadata)
export(ISOAbstractMetadataExtension)
export(ISOAbstractMetaquality)
export(ISOAbstractObject)
export(ISOAbstractOnlineResource)
export(ISOAbstractParameter)
Expand All @@ -125,6 +127,7 @@ export(ISOAbstractSpatialRepresentation)
export(ISOAbstractSpatialResolution)
export(ISOAbstractStandardOrderProcess)
export(ISOAbstractTemporalAccuracy)
export(ISOAbstractTemporalQuality)
export(ISOAbstractThematicAccuracy)
export(ISOAbstractTypedDate)
export(ISOAccuracyOfATimeMeasurement)
Expand Down
100 changes: 100 additions & 0 deletions R/ISOAbstractDataEvaluation.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#' ISOAbstractDataEvaluation
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO abstract data evaluation
#' @return Object of \code{\link{R6Class}} for modelling an ISO abstract data evaluation
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_AbstractDQ_DataEvaluation}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAbstractDataEvaluation <- R6Class("ISOAbstractDataEvaluation",
inherit = ISOAbstractObject,
private = list(
xmlElement = "AbstractDQ_DataEvaluation",
xmlNamespacePrefix = list(
"19115-3" = "MDQ"
)
),
public = list(

#'@field dateTime dateTime
dateTime = NULL,
#'@field evaluationMethodDescription evaluationMethodDescription
evaluationMethodDescription = NULL,
#'@field evaluationProcedure evaluationProcedure
evaluationProcedure = NULL,
#'@field referenceDoc referenceDoc
referenceDoc = list(),
#'@field evaluationMethodType evaluationMethodType
evaluationMethodType = NULL,

#'@description Initializes object
#'@param xml object of class \link{XMLInternalNode-class}
initialize = function(xml = NULL){
super$initialize(xml = xml)
},

#'@description Set date time
#'@param dateTime dateTime object of class \link{ISOBaseDateTime}
setDateTime = function(dateTime){
if(!is(dateTime, "ISOBaseDateTime")){
stop("The argument 'dateTime' should be an object of class 'ISOBaseDateTime'")
}
self$dateTime = dateTime
},

#'@description Set evaluation method description
#'@param description description
#'@param locales list of localized descriptions. Default is \code{NULL}
setEvaluationMethodDescription = function(description, locales = NULL){
if(!is.null(locales)){
description <- self$createLocalisedProperty(description, locales)
}
self$evaluationMethodDescription <- description
},

#'@description Set evaluation procedure
#'@param procedure procedure, object of class \link{ISOCitation}
setEvaluationProcedure = function(procedure){
if(!is(procedure, "ISOCitation")){
stop("The argument value should be an object of class 'ISOCitation'")
}
self$evaluationProcedure <- procedure
},

#'@description Adds reference doc
#'@param referenceDoc object of class \link{ISOCitation}
#'@return \code{TRUE} if added, \code{FALSE} otherwise
addReferenceDoc = function(referenceDoc){
if(!is(referenceDoc, "ISOCitation")){
stop("The argument should be an object of class 'ISOCitation'")
}
return(self$addListElement("referenceDoc",referenceDoc))
},

#'@description Deletes reference doc
#'@param referenceDoc object of class \link{ISOCitation}
#'@return \code{TRUE} if deleted, \code{FALSE} otherwise
delReferenceDoc = function(referenceDoc){
if(!is(referenceDoc, "ISOCitation")){
stop("The argument should be an object of class 'ISOCitation'")
}
return(self$delListElement("referenceDoc",referenceDoc))
},

#'@description Set evaluation method type
#'@param type object of class \link{ISOEvaluationMethodType} or any \link{character} value
#' from those returned by \code{ISOEvaluationMethodType$values()}
setEvaluationMethodType = function(type){
if(!is(type, "ISOEvaluationMethodType")){
type <- ISOEvaluationMethodType$new(value = type)
}
self$evaluationMethodType <- type
}
)
)
55 changes: 55 additions & 0 deletions R/ISOAbstractMetaquality.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#' ISOAbstractMetaquality
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO abstract meta quality
#' @return Object of \code{\link{R6Class}} for modelling an ISO abstract meta quality
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_AbstractDQ_Metaquality}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAbstractMetaquality <- R6Class("ISOAbstractMetaquality",
inherit = ISODataQualityAbstractElement,
private = list(
xmlElement = "AbstractDQ_Metaquality",
xmlNamespacePrefix = list(
"19115-3" = "MDQ"
)
),
public = list(

#'@field relatedElement relatedElement [0..*]: ISODataQualityAbstractElement
relatedElement = list(),

#'@description Initializes object
#'@param xml object of class \link{XMLInternalNode-class}
initialize = function(xml = NULL){
super$initialize(xml = xml)
},

#'@description Adds related element
#'@param element object of class \link{ISODataQualityAbstractElement}
#'@return \code{TRUE} if added, \code{FALSE} otherwise
addRelatedElement = function(element){
if(!is(element, "ISODataQualityAbstractElement")){
stop("The argument value should be an object of class 'ISODataQualityAbstractElement'")
}
return(self$addListElement("relatedElement", element))
},

#'@description Deletes related element
#'@param element object of class \link{ISODataQualityAbstractElement}
#'@return \code{TRUE} if deleted, \code{FALSE} otherwise
delRelatedElement = function(element){
if(!is(element, "ISODataQualityAbstractElement")){
stop("The argument value should be an object of class 'ISODataQualityAbstractElement'")
}
return(self$delListElement("relatedElement", element))
}

)
)
32 changes: 32 additions & 0 deletions R/ISOAbstractTemporalQuality.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#' ISOAbstractTemporalQuality
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO abstract temporal quality
#' @return Object of \code{\link{R6Class}} for modelling an ISO abstract temporal quality
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_AbstractDQ_TemporalQuality}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAbstractTemporalQuality <- R6Class("ISOAbstractTemporalQuality",
inherit = ISODataQualityAbstractElement,
private = list(
xmlElement = "AbstractDQ_TemporalQuality",
xmlNamespacePrefix = list(
"19115-3" = "MDQ"
)
),
public = list(

#'@description Initializes object
#'@param xml object of class \link{XMLInternalNode-class}
initialize = function(xml = NULL){
super$initialize(xml = xml)
}

)
)
14 changes: 7 additions & 7 deletions R/ISODataQualityAbstractElement.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISODataQualityAbstractElement <- R6Class("ISODataQualityAbstractElement",
inherit = ISOAbstractObject,
inherit = ISOAbstractQualityElement,
private = list(
xmlElement = "AbstractDQ_Element",
xmlNamespacePrefix = list(
Expand Down Expand Up @@ -190,24 +190,24 @@ ISODataQualityAbstractElement <- R6Class("ISODataQualityAbstractElement",
return(self$delListElement("result", result))
},

#'@description Adds element
#'@description Adds derived element
#'@param element object of class \link{ISODataQualityAbstractElement}
#'@return \code{TRUE} if added, \code{FALSE} otherwise
addElement = function(element){
addDerivedElement = function(element){
if(!is(element, "ISODataQualityAbstractElement")){
stop("The argument value should be an object of class 'ISODataQualityAbstractElement'")
}
return(self$addListElement("element", element))
return(self$addListElement("derivedElement", element))
},

#'@description Deletes element
#'@description Deletes derived element
#'@param element object of class \link{ISODataQualityAbstractElement}
#'@return \code{TRUE} if deleted, \code{FALSE} otherwise
delElement = function(element){
delDerivedElement = function(element){
if(!is(element, "ISODataQualityAbstractElement")){
stop("The argument value should be an object of class 'ISODataQualityAbstractElement'")
}
return(self$delListElement("element", element))
return(self$delListElement("derivedElement", element))
}
)
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ We thank in advance people that use ``geometa`` for citing it in their work / pu
|ISO/TS 19115-3:2023 🆕 |ISO 19115-1:2014 |Metadata for Spatial Representation (MSR) Version: 2.0 |MSR |[![ISO/TS 19115-3:2023 - ISO 19115-1:2014 - MSR](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 17| 0| 17| 0|
|ISO/TS 19115-3:2023 🆕 |ISO 19115-1:2014 |Metadata for SeRVices (SRV) Version: 2.0 |SRV |[![ISO/TS 19115-3:2023 - ISO 19115-1:2014 - SRV](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 8| 0| 3| 5|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Data Quality abstract Classes (DQC) Version 1.0 |DQC |[![ISO/TS 19115-3:2023 - ISO 19157 - DQC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 2| 0| 2| 0|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Metadata for Data Quality (MDQ) Version: 1.0 |MDQ |[![ISO/TS 19115-3:2023 - ISO 19157 - MDQ](https://img.shields.io/badge/-58%25-f9ae2c.svg)](https://github.com/eblondel/geometa)| 25| 18| 25| 18|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Metadata for Data Quality (MDQ) Version: 1.0 |MDQ |[![ISO/TS 19115-3:2023 - ISO 19157 - MDQ](https://img.shields.io/badge/-65%25-f2eb24.svg)](https://github.com/eblondel/geometa)| 28| 15| 28| 15|
|ISO/TS 19115-3:2023 🆕 |ISO/TS 19139:2007 |CATalogue Objects (CAT) Version: 1.0 |CAT |[![ISO/TS 19115-3:2023 - ISO/TS 19139:2007 - CAT](https://img.shields.io/badge/-18%25-ad0f0f.svg)](https://github.com/eblondel/geometa)| 3| 14| 3| 14|
|ISO/TS 19115-3:2023 🆕 |ISO/TS 19139:2007 |Feature Catalog Common (FCC) Version: 1.0 |FCC |[![ISO/TS 19115-3:2023 - ISO/TS 19139:2007 - FCC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 2| 0| 2| 0|
|ISO/TS 19139:2007 |ISO 19110:2005 |Geographic Information - Methodology for feature cataloguing |GFC |[![ISO/TS 19139:2007 - ISO 19110:2005 - GFC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 17| 0| 0| 17|
Expand Down
6 changes: 3 additions & 3 deletions inst/extdata/coverage/geometa_coverage_inventory.csv
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,13 @@
"ISO/TS 19115-3:2023","ISO 19157","Data Quality abstract Classes (DQC) Version 1.0","DQC","Abstract_DataQuality","ISOAbstractDataQuality",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - DQC"
"ISO/TS 19115-3:2023","ISO 19157","Data Quality abstract Classes (DQC) Version 1.0","DQC","Abstract_QualityElement","ISOAbstractQualityElement",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - DQC"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_Completeness","ISOAbstractCompleteness",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_DataEvaluation","<missing>",FALSE,FALSE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_DataEvaluation","ISOAbstractDataEvaluation",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_Element","ISODataQualityAbstractElement",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_LogicalConsistency","ISOAbstractLogicalConsistency",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_Metaquality","<missing>",FALSE,FALSE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_Metaquality","ISOAbstractMetaquality",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_PositionalAccuracy","ISOAbstractPositionalAccuracy",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_Result","ISOAbstractResult",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_TemporalQuality","<missing>",FALSE,FALSE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_TemporalQuality","ISOAbstractTemporalQuality",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","AbstractDQ_ThematicAccuracy","ISOAbstractThematicAccuracy",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","DQ_AbsoluteExternalPositionalAccuracy","ISOAbsoluteExternalPositionalAccuracy",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ","DQ_AccuracyOfATimeMeasurement","ISOAccuracyOfATimeMeasurement",TRUE,TRUE,"ISO/TS 19115-3:2023 - ISO 19157 - MDQ"
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/coverage/geometa_coverage_summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ISO/TS 19115-3:2023","ISO 19115-1:2014","Metadata for Spatial Representation (MSR) Version: 2.0","MSR",17,0,17,0,100
"ISO/TS 19115-3:2023","ISO 19115-1:2014","Metadata for SeRVices (SRV) Version: 2.0","SRV",8,0,3,5,100
"ISO/TS 19115-3:2023","ISO 19157","Data Quality abstract Classes (DQC) Version 1.0","DQC",2,0,2,0,100
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ",25,18,25,18,58.14
"ISO/TS 19115-3:2023","ISO 19157","Metadata for Data Quality (MDQ) Version: 1.0","MDQ",28,15,28,15,65.12
"ISO/TS 19115-3:2023","ISO/TS 19139:2007","CATalogue Objects (CAT) Version: 1.0","CAT",3,14,3,14,17.65
"ISO/TS 19115-3:2023","ISO/TS 19139:2007","Feature Catalog Common (FCC) Version: 1.0","FCC",2,0,2,0,100
"ISO/TS 19139:2007","ISO 19110:2005","Geographic Information - Methodology for feature cataloguing","GFC",17,0,0,17,100
Expand Down
2 changes: 1 addition & 1 deletion inst/extdata/coverage/geometa_coverage_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
|ISO/TS 19115-3:2023 🆕 |ISO 19115-1:2014 |Metadata for Spatial Representation (MSR) Version: 2.0 |MSR |[![ISO/TS 19115-3:2023 - ISO 19115-1:2014 - MSR](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 17| 0| 17| 0|
|ISO/TS 19115-3:2023 🆕 |ISO 19115-1:2014 |Metadata for SeRVices (SRV) Version: 2.0 |SRV |[![ISO/TS 19115-3:2023 - ISO 19115-1:2014 - SRV](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 8| 0| 3| 5|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Data Quality abstract Classes (DQC) Version 1.0 |DQC |[![ISO/TS 19115-3:2023 - ISO 19157 - DQC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 2| 0| 2| 0|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Metadata for Data Quality (MDQ) Version: 1.0 |MDQ |[![ISO/TS 19115-3:2023 - ISO 19157 - MDQ](https://img.shields.io/badge/-58%25-f9ae2c.svg)](https://github.com/eblondel/geometa)| 25| 18| 25| 18|
|ISO/TS 19115-3:2023 🆕 |ISO 19157 |Metadata for Data Quality (MDQ) Version: 1.0 |MDQ |[![ISO/TS 19115-3:2023 - ISO 19157 - MDQ](https://img.shields.io/badge/-65%25-f2eb24.svg)](https://github.com/eblondel/geometa)| 28| 15| 28| 15|
|ISO/TS 19115-3:2023 🆕 |ISO/TS 19139:2007 |CATalogue Objects (CAT) Version: 1.0 |CAT |[![ISO/TS 19115-3:2023 - ISO/TS 19139:2007 - CAT](https://img.shields.io/badge/-18%25-ad0f0f.svg)](https://github.com/eblondel/geometa)| 3| 14| 3| 14|
|ISO/TS 19115-3:2023 🆕 |ISO/TS 19139:2007 |Feature Catalog Common (FCC) Version: 1.0 |FCC |[![ISO/TS 19115-3:2023 - ISO/TS 19139:2007 - FCC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 2| 0| 2| 0|
|ISO/TS 19139:2007 |ISO 19110:2005 |Geographic Information - Methodology for feature cataloguing |GFC |[![ISO/TS 19139:2007 - ISO 19110:2005 - GFC](https://img.shields.io/badge/-100%25-4a4ea8.svg)](https://github.com/eblondel/geometa)| 17| 0| 0| 17|
Expand Down
Loading

0 comments on commit 1fb0f3d

Please sign in to comment.