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 | Friends | List of all members
ctkXnatResource Class Reference

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

Inheritance diagram for ctkXnatResource:
Inheritance graph
[legend]
Collaboration diagram for ctkXnatResource:
Collaboration graph
[legend]

Public Member Functions

QString content () const
 
 ctkXnatResource (ctkXnatObject *parent=0, const QString &schemaType=ctkXnatDefaultSchemaTypes::XSI_RESOURCE)
 
QString format () const
 
virtual QString id () const
 Gets the global ID of the object. More...
 
QString label () const
 Gets the label of the object. More...
 
virtual QString name () const
 Gets the name of the object. More...
 
void reset ()
 
virtual QString resourceUri () const
 
void saveImpl (bool overwrite)
 
void setContent (const QString &content)
 
void setFormat (const QString &format)
 
virtual void setId (const QString &id)
 
void setLabel (const QString &label)
 Sets the label of the object. More...
 
virtual void setName (const QString &name)
 Sets the name of the object. More...
 
void setTags (const QString &tags)
 
QString tags () const
 
virtual ~ctkXnatResource ()
 
- Public Member Functions inherited from ctkXnatObject
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...
 
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...
 
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...
 
void save (bool overwrite=true)
 
QString schemaType () const
 
void setDescription (const QString &description)
 Sets the description of the object. More...
 
void setLastModifiedTime (const QDateTime &lastModifiedTime)
 Sets the last modfication time on the server. 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 CONTENT
 
static const QString FORMAT
 
static const QString ID
 
static const QString TAGS
 
- Static Public Attributes inherited from ctkXnatObject
static const QString ID
 
static const QString LABEL
 
static const QString NAME
 
static const QString URI
 
static const QString XSI_SCHEMA_TYPE
 

Friends

class qRestResult
 

Additional Inherited Members

- Protected Member Functions inherited from ctkXnatObject
 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 inherited from ctkXnatObject
const QScopedPointer< ctkXnatObjectPrivate > d_ptr
 The private implementation part of the object. More...
 

Detailed Description

Definition at line 35 of file ctkXnatResource.h.

Constructor & Destructor Documentation

◆ ctkXnatResource()

ctkXnatResource::ctkXnatResource ( ctkXnatObject parent = 0,
const QString &  schemaType = ctkXnatDefaultSchemaTypes::XSI_RESOURCE 
)

◆ ~ctkXnatResource()

virtual ctkXnatResource::~ctkXnatResource ( )
virtual

Member Function Documentation

◆ content()

QString ctkXnatResource::content ( ) const

◆ format()

QString ctkXnatResource::format ( ) const

◆ id()

virtual QString ctkXnatResource::id ( ) const
virtual

Gets the global ID of the object.

Reimplemented from ctkXnatObject.

◆ label()

QString ctkXnatResource::label ( ) const

Gets the label of the object.

◆ name()

virtual QString ctkXnatResource::name ( ) const
virtual

Gets the name of the object.

Reimplemented from ctkXnatObject.

◆ reset()

void ctkXnatResource::reset ( )
virtual

Resets the object so that its properties and children needs to be fetched again at the next request.

Reimplemented from ctkXnatObject.

◆ resourceUri()

virtual QString ctkXnatResource::resourceUri ( ) const
virtual

Gets the resource URI of the object that can be used to access it through the REST API.

Implements ctkXnatObject.

◆ saveImpl()

void ctkXnatResource::saveImpl ( bool  overwrite)
virtual

The implementation of the upload mechanism, called by the save() function. Subclasses of ctkXnatObject can overwrite this function if needed

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

Reimplemented from ctkXnatObject.

◆ setContent()

void ctkXnatResource::setContent ( const QString &  content)

◆ setFormat()

void ctkXnatResource::setFormat ( const QString &  format)

◆ setId()

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

Sets the ID of the object.

Warning
You must not change the ID of an existing object

Reimplemented from ctkXnatObject.

◆ setLabel()

void ctkXnatResource::setLabel ( const QString &  label)

Sets the label of the object.

◆ setName()

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

Sets the name of the object.

Reimplemented from ctkXnatObject.

◆ setTags()

void ctkXnatResource::setTags ( const QString &  tags)

◆ tags()

QString ctkXnatResource::tags ( ) const

Friends And Related Function Documentation

◆ qRestResult

friend class qRestResult
friend

Definition at line 79 of file ctkXnatResource.h.

Member Data Documentation

◆ CONTENT

const QString ctkXnatResource::CONTENT
static

Definition at line 75 of file ctkXnatResource.h.

◆ FORMAT

const QString ctkXnatResource::FORMAT
static

Definition at line 74 of file ctkXnatResource.h.

◆ ID

const QString ctkXnatResource::ID
static

Definition at line 72 of file ctkXnatResource.h.

◆ TAGS

const QString ctkXnatResource::TAGS
static

Definition at line 73 of file ctkXnatResource.h.


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