Skip to content

Commit

Permalink
#181 M5 - new MDQ classes
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Dec 12, 2024
1 parent 2b63748 commit 8645c10
Show file tree
Hide file tree
Showing 11 changed files with 930 additions and 10 deletions.
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export(ISOAbstractTypedDate)
export(ISOAccuracyOfATimeMeasurement)
export(ISOAddress)
export(ISOAggregateInformation)
export(ISOAggregationDerivation)
export(ISOAnchor)
export(ISOAngle)
export(ISOApplicationSchemaInformation)
Expand Down Expand Up @@ -204,6 +205,7 @@ export(ISODistributionUnits)
export(ISODistributor)
export(ISODomainConsistency)
export(ISOElementSequence)
export(ISOEvaluationMethod)
export(ISOEvaluationMethodType)
export(ISOExtendedElementInformation)
export(ISOExtent)
Expand All @@ -218,6 +220,7 @@ export(ISOFileName)
export(ISOFormat)
export(ISOFormatConsistency)
export(ISOFreeText)
export(ISOFullInspection)
export(ISOGeographicBoundingBox)
export(ISOGeographicDescription)
export(ISOGeographicExtent)
Expand Down Expand Up @@ -275,6 +278,7 @@ export(ISOImageryTransferFunctionType)
export(ISOImageryTrigger)
export(ISOImageryUsability)
export(ISOImagingCondition)
export(ISOIndirectEvaluation)
export(ISOIndividual)
export(ISOInheritanceRelation)
export(ISOInitiative)
Expand Down Expand Up @@ -352,6 +356,7 @@ export(ISORoleType)
export(ISOSRVParameter)
export(ISOSRVParameterDirection)
export(ISOSRVServiceIdentification)
export(ISOSampleBasedInspection)
export(ISOSampleDimension)
export(ISOScale)
export(ISOScope)
Expand Down
228 changes: 228 additions & 0 deletions R/ISOEvaluationMethod.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
#' ISOEvaluationMethod
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO evaluation method
#' @return Object of \code{\link{R6Class}} for modelling an ISO abstract evaluation method
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_DQ_EvaluationMethod}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOEvaluationMethod <- R6Class("ISOEvaluationMethod",
inherit = ISOAbstractObject,
private = list(
xmlElement = "DQ_EvaluationMethod",
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
}
)
)

#' ISOAggregationDerivation
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO aggregation derivation
#' @return Object of \code{\link{R6Class}} for modelling an ISO aggregation derivation
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_DQ_AggregationDerivation}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAggregationDerivation <- R6Class("ISOAggregationDerivation",
inherit = ISOEvaluationMethod,
private = list(
xmlElement = "DQ_AggregationDerivation",
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)
}
)
)

#' ISOFullInspection
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO full inspection
#' @return Object of \code{\link{R6Class}} for modelling an ISO full inspection
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_DQ_FullInspection}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOFullInspection <- R6Class("ISOFullInspection",
inherit = ISOEvaluationMethod,
private = list(
xmlElement = "DQ_FullInspection",
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)
}
)
)

#' ISOIndirectEvaluation
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO indirect evaluation
#' @return Object of \code{\link{R6Class}} for modelling an ISO indirect evaluation
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_DQ_IndirectEvaluation}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOIndirectEvaluation <- R6Class("ISOIndirectEvaluation",
inherit = ISOEvaluationMethod,
private = list(
xmlElement = "DQ_IndirectEvaluation",
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)
}
)
)

#' ISOSampleBasedInspection
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO sample based inspection
#' @return Object of \code{\link{R6Class}} for modelling an ISO sample based inspection
#' @format \code{\link{R6Class}} object.
#'
#' @references
#' - ISO 19115-3 \url{https://schemas.isotc211.org/19157/-/mdq/1.2/mdq/#element_DQ_SampleBasedInspection}
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOSampleBasedInspection <- R6Class("ISOSampleBasedInspection",
inherit = ISOEvaluationMethod,
private = list(
xmlElement = "DQ_SampleBasedInspection",
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)
}
)
)
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/-72%25-f2eb24.svg)](https://github.com/eblondel/geometa)| 31| 12| 31| 12|
|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/-84%25-33cc7a.svg)](https://github.com/eblondel/geometa)| 36| 7| 36| 7|
|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 8645c10

Please sign in to comment.