R/GeoSpatialDataSet.R

#' An S4 class to represent a set of geo-spatial data
#'
#' @slot name The name of the datatset
#' @slot spatialExtent An instance of the class SpatialExtent
#' @slot temporalExtent An instance of the class TemporalExtent
setClass (
  Class = "GeoSpatialDataSet",
  representation = representation(
    
    name = "character", 
    spatialExtent = "SpatialExtent", 
    temporalExtent = "TemporalExtent"

  ),
  validity = function(object){
    cat("~~~ GeoSpatialDataSet: inspector ~~~ \n")
    
    name <- object@name
    spatialExtent <- object@spatialExtent
    temporalExtent <- object@temporalExtent
    
    if(length(object@name) != 1){
      stop ("[GeoSpatialDataSet: validation] Only one name allowed")
    }else{}
    return(TRUE)
  }
)
jimjonesbr/sdd documentation built on May 19, 2019, 10:34 a.m.