-
Notifications
You must be signed in to change notification settings - Fork 5
/
ISOAbstractCarrierOfCharacteristics.R
66 lines (61 loc) · 2.27 KB
/
ISOAbstractCarrierOfCharacteristics.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
#' ISOAbstractCarrierOfCharacteristics
#'
#' @docType class
#' @importFrom R6 R6Class
#' @export
#' @keywords ISO abstract carrierOfCharacteristics
#' @return Object of \code{\link{R6Class}} for modelling an abstract ISOCarrierOfCharacteristics
#' @format \code{\link{R6Class}} object.
#'
#' @note abstract class
#'
#' @references
#' ISO 19110:2005 Methodology for Feature cataloguing
#'
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com>
#'
ISOAbstractCarrierOfCharacteristics <- R6Class("ISOAbstractCarrierOfCharacteristics",
inherit = ISOAbstractObject,
private = list(
xmlElement = "AbstractFC_CarrierOfCharacteristics",
xmlNamespacePrefix = "GFC"
),
public = list(
#'@field featureType featureType [0..1]: ISOFeatureType
featureType = NULL,
#'@field constrainedBy constrainedBy [0..*]: ISOConstraint
constrainedBy = list(),
#'@description Initializes object
#'@param xml object of class \link{XMLInternalNode-class}
#'@param defaults default values
initialize = function(xml = NULL, defaults = NULL){
super$initialize(xml = xml, defaults = defaults)
},
#'@description Set feature type
#'@param featureType feature type, object of class \link{ISOFeatureType}
setFeatureType = function(featureType){
if(!is(featureType, "ISOFeatureType")){
stop("The argument should be an object of class 'ISOFeatureType'")
}
self$featureType <- featureType
},
#'@description Adds constraint
#'@param constraint, object of class \link{ISOConstraint}
#'@return \code{TRUE} if added, \link{FALSE} otherwise
addConstraint = function(constraint){
if(!is(constraint, "ISOConstraint")){
constraint <- ISOConstraint$new(description = constraint)
}
return(self$addListElement("constrainedBy", constraint))
},
#'@description Deletes constraint
#'@param constraint, object of class \link{ISOConstraint}
#'@return \code{TRUE} if deleted, \link{FALSE} otherwise
delConstraint = function(constraint){
if(!is(constraint, "ISOConstraint")){
constraint <- ISOConstraint$new(description = constraint)
}
return(self$delListElement("constrainedBy", constraint))
}
)
)