AtomEntry {atom4R}R Documentation

Atom Entry class

Description

This class models an atom Entry

Format

R6Class object.

Details

AtomEntry

Value

Object of R6Class for modelling an Atom Entry

Super classes

atom4R::atom4RLogger -> atom4R::AtomAbstractObject -> AtomEntry

Public fields

id

identifier

updated

Update date/time

published

Publication date/time

title

Title

summary

Summary

rights

Rights

source

Source

author

Author(s)

contributor

Contributor(s)

category

Category

content

Content

Methods

Public methods

Inherited methods

Method new()

Initializes an AtomEntry

Usage
AtomEntry$new(xml = NULL)
Arguments
xml

object of class XMLInternalNode-class from XML


Method setId()

Set ID

Usage
AtomEntry$setId(id)
Arguments
id

id


Method setUpdated()

Set updated date

Usage
AtomEntry$setUpdated(updated)
Arguments
updated

object of class Date or POSIXt


Method setPublished()

Set published date

Usage
AtomEntry$setPublished(published)
Arguments
published

object of class Date or POSIXt


Method setTitle()

Set title

Usage
AtomEntry$setTitle(title, type = "text")
Arguments
title

title

type

type. Default is "text"


Method setSummary()

Set summary

Usage
AtomEntry$setSummary(summary, type = "text")
Arguments
summary

summary

type

type. Default is "text"


Method setRights()

Set rights

Usage
AtomEntry$setRights(rights, type = "text")
Arguments
rights

rights

type

type. Default is "text"


Method setSource()

Set source

Usage
AtomEntry$setSource(source, type = "text")
Arguments
source

source

type

type. Default is "text"


Method addAuthor()

Adds author

Usage
AtomEntry$addAuthor(author)
Arguments
author

object of class AtomAuthor

Returns

TRUE if added, FALSE otherwise


Method delAuthor()

Deletes author

Usage
AtomEntry$delAuthor(author)
Arguments
author

object of class AtomAuthor

Returns

TRUE if deleted, FALSE otherwise


Method addContributor()

Adds contributor

Usage
AtomEntry$addContributor(contributor)
Arguments
contributor

object of class AtomContributor

Returns

TRUE if added, FALSE otherwise


Method delContributor()

Deletes contributor

Usage
AtomEntry$delContributor(contributor)
Arguments
contributor

object of class AtomContributor

Returns

TRUE if deleted, FALSE otherwise


Method addCategory()

Adds category

Usage
AtomEntry$addCategory(value, term, scheme = NULL, label = NULL)
Arguments
value

value

term

term

scheme

scheme

label

label

Returns

TRUE if added, FALSE otherwise


Method delCategory()

Deletes category

Usage
AtomEntry$delCategory(value, term, scheme = NULL, label = NULL)
Arguments
value

value

term

term

scheme

scheme

label

label

Returns

TRUE if deleted, FALSE otherwise


Method addLink()

Adds link

Usage
AtomEntry$addLink(link, rel = "alternate", type = "text/html")
Arguments
link

link

rel

relation. Default is "alternate"

type

type. Default is "text/html"

Returns

TRUE if added, FALSE otherwise


Method delLink()

Deletes link

Usage
AtomEntry$delLink(link, rel = "alternate", type = "text/html")
Arguments
link

link

rel

relation. Default is "alternate"

type

type. Default is "text/html"

Returns

TRUE if deleted, FALSE otherwise


Method setContent()

Set content

Usage
AtomEntry$setContent(content)
Arguments
content

content


Method clone()

The objects of this class are cloneable with this method.

Usage
AtomEntry$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Examples

 ## Not run: 
  #encoding
  atom <- AtomEntry$new()
  atom$setId("my-atom-entry")
  atom$setTitle("My Atom feed entry")
  atom$setSummary("My Atom feed entry very comprehensive abstract")
  author1 <- AtomAuthor$new(
    name = "John Doe",
    uri = "http://www.atomxml.com/johndoe",
    email = "johndoe@atom4R.com"
  )
  atom$addAuthor(author1)
  author2 <- AtomAuthor$new(
    name = "John Doe's sister",
    uri = "http://www.atomxml.com/johndoesister",
    email = "johndoesister@atom4R.com"
  )
  atom$addAuthor(author2)
  contrib1 <- AtomContributor$new(
    name = "Contrib1",
    uri = "http://www.atomxml.com/contrib1",
    email = "contrib1@atom4R.com"
  )
  atom$addContributor(contrib1)
  contrib2 <- AtomContributor$new(
    name = "Contrib2",
    uri = "http://www.atomxml.com/contrib2",
    email = "contrib2@atom4R.com"
  )
  atom$addContributor(contrib2)
  atom$addCategory("draft", "dataset")
  atom$addCategory("world", "spatial")
  atom$addCategory("fisheries", "domain")

  xml <- atom$encode()
 
## End(Not run)


[Package atom4R version 0.3-3 Index]