CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
ctkXnatObject Class Referenceabstract

#include <Libs/XNAT/Core/ctkXnatObject.h>

Inheritance diagram for ctkXnatObject:
Inheritance graph
[legend]

Public Member Functions

void add (ctkXnatObject *child)
 Adds an object to the children of the current one. More...
 
virtual ctkXnatResourceaddResourceFolder (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...
 
ctkXnatObjectparent () 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...
 
ctkXnatSessionsession () const
 

Protected Attributes

const QScopedPointer< ctkXnatObjectPrivate > d_ptr
 The private implementation part of the object. More...
 

Friends

class ctkXnatSessionPrivate
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~ctkXnatObject()

virtual ctkXnatObject::~ctkXnatObject ( )
virtual

Destructs the ctkXnatObject.

◆ ctkXnatObject() [1/3]

ctkXnatObject::ctkXnatObject ( const ctkXnatObject )
protected

◆ ctkXnatObject() [2/3]

ctkXnatObject::ctkXnatObject ( ctkXnatObject parent = 0,
const QString &  schemaType = QString::null 
)
protected

Constructs the ctkXnatObject.

◆ ctkXnatObject() [3/3]

ctkXnatObject::ctkXnatObject ( ctkXnatObjectPrivate &  dd,
ctkXnatObject parent = 0,
const QString &  schemaType = QString::null 
)
protected

Constructs the ctkXnatObject with the given private part.

Member Function Documentation

◆ add()

void ctkXnatObject::add ( ctkXnatObject child)

Adds an object to the children of the current one.

◆ addResourceFolder()

virtual ctkXnatResource* ctkXnatObject::addResourceFolder ( QString  foldername,
QString  format = "",
QString  content = "",
QString  tags = "" 
)
virtual

Creates a new resource folder with the given foldername, format, content and tags for this ctkXnatObject on the server.

Parameters
foldernamethe name of the resource folder on the server (mandatory)
formatthe text of the format field of a resource (optional)
contentthe text of the content field of a resource (optional)
tagsthe content of the tags field of a resource (optional)
Returns
ctkXnatResource the created resource

◆ childDataType()

virtual QString ctkXnatObject::childDataType ( ) const
virtual

Gets a human readable name of the child object type.

Reimplemented in ctkXnatProject, and ctkXnatDataModel.

◆ children()

QList<ctkXnatObject*> ctkXnatObject::children ( ) const

Gets the children of the object.

◆ description()

QString ctkXnatObject::description ( ) const

Gets the description of the object.

◆ download()

void ctkXnatObject::download ( const QString &  )

◆ erase()

void ctkXnatObject::erase ( )

Deletes the object on the XNAT server and removes it from its parent.

◆ exists()

bool ctkXnatObject::exists ( ) const

Checks if the object exists on the XNAT server.

◆ fetch()

void ctkXnatObject::fetch ( bool  forceFetch = false)

Fetches the children and the properties of the object.

◆ fetchResources()

virtual void ctkXnatObject::fetchResources ( const QString &  path = "/resources")
protectedvirtual

Fetches the resources of the object.

◆ id()

virtual QString ctkXnatObject::id ( ) const
virtual

Gets the global ID of the object.

Reimplemented in ctkXnatResource.

◆ isFetched()

bool ctkXnatObject::isFetched ( ) const

Tells if the children and the properties of the objects have been fetched.

◆ lastModifiedTimeOnServer()

virtual QDateTime ctkXnatObject::lastModifiedTimeOnServer ( )
virtual

Gets the last modification time from the server.

◆ name()

virtual QString ctkXnatObject::name ( ) const
virtual

◆ parent()

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.

◆ properties()

const QMap<QString, QString>& ctkXnatObject::properties ( ) const

Gets the properties of the object.

◆ property()

QString ctkXnatObject::property ( const QString &  name) const

Gets the value of the property with the given name.

◆ remove()

void ctkXnatObject::remove ( ctkXnatObject child)

Removes the object from the children of the current object.

◆ reset()

virtual void ctkXnatObject::reset ( )
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.

◆ resourceUri()

virtual QString ctkXnatObject::resourceUri ( ) const
pure virtual

◆ save()

void ctkXnatObject::save ( bool  overwrite = true)

Creates the object on the XNAT server and sets the new ID.

Parameters
overwrite,iftrue and the object already exists on the server it will be overwritten by the changes

◆ schemaType()

QString ctkXnatObject::schemaType ( ) const

◆ session()

ctkXnatSession* ctkXnatObject::session ( ) const
protected

Gets the object that represents the connection to the XNAT server that stores the current object.

◆ setDescription()

void ctkXnatObject::setDescription ( const QString &  description)

Sets the description of the object.

◆ setId()

virtual void ctkXnatObject::setId ( const QString &  id)
virtual

Sets the ID of the object.

Warning
You must not change the ID of an existing object

Reimplemented in ctkXnatResource.

◆ setLastModifiedTime()

void ctkXnatObject::setLastModifiedTime ( const QDateTime &  lastModifiedTime)

Sets the last modfication time on the server.

◆ setName()

virtual void ctkXnatObject::setName ( const QString &  name)
virtual

Sets the name of the object.

Reimplemented in ctkXnatSubject, ctkXnatResource, ctkXnatFile, and ctkXnatExperiment.

◆ setParent()

void ctkXnatObject::setParent ( ctkXnatObject parent)

Sets the parent of the object in the data hierarchy.

◆ setProperty()

void ctkXnatObject::setProperty ( const QString &  name,
const QVariant &  value 
)

Sets the value of the property with the given name.

Friends And Related Function Documentation

◆ ctkXnatSessionPrivate

friend class ctkXnatSessionPrivate
friend

Definition at line 188 of file ctkXnatObject.h.

Member Data Documentation

◆ d_ptr

const QScopedPointer<ctkXnatObjectPrivate> ctkXnatObject::d_ptr
protected

The private implementation part of the object.

Definition at line 184 of file ctkXnatObject.h.

◆ ID

const QString ctkXnatObject::ID
static

Definition at line 160 of file ctkXnatObject.h.

◆ LABEL

const QString ctkXnatObject::LABEL
static

Definition at line 162 of file ctkXnatObject.h.

◆ NAME

const QString ctkXnatObject::NAME
static

Definition at line 161 of file ctkXnatObject.h.

◆ URI

const QString ctkXnatObject::URI
static

Definition at line 163 of file ctkXnatObject.h.

◆ XSI_SCHEMA_TYPE

const QString ctkXnatObject::XSI_SCHEMA_TYPE
static

Definition at line 164 of file ctkXnatObject.h.


The documentation for this class was generated from the following file: