ISOAbstractObject
ISOAbstractObject
R6Class object.
Object of R6Class for modelling an ISO Metadata Element
Abstract ISO Metadata class used internally by geometa
From 2025-05-02, the INSPIRE metadata validation does not require anymore an API Key. Therefore, it is not
required to specify an inspireValidator. To send your metadata to INSPIRE, just set inspire to TRUE.
From 2025-05-02, the INSPIRE metadata validation does not require anymore an API Key. Therefore, it is not
required to specify an inspireValidator. To send your metadata to INSPIRE, just set inspire to TRUE.
getISOStandardByPrefix(prefix)Inherit the ISO (and/or OGC) standard reference for a given standard prefix (e.g. GMD).
The object returned is a data.frame containing the specification reference
and title.
getISOStandard(clazz, version)Inherit the ISO (and/or OGC) standard reference for a given geometa class.
The object returned is a data.frame containing the specification reference
and title.
getISOClasses(extended, pretty)Get the list of classes supported by geometa. By default, extended is
set to FALSE (restrained to geometa environment). If TRUE, this
allows to list eventual classes loaded in your global environment and that extend
geometa classes. The argument pretty gives a the list of classes and
associated ISO/OGC standard information as data.frame.
getISOClassByNode(node)Inherit the ISO class matching an XML document or node
compare(metadataElement1, metadataElement2)Compares two metadata elements objects. Returns TRUE if they are equal, FALSE otherwise. The comparison of object is done by comparing the XML representation of the objects (since no R6 object comparison method seems to exist)
geometa::geometaLogger -> ISOAbstractObject
wrapwrap
elementelement
namespacenamespace
defaultsdefaults
attrsattributes
printAttrsattributes to print
parentAttrsparent attributes
valuevalue
value_as_fieldvalue as field?
isNullis null?
anyElementany element?
new()Initializes object
ISOAbstractObject$new(
xml = NULL,
element = NULL,
namespace = NULL,
attrs = list(),
defaults = list(),
wrap = TRUE,
value_as_field = FALSE
)xmlobject of class XMLInternalNode-class
elementelement name
namespacenamespace
attrsattrs
defaultsdefaults
wrapwrap?
value_as_fieldvalue as field?
checkMetadataStandardCompliance()Check if object can be instantiated vs. the current metadata standard
stopIfMetadataStandardIsNot()Utility to stop in case a the current metadata standard does not match the one required for the code. This utility can be used to check applicability of a certain method, depending on on the current metadata standard.
print()Provides a custom print output (as tree) of the current class
encode()Encodes object as XML.
By default, namespace definition will be added to XML root (addNS = TRUE), and validation
of object will be performed (validate = TRUE) prior to its XML encoding. The argument
strict allows to stop the encoding in case object is not valid, with a default value set to FALSE.
The argument setSerialID is used by geometa to generate automatically serial IDs associated to
XML elements, in particular for GML, default value is TRUE (recommended value).
The argument resetSerialID is used by geometa for reseting mandatory IDs
associated to XML elements, such as GML objects, default value is TRUE
(recommended value).
Setting inspire to TRUE (default FALSE), the metadata will be checked with
the INSPIRE metadata validator (online web-service provided by INSPIRE). To check
metadata with the INSPIRE metadata validator, setting an INSPIRE metadata validator
is now required, and should be specified with the inspireValidator. See
INSPIREMetadataValidator for more details
ISOAbstractObject$encode(
addNS = TRUE,
validate = TRUE,
strict = FALSE,
inspire = FALSE,
inspireValidator = NULL,
resetSerialID = TRUE,
setSerialID = TRUE,
encoding = "UTF-8"
)addNSadd namespace? Default is TRUE
validatevalidate XML output against schemas?
strictstrict validation? Default is FALSE.
inspireperform INSPIRE validation? Default is FALSE
inspireValidatoran object of class INSPIREMetadataValidator to perform INSPIRE metadata validation. Deprecated. See below note.
resetSerialIDreset Serial ID? Default is TRUE
setSerialIDset serial ID? Default is TRUE
encodingencoding. Default is UTF-8
validate()Validates an XML object resulting from object encoding
ISOAbstractObject$validate(
xml = NULL,
strict = FALSE,
inspire = FALSE,
inspireValidator = NULL
)xmlobject of class XMLInternalNode-class
strictstrict validation? If TRUE, a invalid XML will return an error
inspireperform INSPIRE validation? Default is FALSE
inspireValidatoran object of class INSPIREMetadataValidator to perform INSPIRE metadata validation. Deprecated, see below note.
save()Save XML representation resulting from $encode(...) method to a file
wrapBaseElement()Wraps base element
fieldfield name
fieldObjfield object
anobject of class R6Class
setIsNull()Set Is Null
isNullobject of class logical
reasonreason why object is Null
addListElement()Util to add an element to a list of elements for N cardinality of a target element name
delListElement()Util to deleted an element to a list of elements for N cardinality of a target element name
addFieldAttrs()Util add field attributes, over the XML field wrapping element instead of the element itself
isDocument()Util to check where object refers to a emetadata document (eg. ISOMetadata or ISOFeatureCatalogue)
isFieldInheritedFrom()Indicates the class a field inherits from
an object generator of class R6Class