A minimal data object.
More...
#include <dxrecord.h>
|
| | DXRecord (const char *dxid, const char *proj=NULL) |
| | DXRecord (const std::string &dxid, const std::string &proj=config::CURRENT_PROJECT()) |
| | DXRecord (const dx::JSON &dxlink) |
| void | create (const dx::JSON &data_obj_fields=dx::JSON(dx::JSON_OBJECT)) |
| void | create (const DXRecord &init_from, const dx::JSON &data_obj_fields=dx::JSON(dx::JSON_OBJECT)) |
| DXRecord | clone (const std::string &dest_proj_id, const std::string &dest_folder="/") const |
| | DXDataObject (const DXDataObject &to_copy) |
| | DXDataObject (const std::string &dxid) |
| | DXDataObject (const std::string &dxid, const std::string &proj) |
| std::string | getID () const |
| | operator std::string () |
| std::string | getProjectID () const |
| virtual void | setIDs (const std::string &dxid, const std::string &proj="default") |
| virtual void | setIDs (const char *dxid, const char *proj=NULL) |
| virtual void | setIDs (const JSON &dxlink) |
| JSON | describe (bool incl_properties=false, bool incl_details=false) const |
| void | addTypes (const JSON &types) const |
| void | removeTypes (const JSON &types) const |
| JSON | getDetails () const |
| void | setDetails (const JSON &details) const |
| void | hide () const |
| void | unhide () const |
| void | rename (const std::string &name) const |
| void | setProperties (const JSON &properties) const |
| JSON | getProperties () const |
| void | addTags (const JSON &tags) const |
| void | removeTags (const JSON &tags) const |
| virtual void | close () const |
| JSON | listProjects () const |
| void | move (const std::string &dest_folder) const |
| void | remove () |
|
| static DXRecord | newDXRecord (const dx::JSON &data_obj_fields=dx::JSON(dx::JSON_OBJECT)) |
| static DXRecord | newDXRecord (const DXRecord &init_from, const dx::JSON &data_obj_fields=dx::JSON(dx::JSON_OBJECT)) |
|
|
void | waitOnState (const std::string &state="closed", const int timeout=std::numeric_limits< int >::max()) const |
| void | clone_ (const std::string &dest_proj_id, const std::string &dest_folder) const |
|
std::string | dxid_ |
|
std::string | proj_ |
A minimal data object.
A record stores no additional data, nor does it have any additional routes beyond those common to all data objects. A record object can store data in its details (see DXDataObject::setDetails and DXDataObject::getDetails) and can thereby act as an object containing metadata and links to other objects.
◆ DXRecord() [1/3]
| dx::DXRecord::DXRecord |
( |
const char * | dxid, |
|
|
const char * | proj = NULL ) |
|
inline |
Creates a new DXRecord handler for the specified remote record object.
- Parameters
-
| dxid | Record ID. |
| proj | ID of the project in which to access the object (if NULL, then default workspace will be used). |
◆ DXRecord() [2/3]
| dx::DXRecord::DXRecord |
( |
const std::string & | dxid, |
|
|
const std::string & | proj = config::CURRENT_PROJECT() ) |
|
inline |
Creates a new DXRecord handler for the specified remote record object.
- Parameters
-
| dxid | Record ID. |
| proj | ID of the project in which to access the object. |
◆ DXRecord() [3/3]
| dx::DXRecord::DXRecord |
( |
const dx::JSON & | dxlink | ) |
|
|
inline |
Creates a new DXRecord handler for the specified remote record object.
- Parameters
-
| dxlink | A JSON representing a DNAnexus link. You may also use the extended form: {"$dnanexus_link": {"project": proj-id, "id": obj-id}}. |
◆ clone()
| DXRecord dx::DXRecord::clone |
( |
const std::string & | dest_proj_id, |
|
|
const std::string & | dest_folder = "/" ) const |
Clones the remote record into the specified project and folder.
- Parameters
-
| dest_proj_id | ID of the project to which the object should be cloned. |
| dest_folder | Folder route in which to put it in the destination project. |
- Returns
- New object handler with the associated project set to dest_proj_id.
◆ create() [1/2]
| void dx::DXRecord::create |
( |
const dx::JSON & | data_obj_fields = dx::JSON(dx::JSON_OBJECT) | ) |
|
Creates a new remote record object. The handler is updated with the object ID.
- Parameters
-
| data_obj_fields | JSON containing the optional fields with which to create the object ("project", "types", "details", "hidden", "name", "properties", "tags"), as provided to the /record/new API method. |
◆ create() [2/2]
| void dx::DXRecord::create |
( |
const DXRecord & | init_from, |
|
|
const dx::JSON & | data_obj_fields = dx::JSON(dx::JSON_OBJECT) ) |
Creates a new remote record object, initializing it from the specified record (and overriding with any values that are present in data_obj_fields). The handler is updated with the object ID.
- Parameters
-
| init_from | a DXRecord from which to initialize the metadata |
| data_obj_fields | JSON containing the optional fields with which to create the object ("project", "types", "details", "hidden", "name", "properties", "tags"), as provided to the /record/new API method. |
◆ newDXRecord() [1/2]
| DXRecord dx::DXRecord::newDXRecord |
( |
const dx::JSON & | data_obj_fields = dx::JSON(dx::JSON_OBJECT) | ) |
|
|
static |
Creates a new remote record. Returns a handler for the new object.
- Parameters
-
| data_obj_fields | JSON containing the optional fields with which to create the object ("project", "types", "details", "hidden", "name", "properties", "tags"), as provided to the /record/new API method. |
- Returns
- A DXRecord remote object handler.
◆ newDXRecord() [2/2]
| DXRecord dx::DXRecord::newDXRecord |
( |
const DXRecord & | init_from, |
|
|
const dx::JSON & | data_obj_fields = dx::JSON(dx::JSON_OBJECT) ) |
|
static |
Creates a new remote record object, initializing it from the specified record (and overriding with any values that are present in data_obj_fields). Returns a handler for the new remote object.
- Parameters
-
| init_from | a DXRecord from which to initialize the metadata. |
| data_obj_fields | JSON containing the optional fields with which to create the object ("project", "types", "details", "hidden", "name", "properties", "tags"), as provided to the /record/new API method. |
- Returns
- A DXRecord remote object handler.
The documentation for this class was generated from the following files:
- cpp/dxcpp/bindings/dxrecord.h
- cpp/dxcpp/bindings/dxrecord.cc