-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
20 changed files
with
983 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#' ISOAbsoluteExternalPositionalAccuracy | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO data quality absolute external positional accuracy | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISOAbsoluteExternalPositionalAccuracy | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Inherited methods from \code{ISODataQualityAbstractElement} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml)}}{ | ||
#' This method is used to instantiate an ISOAbsoluteExternalPositionalAccuracy | ||
#' } | ||
#' } | ||
#' | ||
#' @examples | ||
#' #encoding | ||
#' dq <- ISOAbsoluteExternalPositionalAccuracy$new() | ||
#' dq$addNameOfMeasure("measure") | ||
#' metaId <- ISOMetaIdentifier$new(code = "measure-id") | ||
#' dq$setMeasureIdentification(metaId) | ||
#' dq$setMeasureDescription("description") | ||
#' dq$setEvaluationMethodDescription("method description") | ||
#' dq$setEvaluationMethodType("indirect") | ||
#' dq$setDateTime(ISOdate(2015,1,1,12,10,49)) | ||
#' spec <- ISOCitation$new() | ||
#' spec$setTitle("specification title") | ||
#' spec$setAlternateTitle("specification alternate title") | ||
#' d <- ISODate$new() | ||
#' d$setDate(ISOdate(2015, 1, 1, 1)) | ||
#' d$setDateType("publication") | ||
#' spec$addDate(d) | ||
#' dq$setEvaluationProcedure(spec) | ||
#' result <- ISOConformanceResult$new() | ||
#' result$setSpecification(spec) | ||
#' result$setExplanation("some explanation about the conformance") | ||
#' result$setPass(TRUE) | ||
#' dq$addResult(result) | ||
#' xml <- dq$encode() | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISOAbsoluteExternalPositionalAccuracy <- R6Class("ISOAbsoluteExternalPositionalAccuracy", | ||
inherit = ISOAbstractPositionalAccuracy, | ||
private = list( | ||
xmlElement = "DQ_AbsoluteExternalPositionalAccuracy", | ||
xmlNamespacePrefix = "GMD" | ||
), | ||
public = list() | ||
) |
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,31 @@ | ||
#' ISOAbstractPositionalAccuracy | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO data quality abstract positional accuracy | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISOAbstractPositionalAccuracy | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Inherited methods from \code{ISODataQualityAbstractElement} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml)}}{ | ||
#' This method is used to instantiate an ISOAbstractPositionalAccuracy | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISOAbstractPositionalAccuracy <- R6Class("ISOAbstractPositionalAccuracy", | ||
inherit = ISODataQualityAbstractElement, | ||
private = list( | ||
xmlElement = "AbstractDQ_PositionalAccuracy", | ||
xmlNamespacePrefix = "GMD" | ||
), | ||
public = list() | ||
) |
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,159 @@ | ||
#' ISODataQualityAbstractElement | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO data quality abstract element | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISODataQualityAbstractElement | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @field nameOfMeasure | ||
#' @field measureIdentification | ||
#' @field measureDescription | ||
#' @field evaluationMethodType | ||
#' @field evaluationMethodDescription | ||
#' @field evaluationProcedure | ||
#' @field dateTime | ||
#' @field result | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml)}}{ | ||
#' This method is used to instantiate an ISODataQuality | ||
#' } | ||
#' \item{\code{addNameOfMeasure(name)}}{ | ||
#' Add name | ||
#' } | ||
#' \item{\code{delNameOfMeasure(name)}}{ | ||
#' Deletes name | ||
#' } | ||
#' \item{\code{setMeasureIdentification(identification)}}{ | ||
#' Sets measure identifier, an object of class \code{ISOMetaIdentifier} | ||
#' } | ||
#' \item{\code{setMeasureDescription(description)}}{ | ||
#' Sets measure description | ||
#' } | ||
#' \item{\code{setEvaluationMethodType(type)}}{ | ||
#' Sets the type of evaluation method, an object of class \code{ISOEvaluationMethodType} | ||
#' or any \code{character} value among code{ISOEvaluationMethodType$values()} | ||
#' } | ||
#' \item{\code{setEvaluationMethodDescription(description)}}{ | ||
#' Sets the description of evaluation method | ||
#' } | ||
#' \item{\code{setEvaluationMethodProcedure(procedure)}}{ | ||
#' Sets the procedure as an object of class \code{ISOCitation} | ||
#' } | ||
#' \item{\code{setDateTime(dateTime)}}{ | ||
#' Sets datetime, object class 'POSIXct'/'POSIXt' | ||
#' } | ||
#' \item{\code{addResult(result)}}{ | ||
#' Sets conformance result, object of class \code{ISOConformanceResult} | ||
#' } | ||
#' \item{\code{delResult(result)}}{ | ||
#' Deletes conformance result, object of class \code{ISOConformanceResult} | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISODataQualityAbstractElement <- R6Class("ISODataQualityAbstractElement", | ||
inherit = ISOAbstractObject, | ||
private = list( | ||
xmlElement = "AbstractDQ_Element", | ||
xmlNamespacePrefix = "GMD" | ||
), | ||
public = list( | ||
|
||
#+ nameOfMeasure [0..*]: character | ||
nameOfMeasure = list(), | ||
#+ measureIdentification [0..1]: ISOMetaIdentifier | ||
measureIdentification = NULL, | ||
#+ measureDescription [0..1]: character | ||
measureDescription = NULL, | ||
#+ evaluationMethodType [0..1]: ISOEvaluationMethodType | ||
evaluationMethodType = NULL, | ||
#+ evaluationMethodDescription [0..1]: character | ||
evaluationMethodDescription = NULL, | ||
#+ evaluationProcedure [0..1]: ISOCitation | ||
evaluationProcedure = NULL, | ||
#+ dateTime [0..1]: ISODateTime | ||
dateTime = NULL, | ||
#+ result [1..2]: ISOConformanceResult | ||
result = list(), | ||
|
||
initialize = function(xml = NULL){ | ||
super$initialize(xml = xml) | ||
}, | ||
|
||
#addNameOfMeasure | ||
addNameOfMeasure = function(name){ | ||
return(self$addListElement("nameOfMeasure", name)) | ||
}, | ||
|
||
#delNameOfMeasure | ||
delNameOfMeasure = function(name){ | ||
return(self$delListElement("nameOfMeasure", name)) | ||
}, | ||
|
||
#setMeasureIdentification | ||
setMeasureIdentification = function(identification){ | ||
if(!is(identification, "ISOMetaIdentifier")){ | ||
stop("The argument value should be an object of class 'ISOMetaIdentifier") | ||
} | ||
self$measureIdentification = identification | ||
}, | ||
|
||
#setMeasureDescription | ||
setMeasureDescription = function(description){ | ||
self$measureDescription <- description | ||
}, | ||
|
||
#setEvaluationMethodType | ||
setEvaluationMethodType = function(type){ | ||
if(!is(type, "ISOEvaluationMethodType")){ | ||
type <- ISOEvaluationMethodType$new(value = type) | ||
} | ||
self$evaluationMethodType <- type | ||
}, | ||
|
||
#setEvaluationMethodDescription | ||
setEvaluationMethodDescription = function(description){ | ||
self$evaluationMethodDescription <- description | ||
}, | ||
|
||
#setEvaluationProcedure | ||
setEvaluationProcedure = function(procedure){ | ||
if(!is(procedure, "ISOCitation")){ | ||
stop("The argument value should be an object of class 'ISOCitation'") | ||
} | ||
self$evaluationProcedure <- procedure | ||
}, | ||
|
||
#setDateTime | ||
setDateTime = function(dateTime){ | ||
if(!all(class(dateTime) == c("POSIXct","POSIXt"))){ | ||
stop("The argument should be an 'POSIXct'/'POSIXt' object") | ||
} | ||
self$dateTime <- dateTime | ||
}, | ||
|
||
#addResult | ||
addResult = function(result){ | ||
if(!is(result, "ISOConformanceResult")){ | ||
stop("The argument value should be an object of class 'ISOConformanceResult'") | ||
} | ||
return(self$addListElement("result", result)) | ||
}, | ||
|
||
#delResult | ||
delResult = function(result){ | ||
if(!is(result, "ISOConformanceResult")){ | ||
stop("The argument value should be an object of class 'ISOConformanceResult'") | ||
} | ||
return(self$delListElement("result", result)) | ||
} | ||
) | ||
) |
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 @@ | ||
#' ISOEvaluationMethodType | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO EvaluationMethodType | ||
#' @return Object of \code{\link{R6Class}} for modelling an ISO EvaluationMethodType | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @field value | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml,value)}}{ | ||
#' This method is used to instantiate an ISOEvaluationMethodType | ||
#' } | ||
#' } | ||
#' | ||
#' @examples | ||
#' #possible values | ||
#' values <- ISOEvaluationMethodType$values(labels = TRUE) | ||
#' | ||
#' #example of EvaluationMethodType | ||
#' indirect <- ISOEvaluationMethodType$new(value = "indirect") | ||
#' | ||
#' @references | ||
#' ISO 19115:2003 - Geographic information -- Metadata | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
ISOEvaluationMethodType <- R6Class("ISOEvaluationMethodType", | ||
inherit = ISOCodeListValue, | ||
private = list( | ||
xmlElement = "DQ_EvaluationMethodTypeCode", | ||
xmlNamespacePrefix = "GMD" | ||
), | ||
public = list( | ||
initialize = function(xml = NULL, value){ | ||
super$initialize(xml = xml, id = private$xmlElement, value = value, setValue = FALSE) | ||
} | ||
) | ||
) | ||
|
||
ISOEvaluationMethodType$values <- function(labels = FALSE){ | ||
return(ISOCodeListValue$values(ISOEvaluationMethodType, labels)) | ||
} |
Oops, something went wrong.