Learn R Programming

geometa (version 0.6-2)

ISODataFile: ISODataFile

Description

ISODataFile

Usage

ISODataFile

Arguments

Value

Object of R6Class for modelling an ISO DataFile

Format

R6Class object.

Methods

new(xml)

This method is used to instantiate an ISODataFile

setFileName(fileName)

Set the file name, object of class ISOFileName

setFileDescription(fileDescription, locales)

Set the file description, object of class 'character'. Locale names can be specified as list with the locales argument.

setFileType(type)

Set the file type, object of class ISOMimeFileType.

addFeatureType(featureType)

Add a feature type, object of class ISOLocalName or link{ISOScopedName}, or eventually a 'character' in which case the featureType will be coerced to a local name.

delFeatureType(featureType)

Deletes a feature type, object of class ISOLocalName or link{ISOScopedName}, or eventually a 'character' in which case the featureType will be coerced to a local name.

setFileFormat(fileFormat)

Set the file format, object of class ISOFormat

References

ISO/TS 19139:2007 Geographic information -- XML

Examples

Run this code
# NOT RUN {
  md <- ISODataFile$new()
  md$setFileName(ISOFileName$new(file = "someuri", name = "filename"))
  md$setFileDescription("description")
  md$setFileType(ISOMimeFileType$new(type = "somemimetype", name = "Mime type name"))
  md$addFeatureType("feature_type")
  f <- ISOFormat$new()
  f$setName("name")
  f$setVersion("1.0")
  f$setAmendmentNumber("2")
  f$setSpecification("specification")
  md$setFileFormat(f)
  xml <- md$encode()

# }

Run the code above in your browser using DataLab