ISOFeatureType19115_3

ISOFeatureType19115_3

Format

R6Class object.

Value

Object of R6Class for modelling an ISO FeatureType in ISO 19115-3

References

- ISO 19110 - GFC 1.1 https://schemas.isotc211.org/19110/gfc/1.1/gfc/#element_FC_FeatureType

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super classes

geometa::geometaLogger -> geometa::ISOAbstractObject -> geometa::ISOFeatureType -> ISOFeatureType19115_3

Public fields

typeName

typeName [1..1]: character

definition

definition [0..1]: character

code

code [0..1]: character

isAbstract

isAbstract [1..1]: logical

aliases

aliases [0..*]: character

designation

designation [0..1]: character

carrierOfCharacteristics

carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics

inheritsFrom

inheritsFrom [0..*]: ISOInheritanceRelation

inheritsTo

inheritsTo [0..*]: ISOInheritanceRelation

constrainedBy

constrainedBy [0..*]: ISOConstraint

definitionReference

definitionReference [0..*]: ISODefinitionReference

featureCatalogue

featureCatalogue: ISOFeatureCatalogue

Methods

Inherited methods


Method new()

Initializes object

Usage

ISOFeatureType19115_3$new(xml = NULL)

Arguments

xml

object of class XMLInternalNode-class


Method setTypeName()

Set type name

Usage

ISOFeatureType19115_3$setTypeName(typeName)

Arguments

typeName

type name, object of class character


Method setDefinition()

Set definition

Usage

ISOFeatureType19115_3$setDefinition(definition, locales = NULL)

Arguments

definition

definition

locales

list of localized definitions. Default is NULL


Method setCode()

Set code

Usage

ISOFeatureType19115_3$setCode(code, locales = NULL)

Arguments

code

definition

locales

list of localized codes. Default is NULL


Method setIsAbstract()

Set whether feature type is abstract

Usage

ISOFeatureType19115_3$setIsAbstract(isAbstract)

Arguments

isAbstract

object of class logical


Method addAlias()

Adds alias

Usage

ISOFeatureType19115_3$addAlias(alias)

Arguments

alias

object of class ISOLocalName (in ISO 19139 only) or character (in ISO 19139 or ISO 19115-3)

Returns

TRUE if added, FALSE otherwise


Method delAlias()

Usage

ISOFeatureType19115_3$delAlias(alias)

Arguments

alias

object of class ISOLocalName (in ISO 19139 only) or character (in ISO 19139 or ISO 19115-3)

Returns

TRUE if deleted, FALSE otherwise


Method setDesignation()

Set designation

Usage

ISOFeatureType19115_3$setDesignation(designation, locales = NULL)

Arguments

designation

designation

locales

list of localized designations. Default is NULL


Method addCharacteristic()

Adds characteristic

Usage

ISOFeatureType19115_3$addCharacteristic(characteristic)

Arguments

characteristic

characteristic, object inheriting class ISOAbstractCarrierOfCharacteristics

Returns

TRUE if added, FALSE otherwise


Method delCharacteristic()

Deletes characteristic

Usage

ISOFeatureType19115_3$delCharacteristic(characteristic)

Arguments

characteristic

characteristic, object inheriting class ISOAbstractCarrierOfCharacteristics

Returns

TRUE if deleted, FALSE otherwise


Method addInheritsFrom()

Adds 'inheritsFrom' relation

Usage

ISOFeatureType19115_3$addInheritsFrom(rel)

Arguments

rel

rel, object of class ISOInheritanceRelation

Returns

TRUE if added, FALSE otherwise


Method delInheritsFrom()

Deletes 'inheritsFrom' relation

Usage

ISOFeatureType19115_3$delInheritsFrom(rel)

Arguments

rel

rel, object of class ISOInheritanceRelation

Returns

TRUE if deleted, FALSE otherwise


Method addInheritsTo()

Adds 'inheritsTo' relation

