DataPackage-class: A class representing a data package

Description Slots Methods See Also

Description

The DataPackage class provides methods for adding and extracting data objects from a data package. The contents of a data package can include arbitrary types of objects, including data files, program code, visualizations and images, animations, and any other type of file. The DataPackage class stores the individual members of the data package along with key system-level metadata about each object, including its size, checksum, identifier, and other key information needed to effectively archive the members of the package. In addition, the DataPackage class can include key provenance metadata about the relationships among the objects in the data package. For example, the data package can document that one object provides documentation for another (cito:documents), and that one object was derived from another (prov:wasDerivedFrom) by executing a program that used source data (prov:used) to create a derived data object prov:wasGeneratedBy. These relationships are integral to the data package, and can be visualized by programs that understand the ProvONE provenance model (see https://purl.dataone.org/provone-v1-dev).

The DataPackage class is an R representation of an underlying Open Archives Initiative ORE model (Object Reuse and Exchange; see https://www.openarchives.org/ore/), and follows the DataONE Data Packaging model (see https://releases.dataone.org/online/api-documentation-v2.0.1/design/DataPackage.html).

Slots

relations

A hash containing provenance relationships of package objects

objects

A hash containing identifiers for objects in the DataPackage

sysmeta

A SystemMetadata class instance describing the package

externalIds

A list containing identifiers for objects associated with the DataPackage

Methods

  • initialize: Initialize a DataPackage object

  • getData: Get the data content of a specified data object

  • getSize: Get the Count of Objects in the DataPackage

  • getIdentifiers: Get the Identifiers of DataPackage members

  • addData: Add a DataObject to the DataPackage

  • insertRelationship: Insert relationships between objects in a DataPackage

  • getRelationships: Retrieve relationships of data package objects

  • containsId: Returns true if the specified object is a member of the data package

  • removeMember: Remove the Specified Member from the DataPackage

  • getMember: Return the DataPackage Member by Identifier

  • serializePackage: Create an OAI-ORE resource map from the data package

  • serializeToBagIt: Serialize A DataPackage into a BagIt Archive File

  • describeWorkflow: Add data derivation information to a DataPackage

See Also

datapack



Search within the datapack package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.