Skip to content

Commit

Permalink
#181 M3, M5, test new standard codelist handling, applied to Telephon…
Browse files Browse the repository at this point in the history
…eType class
  • Loading branch information
eblondel committed Oct 1, 2024
1 parent d9841b6 commit d506420
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 80 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ export(ISOStandardOrderProcess)
export(ISOStatus)
export(ISOStereoMate)
export(ISOTelephone)
export(ISOTelephoneType)
export(ISOTemporalConsistency)
export(ISOTemporalExtent)
export(ISOTemporalValidity)
Expand Down
46 changes: 46 additions & 0 deletions R/ISOTelephoneType.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#' ISOTelephoneType
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO telephone type
#' @return Object of \code{\link{R6Class}} for modelling an ISO TelephoneType
#' @format \code{\link{R6Class}} object.
#'
#' @examples
#' #possible values
#' values <- ISOTelephoneType$values(labels = TRUE)
#'
#' voice <- ISOTelephoneType$new(value = "voice")
#'
#' @references
#' ISO 19115-3 - Geographic information -- Metadata
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOTelephoneType <- R6Class("ISOTelephoneType",
inherit = ISOCodeListValue,
private = list(
xmlElement = list(
"19115-3" = "CI_TelephoneTypeCode"
),
xmlNamespacePrefix = list(
"19115-3" = "CIT"
)
),
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,
addCodeListAttrs = FALSE)
}
)
)

ISOTelephoneType$values <- function(labels = FALSE){
return(ISOCodeListValue$values(ISOTelephoneType, labels))
}
Loading

0 comments on commit d506420

Please sign in to comment.