 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
22 #ifndef ctkXnatObject_h
23 #define ctkXnatObject_h
25 #include "ctkXNATCoreExport.h"
36 class ctkXnatObjectPrivate;
53 virtual QString
id()
const;
57 virtual void setId(
const QString&
id);
64 virtual QString
name()
const;
67 virtual void setName(
const QString& name);
120 void fetch(
bool forceFetch =
false);
128 void save(
bool overwrite =
true);
143 QString format =
"", QString content =
"", QString tags =
"");
160 static const QString
ID;
184 const QScopedPointer<ctkXnatObjectPrivate>
d_ptr;
188 friend class ctkXnatSessionPrivate;
190 void setSchemaType(
const QString& schemaType);
193 virtual void fetchImpl() = 0;
196 virtual void downloadImpl(
const QString&) = 0;
202 virtual void saveImpl(
bool overwrite =
true);
virtual void setName(const QString &name)
Sets the name of the object.
ctkXnatObject * parent() const
void setParent(ctkXnatObject *parent)
Sets the parent of the object in the data hierarchy.
const QScopedPointer< ctkXnatObjectPrivate > d_ptr
The private implementation part of the object.
static const QString LABEL
QString property(const QString &name) const
Gets the value of the property with the given name.
void setLastModifiedTime(const QDateTime &lastModifiedTime)
Sets the last modfication time on the server.
virtual QDateTime lastModifiedTimeOnServer()
Gets the last modification time from the server.
void setProperty(const QString &name, const QVariant &value)
Sets the value of the property with the given name.
void remove(ctkXnatObject *child)
Removes the object from the children of the current object.
virtual ctkXnatResource * addResourceFolder(QString foldername, QString format="", QString content="", QString tags="")
virtual QString name() const
Gets the name of the object.
ctkXnatObject(ctkXnatObject *parent=0, const QString &schemaType=QString::null)
Constructs the ctkXnatObject.
static const QString XSI_SCHEMA_TYPE
bool exists() const
Checks if the object exists on the XNAT server.
static const QString NAME
virtual QString resourceUri() const =0
void add(ctkXnatObject *child)
Adds an object to the children of the current one.
void erase()
Deletes the object on the XNAT server and removes it from its parent.
virtual ~ctkXnatObject()
Destructs the ctkXnatObject.
void download(const QString &)
QString description() const
Gets the description of the object.
virtual void setId(const QString &id)
QString schemaType() const
Q_DECLARE_METATYPE(ctkDICOMPersonName)
ctkXnatObject(const ctkXnatObject &)
virtual void fetchResources(const QString &path="/resources")
Fetches the resources of the object.
QList< ctkXnatObject * > children() const
Gets the children of the object.
bool isFetched() const
Tells if the children and the properties of the objects have been fetched.
The ctkXnatSession class reprents a session object associated with a specific XNAT connection.
const QMap< QString, QString > & properties() const
Gets the properties of the object.
ctkXnatSession * session() const
void fetch(bool forceFetch=false)
Fetches the children and the properties of the object.
virtual QString id() const
Gets the global ID of the object.
void save(bool overwrite=true)
void setDescription(const QString &description)
Sets the description of the object.
ctkXnatObject(ctkXnatObjectPrivate &dd, ctkXnatObject *parent=0, const QString &schemaType=QString::null)
Constructs the ctkXnatObject with the given private part.
virtual QString childDataType() const
Gets a human readable name of the child object type.