Represents the provenance of a Synapse Entity.

Format

An R6 class object.

Methods

Details

The used method tries to be as permissive as possible. It accepts a string which might be a synapse ID or a URL, a synapse entity or a list containing any combination of these. Also allowed are (1) a named list with fields 'target' and 'targetVersion' or 'url' and 'name'. See the examples below.

Examples

# NOT RUN {
# Entity examples:
#
activity$used('syn12345')
activity$used(entity)
activity$used(target=entity, targetVersion=2)
activity$used(codeEntity, wasExecuted=TRUE)

# URL examples:
# 
activity$used('http://mydomain.com/my/awesome/data.RData')
activity$used(url='http://mydomain.com/my/awesome/data.RData', name='Awesome Data')
activity$used(url='https://github.com/joe_hacker/code_repo', name='Gnarly hacks', wasExecuted=TRUE)
activity$used(list(url='https://github.com/joe_hacker/code_repo', name='Gnarly hacks'), wasExecuted=TRUE)

# In case of conflicting settings for wasExecuted both inside an object and with a
# parameter, the parameter wins. For example, this UsedURL will have wasExecuted set
# to FALSE:
#
activity$used(list(url='http://google.com', name='Goog', wasExecuted=TRUE), wasExecuted=FALSE)
# }