![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/XNAT/Core/ctkXnatObject.h>
Public Member Functions | |
void | add (ctkXnatObject *child) |
Adds an object to the children of the current one. More... | |
virtual ctkXnatResource * | addResourceFolder (QString foldername, QString format="", QString content="", QString tags="") |
virtual QString | childDataType () const |
Gets a human readable name of the child object type. More... | |
QList< ctkXnatObject * > | children () const |
Gets the children of the object. More... | |
QString | description () const |
Gets the description of the object. More... | |
void | download (const QString &) |
void | erase () |
Deletes the object on the XNAT server and removes it from its parent. More... | |
bool | exists () const |
Checks if the object exists on the XNAT server. More... | |
void | fetch (bool forceFetch=false) |
Fetches the children and the properties of the object. More... | |
virtual QString | id () const |
Gets the global ID of the object. More... | |
bool | isFetched () const |
Tells if the children and the properties of the objects have been fetched. More... | |
virtual QDateTime | lastModifiedTimeOnServer () |
Gets the last modification time from the server. More... | |
virtual QString | name () const |
Gets the name of the object. More... | |
ctkXnatObject * | parent () const |
const QMap< QString, QString > & | properties () const |
Gets the properties of the object. More... | |
QString | property (const QString &name) const |
Gets the value of the property with the given name. More... | |
void | remove (ctkXnatObject *child) |
Removes the object from the children of the current object. More... | |
virtual void | reset () |
virtual QString | resourceUri () const =0 |
void | save (bool overwrite=true) |
QString | schemaType () const |
void | setDescription (const QString &description) |
Sets the description of the object. More... | |
virtual void | setId (const QString &id) |
void | setLastModifiedTime (const QDateTime &lastModifiedTime) |
Sets the last modfication time on the server. More... | |
virtual void | setName (const QString &name) |
Sets the name of the object. More... | |
void | setParent (ctkXnatObject *parent) |
Sets the parent of the object in the data hierarchy. More... | |
void | setProperty (const QString &name, const QVariant &value) |
Sets the value of the property with the given name. More... | |
virtual | ~ctkXnatObject () |
Destructs the ctkXnatObject. More... | |
Static Public Attributes | |
static const QString | ID |
static const QString | LABEL |
static const QString | NAME |
static const QString | URI |
static const QString | XSI_SCHEMA_TYPE |
Protected Member Functions | |
ctkXnatObject (const ctkXnatObject &) | |
ctkXnatObject (ctkXnatObject *parent=0, const QString &schemaType=QString::null) | |
Constructs the ctkXnatObject. More... | |
ctkXnatObject (ctkXnatObjectPrivate &dd, ctkXnatObject *parent=0, const QString &schemaType=QString::null) | |
Constructs the ctkXnatObject with the given private part. More... | |
virtual void | fetchResources (const QString &path="/resources") |
Fetches the resources of the object. More... | |
ctkXnatSession * | session () const |
Protected Attributes | |
const QScopedPointer< ctkXnatObjectPrivate > | d_ptr |
The private implementation part of the object. More... | |
Friends | |
class | ctkXnatSessionPrivate |
ctkXnatObject is the base class of the objects that represent the nodes in the XNAT data hierarchy.
Definition at line 44 of file ctkXnatObject.h.
|
virtual |
Destructs the ctkXnatObject.
|
protected |
|
protected |
Constructs the ctkXnatObject.
|
protected |
Constructs the ctkXnatObject with the given private part.
void ctkXnatObject::add | ( | ctkXnatObject * | child | ) |
Adds an object to the children of the current one.
|
virtual |
Creates a new resource folder with the given foldername, format, content and tags for this ctkXnatObject on the server.
foldername | the name of the resource folder on the server (mandatory) |
format | the text of the format field of a resource (optional) |
content | the text of the content field of a resource (optional) |
tags | the content of the tags field of a resource (optional) |
|
virtual |
Gets a human readable name of the child object type.
Reimplemented in ctkXnatProject, and ctkXnatDataModel.
QList<ctkXnatObject*> ctkXnatObject::children | ( | ) | const |
Gets the children of the object.
QString ctkXnatObject::description | ( | ) | const |
Gets the description of the object.
void ctkXnatObject::download | ( | const QString & | ) |
void ctkXnatObject::erase | ( | ) |
Deletes the object on the XNAT server and removes it from its parent.
bool ctkXnatObject::exists | ( | ) | const |
Checks if the object exists on the XNAT server.
void ctkXnatObject::fetch | ( | bool | forceFetch = false | ) |
Fetches the children and the properties of the object.
|
protectedvirtual |
Fetches the resources of the object.
|
virtual |
Gets the global ID of the object.
Reimplemented in ctkXnatResource.
bool ctkXnatObject::isFetched | ( | ) | const |
Tells if the children and the properties of the objects have been fetched.
|
virtual |
Gets the last modification time from the server.
|
virtual |
Gets the name of the object.
Reimplemented in ctkXnatSubject, ctkXnatScanFolder, ctkXnatResourceFolder, ctkXnatResource, ctkXnatReconstructionFolder, ctkXnatFile, ctkXnatExperiment, and ctkXnatAssessorFolder.
ctkXnatObject* ctkXnatObject::parent | ( | ) | const |
Gets the parent of the object in the data hierarchy. The returned pointer is 0 for the ctkXnatServer objects and different for any other type of XNAT objects.
const QMap<QString, QString>& ctkXnatObject::properties | ( | ) | const |
Gets the properties of the object.
QString ctkXnatObject::property | ( | const QString & | name | ) | const |
Gets the value of the property with the given name.
void ctkXnatObject::remove | ( | ctkXnatObject * | child | ) |
Removes the object from the children of the current object.
|
virtual |
Resets the object so that its properties and children needs to be fetched again at the next request.
Reimplemented in ctkXnatSubject, ctkXnatScanFolder, ctkXnatScan, ctkXnatResourceFolder, ctkXnatResource, ctkXnatReconstructionFolder, ctkXnatReconstruction, ctkXnatProject, ctkXnatFile, ctkXnatExperiment, ctkXnatAssessorFolder, and ctkXnatAssessor.
|
pure virtual |
Gets the resource URI of the object that can be used to access it through the REST API.
Implemented in ctkXnatSubject, ctkXnatScanFolder, ctkXnatScan, ctkXnatResourceFolder, ctkXnatResource, ctkXnatReconstructionFolder, ctkXnatReconstruction, ctkXnatProject, ctkXnatFile, ctkXnatExperiment, ctkXnatAssessorFolder, and ctkXnatAssessor.
void ctkXnatObject::save | ( | bool | overwrite = true | ) |
Creates the object on the XNAT server and sets the new ID.
overwrite,if | true and the object already exists on the server it will be overwritten by the changes |
QString ctkXnatObject::schemaType | ( | ) | const |
|
protected |
Gets the object that represents the connection to the XNAT server that stores the current object.
void ctkXnatObject::setDescription | ( | const QString & | description | ) |
Sets the description of the object.
|
virtual |
Sets the ID of the object.
Reimplemented in ctkXnatResource.
void ctkXnatObject::setLastModifiedTime | ( | const QDateTime & | lastModifiedTime | ) |
Sets the last modfication time on the server.
|
virtual |
Sets the name of the object.
Reimplemented in ctkXnatSubject, ctkXnatResource, ctkXnatFile, and ctkXnatExperiment.
void ctkXnatObject::setParent | ( | ctkXnatObject * | parent | ) |
Sets the parent of the object in the data hierarchy.
void ctkXnatObject::setProperty | ( | const QString & | name, |
const QVariant & | value | ||
) |
Sets the value of the property with the given name.
|
friend |
Definition at line 188 of file ctkXnatObject.h.
|
protected |
The private implementation part of the object.
Definition at line 184 of file ctkXnatObject.h.
|
static |
Definition at line 160 of file ctkXnatObject.h.
|
static |
Definition at line 162 of file ctkXnatObject.h.
|
static |
Definition at line 161 of file ctkXnatObject.h.
|
static |
Definition at line 163 of file ctkXnatObject.h.
|
static |
Definition at line 164 of file ctkXnatObject.h.