Learn R Programming

geometa (version 0.2-0)

ISOKeywords: ISOKeywords

Description

ISOKeywords

Usage

ISOKeywords

Arguments

Value

Object of R6Class for modelling a ISO set of keywords

Format

R6Class object.

Fields

keyword

type

Methods

new(xml)

This method is used to instantiate an ISOKeywords

addKeyword(keyword)

Adds a keyword

delKeyword(keyword)

Deletes a keyword

setKeywordType(keywordType)

Sets the keyword type

setThesaurusName(thesaurusName)

Sets the thesaurus name

References

ISO 19115:2003 - Geographic information -- Metadata

Examples

Run this code
# NOT RUN {
#a basic keyword set
  md <- ISOKeywords$new()
  md$addKeyword("keyword1")
  md$addKeyword("keyword2")
  md$setKeywordType("theme")
  th <- ISOCitation$new()
  th$setTitle("General")
  md$setThesaurusName(th)
  xml <- md$encode()

  #a keyword set with anchors
  md <- ISOKeywords$new()
  kwd1 <- ISOAnchor$new(
    name = "keyword1",
    href = "http://myvocabulary.geometa/keyword1"
  )
  md$addKeyword(kwd1)
  kwd2 <- ISOAnchor$new(
    name = "keyword2",
    href = "http://myvocabulary.geometa/keyword2"
  )
  md$addKeyword(kwd2)
  md$setKeywordType("theme")
  xml <- md$encode()
# }

Run the code above in your browser using DataLab