Usage

ISOFeatureType19115_3$addInheritsTo(rel)

Arguments

rel

rel, object of class ISOInheritanceRelation

Returns

TRUE if added, FALSE otherwise


Method delInheritsTo()

Deletes 'inheritsTo' relation

Usage

ISOFeatureType19115_3$delInheritsTo(rel)

Arguments

rel

rel, object of class ISOInheritanceRelation

Returns

TRUE if deleted, FALSE otherwise


Method addConstraint()

Adds constraint

Usage

ISOFeatureType19115_3$addConstraint(constraint)

Arguments

constraint

constraint, object of class ISOConstraint

Returns

TRUE if added, FALSE otherwise


Method delConstraint()

Deletes constraint

Usage

ISOFeatureType19115_3$delConstraint(constraint)

Arguments

constraint

constraint, object of class ISOConstraint

Returns

TRUE if deleted, FALSE otherwise


Method setDefinitionReference()

Set definition reference

Usage

ISOFeatureType19115_3$setDefinitionReference(definitionReference)

Arguments

definitionReference

object of class ISODefinitionReference


Method setFeatureCatalogue()

Set feature catalogue

Usage

ISOFeatureType19115_3$setFeatureCatalogue(fc)

Arguments

fc

object of class ISOFeatureCatalogue


Method clone()

The objects of this class are cloneable with this method.

Usage

ISOFeatureType19115_3$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# \dontrun{
 setMetadataStandard("19115-3") #required
#> Loading ISO 19115-3 codelists...
 #featuretype
 md <- ISOFeatureType$new()
 md$setTypeName("typeName")
 md$setDefinition("definition")
 md$setDesignation("designation")
 md$setCode("code")
 md$setIsAbstract(FALSE)
 md$addAlias("alias1")
#> [1] TRUE
 md$addAlias("alias2")
#> [1] TRUE
 
 #add feature attributes
 for(i in 1:3){
   #create attribute
   fat <- ISOFeatureAttribute$new()
   fat$setMemberName(sprintf("name %s",i))
   fat$setDefinition(sprintf("definition %s",i))
   fat$setCardinality(lower=1,upper=1)
   fat$setCode(sprintf("code %s",i))
   
   #add measurement unit
   gml <- GMLBaseUnit$new(id = "ID%")
   gml$setDescriptionReference("someref")
   gml$setIdentifier("identifier", "codespace")
   gml$addName("name1", "codespace")
   gml$addName("name2", "codespace")
   gml$setQuantityTypeReference("someref")
   gml$setCatalogSymbol("symbol")
   gml$setUnitsSystem("somelink")
   fat$setValueMeasurementUnit(gml)
   
   #add listed values
   val1 <- ISOListedValue$new()
   val1$setCode("code1")
   val1$setLabel("label1")
   val1$setDefinition("definition1")
   fat$addListedValue(val1)
   val2 <- ISOListedValue$new()
   val2$setCode("code2")
   val2$setLabel("label2")
   val2$setDefinition("definition2")
   fat$addListedValue(val2)
   fat$setValueType("typeName")
   
   #add feature attribute as carrierOfCharacteristic
   md$addCharacteristic(fat)
 }
 xml <- md$encode()
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': Element content is not allowed, because the type definition is simple at line 30. 
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': '' is not a valid value of the union type '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifierType' at line 30. 
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': Element content is not allowed, because the type definition is simple at line 92. 
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': '' is not a valid value of the union type '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifierType' at line 92. 
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': Element content is not allowed, because the type definition is simple at line 154. 
#> [geometa][WARN] Element '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifier': '' is not a valid value of the union type '{http://standards.iso.org/iso/19115/-3/gco/1.0}UomIdentifierType' at line 154. 
#> [geometa][WARN] Object 'ISOFeatureType19115_3' is INVALID according to ISO 19115-3 XML schemas! 
 setMetadataStandard("19139") 
 # }