AtomAbstractObject | R Documentation |
This class models an atom abstract object
R6Class
object.
AtomAbstractObject
Object of R6Class
for modelling an Atom abstract Object
atom4R::atom4RLogger
-> AtomAbstractObject
wrap
wrapping XML element
element
element
namespace
namespace
defaults
defaults
attrs
attrs
printAttrs
attrs to print
parentAttrs
parent attrs
new()
Initializes an object of class AtomAbstractObject
AtomAbstractObject$new( xml = NULL, element = NULL, namespace = NULL, attrs = list(), defaults = list(), wrap = TRUE, logger = "INFO" )
xml
object of class XMLInternalNode-class
element
element
namespace
namespace
attrs
attrs
defaults
defaults
wrap
wrap
logger
logger type
setIsDocument()
Set if object is a document or not
AtomAbstractObject$setIsDocument(isDocument)
isDocument
object of class logical
isDocument()
Informs if the object is a document
AtomAbstractObject$isDocument()
object of class logical
getRootElement()
Get root XML element
AtomAbstractObject$getRootElement()
object of class character
getNamespace()
Get XML namespace
AtomAbstractObject$getNamespace()
object of class character
createElement()
Creates an element
AtomAbstractObject$createElement(element, type = "text")
element
element
type
type. Default is "text"
the typed element
addListElement()
Add a metadata element to an element list
AtomAbstractObject$addListElement(field, metadataElement)
field
field
metadataElement
metadata element to add
TRUE
if added, FALSE
otherwise
delListElement()
Deletes a metadata element from an element list
AtomAbstractObject$delListElement(field, metadataElement)
field
field
metadataElement
metadata element to add
TRUE
if deleted, FALSE
otherwise
contains()
Indicates if an element list contains or not an element
AtomAbstractObject$contains(field, metadataElement)
field
field
metadataElement
metadata element to add
TRUE
if contained, FALSE
otherwise
print()
Prints the element
AtomAbstractObject$print(..., depth = 1)
...
any parameter to pass to print method
depth
printing depth
decode()
Decodes the object from an XML representation
AtomAbstractObject$decode(xml)
xml
object of class XMLInternalNode-class from XML
encode()
Encodes the object as XML
AtomAbstractObject$encode( addNS = TRUE, validate = TRUE, strict = FALSE, encoding = "UTF-8" )
addNS
whether namespace has to be added. Default is TRUE
validate
whether validation has to be done vs. XML schemas. Default is TRUE
strict
whether strict validation has to be operated (raise an error if invalid). Default is FALSE
encoding
encoding. Default is "UTF-8"
validate()
Validates the object / XML vs. XML schemas
AtomAbstractObject$validate(xml = NULL, strict = FALSE)
xml
object of class XMLInternalNode-class from XML
strict
strict validation or not
TRUE
if valid, FALSE
otherwise
save()
Saves the object as XML file
AtomAbstractObject$save(file, ...)
file
file name
...
any parameter to pass to encode()
method
isFieldInheritedFrom()
Indicates the class from which field is inherited
AtomAbstractObject$isFieldInheritedFrom(field)
field
field
an object of class R6Class, or NULL
getClassName()
Get class name
AtomAbstractObject$getClassName()
object of class character
getClass()
Get class
AtomAbstractObject$getClass()
object of class R6Class
getNamespaceDefinition()
Get namespace definition
AtomAbstractObject$getNamespaceDefinition(recursive = FALSE)
recursive
recursive
a named list
of the XML namespaces
getXmlElement()
Get XML element name
AtomAbstractObject$getXmlElement()
object of class character
clone()
The objects of this class are cloneable with this method.
AtomAbstractObject$clone(deep = FALSE)
deep
Whether to make a deep clone.
abstract class used internally by atom4R
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.