-
Notifications
You must be signed in to change notification settings - Fork 5
/
ISOAbstractReferenceSystem.R
71 lines (67 loc) · 2.04 KB
/
ISOAbstractReferenceSystem.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#' ISOAbstractReferenceSystem
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO abstract reference system
#' @return Object of \code{\link{R6Class}} for modelling an ISO abstract RS Reference system
#' @format \code{\link{R6Class}} object.
#'
#' @section Methods:
#' \describe{
#' \item{\code{new(xml)}}{
#' This method is used to instantiate an ISOAbstractReferenceSystem
#' }
#' \item{\code{setName(name)}}{
#' Set the name, object of class \code{ISOReferenceIdentifier}
#' }
#' \item{\code{addDomainOfValidity(domainOfValidity)}}{
#' Adds a domain of validity, object of class \code{ISOExtent}
#' }
#' \item{\code{delDomainOfValidity(domainOfValidity)}}{
#' Deletes a domain of validity, object of class \code{ISOExtent}
#' }
#' }
#'
#' @note abstract class
#'
#' @references
#' ISO 19115:2003 - Geographic information -- Metadata
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAbstractReferenceSystem <- R6Class("ISOAbstractReferenceSystem",
inherit = ISOAbstractObject,
private = list(
xmlElement = "AbstractRS_ReferenceSystem",
xmlNamespacePrefix = "GMD"
),
public = list(
name = NULL,
domainOfValidity = list(),
initialize = function(xml = NULL){
super$initialize(xml = xml)
},
#setName
setName = function(name){
if(!is(name, "ISOReferenceIdentifier")){
stop("The argument should be an object of class 'ISOReferenceIdentifier'")
}
self$name <- name
},
#addDomainOfValidity
addDomainOfValidity = function(domainOfValidity){
if(!is(domainOfValidity)){
stop("The argument should be an object of class 'ISOExtent'")
}
return(self$addListElement("domainOfValidity", domainOfValidity))
},
#delDomainOfValidity
delDomainOfValidity = function(domainOfValidity){
if(!is(domainOfValidity)){
stop("The object should be of class 'ISOExtent'")
}
return(self$delListElement("domainOfValidity", domainOfValidity))
}
)
)