ISOLegalConstraints

ISOLegalConstraints

Format

R6Class object.

Value

Object of R6Class for modelling an ISO LegalConstraints

References

ISO 19115:2003 - Geographic information – Metadata

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Public fields

accessConstraints

accessConstraints [0..*]: ISORestriction

useConstraints

useConstraints [0..*]: ISORestriction

otherConstraints

otherConstraints [0..*]: character

Methods

Inherited methods


Method new()

Initializes object

Usage

ISOLegalConstraints$new(xml = NULL)

Arguments

xml

object of class XMLInternalNode-class


Method addAccessConstraint()

Adds access constraint

Usage

ISOLegalConstraints$addAccessConstraint(constraint)

Arguments

constraint

object of class ISORestriction

Returns

TRUE if added, FALSE otherwise


Method delAccessConstraint()

Deletes access constraint

Usage

ISOLegalConstraints$delAccessConstraint(constraint)

Arguments

constraint

object of class ISORestriction

Returns

TRUE if deleted, FALSE otherwise


Method addUseConstraint()

Adds use constraint

Usage

ISOLegalConstraints$addUseConstraint(constraint)

Arguments

constraint

object of class ISORestriction

Returns

TRUE if added, FALSE otherwise


Method delUseConstraint()

Deletes use constraint

Usage

ISOLegalConstraints$delUseConstraint(constraint)

Arguments

constraint

object of class ISORestriction

Returns

TRUE if deleted, FALSE otherwise


Method addOtherConstraint()

Adds other constraint

Usage

ISOLegalConstraints$addOtherConstraint(constraint, locales = NULL)

Arguments

constraint

object of class character

locales

list of localized names. Default is NULL

Returns

TRUE if added, FALSE otherwise


Method delOtherConstraint()

Deletes other constraint

Usage

ISOLegalConstraints$delOtherConstraint(constraint, locales = NULL)

Arguments

constraint

object of class character

locales

list of localized names. Default is NULL

Returns

TRUE if deleted, FALSE otherwise


Method clone()

The objects of this class are cloneable with this method.

Usage

ISOLegalConstraints$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

  #create object
  md <- ISOLegalConstraints$new()
  md$addUseLimitation("limitation1")
#> [1] TRUE
  md$addUseLimitation("limitation2")
#> [1] TRUE
  md$addUseLimitation("limitation3")
#> [1] TRUE
  md$addAccessConstraint("copyright")
#> [1] TRUE
  md$addAccessConstraint("license")
#> [1] TRUE
  md$addUseConstraint("copyright")
#> [1] TRUE
  md$addUseConstraint("license")
#> [1] TRUE
  
  xml <- md$encode()
#> [geometa][INFO] Object 'ISOLegalConstraints' is VALID according to ISO 19139 XML schemas!