ISODataFile

ISODataFile

Format

R6Class object.

Value

Object of R6Class for modelling an ISO DataFile

References

ISO/TS 19139:2007 Geographic information – XML

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super classes

geometa::geometaLogger -> geometa::ISOAbstractObject -> ISODataFile

Public fields

fileName

fileName [1..1]: ISOFileName

fileDescription

fileDescription [1..1]: character|ISOLocalisedCharacterString

fileType

fileType [1..1]: ISOMimeFileType

featureTypes

featureTypes [0..*]: ISOLocalName|ISOScopedName

fileFormat

fileFormat [1..1]: ISOFormat

Methods

Inherited methods


Method new()

Initializes object

Usage

ISODataFile$new(xml = NULL)

Arguments

xml

object of class XMLInternalNode-class


Method setFileName()

Set file name

Usage

ISODataFile$setFileName(fileName)

Arguments

fileName

object of class ISOFileName


Method setFileDescription()

Set file description

Usage

ISODataFile$setFileDescription(fileDescription, locales = NULL)

Arguments

fileDescription

object of class character

locales

list of localized descriptions. Default is NULL


Method setFileType()

Set file type

Usage

ISODataFile$setFileType(fileType)

Arguments

fileType

object of class ISOMimeFileType


Method addFeatureType()

Adds feature type

Usage

ISODataFile$addFeatureType(featureType)

Arguments

featureType

object of class ISOLocalName, ISOScopedName or character

Returns

TRUE if added, FALSE otherwise


Method delFeatureType()

Deletes feature type

Usage

ISODataFile$delFeatureType(featureType)

Arguments

featureType

object of class ISOLocalName, ISOScopedName or character

Returns

TRUE if deleted, FALSE otherwise


Method setFileFormat()

Set file format

Usage

ISODataFile$setFileFormat(fileFormat)

Arguments

fileFormat

file format, object of class ISOFormat


Method clone()

The objects of this class are cloneable with this method.

Usage

ISODataFile$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

  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")
#> [1] TRUE
  f <- ISOFormat$new()
  f$setName("name")
  f$setVersion("1.0")
  f$setAmendmentNumber("2")
  f$setSpecification("specification")
  md$setFileFormat(f)
  xml <- md$encode()
#> [geometa][WARN] Element '{http://www.isotc211.org/2005/gmx}MX_DataFile': No matching global declaration available for the validation root at line 1. 
#> [geometa][WARN] Object 'ISODataFile' is INVALID according to ISO 19139 XML schemas!