ISOLineage

ISOLineage

Format

R6Class object.

Value

Object of R6Class for modelling an ISO Lineage

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super classes

geometa::geometaLogger -> geometa::ISOAbstractObject -> ISOLineage

Public fields

statement

statement [0..1]: character

processStep

processStep [0..*]: ISOProcessStep

source

source [0..*]: ISOSource

Methods

Inherited methods


Method new()

Initializes object

Usage

ISOLineage$new(xml = NULL)

Arguments

xml

object of class XMLInternalNode-class


Method setStatement()

Set statement

Usage

ISOLineage$setStatement(statement, locales = NULL)

Arguments

statement

statement

locales

list of localized texts. Default is NULL


Method addProcessStep()

Adds process step

Usage

ISOLineage$addProcessStep(processStep)

Arguments

processStep

object of class ISOProcessStep

Returns

TRUE if added, FALSE otherwise


Method delProcessStep()

Deletes process step

Usage

ISOLineage$delProcessStep(processStep)

Arguments

processStep

object of class ISOProcessStep

Returns

TRUE if deleted, FALSE otherwise


Method addSource()

Adds source

Usage

ISOLineage$addSource(source)

Arguments

source

object of class ISOSource

Returns

TRUE if added, FALSE otherwise


Method delSource()

Deletes source

Usage

ISOLineage$delSource(source)

Arguments

source

object of class ISOSource

Returns

TRUE if deleted, FALSE otherwise


Method clone()

The objects of this class are cloneable with this method.

Usage

ISOLineage$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

  lineage <- ISOLineage$new()
  lineage$setStatement("statement")
  
  #add a process step
  ps <- ISOProcessStep$new()
  ps$setDescription("description")
  ps$setRationale("rationale")
  ps$setDateTime( ISOdate(2015, 1, 1, 23, 59, 59))
  rp <- ISOResponsibleParty$new()
  rp$setIndividualName("someone") #and more responsible party properties..
  ps$addProcessor(rp)
#> [1] TRUE
  lineage$addProcessStep(ps)
#> [1] TRUE
  
  #add a source
  src <- ISOSource$new()
  src$setDescription("description")
  src$setScaleDenominator(1L)
  rs <- ISOReferenceSystem$new()
  rsId <- ISOReferenceIdentifier$new(code = "4326", codeSpace = "EPSG")
  rs$setReferenceSystemIdentifier(rsId)
  src$setReferenceSystem(rs)
  cit <- ISOCitation$new()
  cit$setTitle("sometitle") #and more citation properties...
  src$setCitation(cit)
  extent <- ISOExtent$new()
  bbox <- ISOGeographicBoundingBox$new(minx = -180, miny = -90, maxx = 180, maxy = 90)
  extent$addGeographicElement(bbox)
#> [1] TRUE
  src$addExtent(extent)
#> [1] TRUE
  lineage$addSource(src)
#> [1] TRUE
  
  xml <- lineage$encode()
#> [geometa][WARN] Element '{http://www.isotc211.org/2005/gmd}CI_ResponsibleParty': Missing child element(s). Expected is one of ( {http://www.isotc211.org/2005/gmd}organisationName, {http://www.isotc211.org/2005/gmd}positionName, {http://www.isotc211.org/2005/gmd}contactInfo, {http://www.isotc211.org/2005/gmd}role ) at line 17. 
#> [geometa][WARN] Element '{http://www.isotc211.org/2005/gmd}CI_Citation': Missing child element(s). Expected is one of ( {http://www.isotc211.org/2005/gmd}alternateTitle, {http://www.isotc211.org/2005/gmd}date ) at line 52. 
#> [geometa][WARN] Object 'ISOLineage' is INVALID according to ISO 19139 XML schemas!