CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkXnatFile.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  Library: XNAT/Core
4 
5  Copyright (c) University College London,
6  Centre for Medical Image Computing
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 =============================================================================*/
21 
22 #ifndef ctkXnatFile_h
23 #define ctkXnatFile_h
24 
25 #include "ctkXNATCoreExport.h"
26 
27 #include "ctkXnatObject.h"
29 
30 class ctkXnatConnection;
31 class ctkXnatFilePrivate;
32 
36 class CTK_XNAT_CORE_EXPORT ctkXnatFile : public ctkXnatObject
37 {
38 
39 public:
40 
41  ctkXnatFile(ctkXnatObject* parent = 0, const QString& schemaType = ctkXnatDefaultSchemaTypes::XSI_FILE);
42 
43  virtual ~ctkXnatFile();
44 
45  virtual QString resourceUri() const;
46 
47  virtual void setName(const QString &name);
48  virtual QString name() const;
49 
50  void setFileFormat(const QString& fileFormat);
51  QString fileFormat() const;
52 
53  void setFileTags(const QString& fileTags);
54  QString fileTags() const;
55 
56  void setFileContent(const QString& fileContent);
57  QString fileContent() const;
58 
59  void setLocalFilePath(const QString& filepath);
60  QString localFilePath() const;
61 
62  void reset();
63 
64  static const QString FILE_NAME;
65  static const QString FILE_TAGS;
66  static const QString FILE_FORMAT;
67  static const QString FILE_CONTENT;
68 
69 private:
70 
71  virtual void fetchImpl();
72 
73  virtual void downloadImpl(const QString&);
74 
79  virtual void saveImpl(bool overwrite);
80 
81  Q_DECLARE_PRIVATE(ctkXnatFile)
82 };
83 
84 #endif
ctkXnatObject::setName
virtual void setName(const QString &name)
Sets the name of the object.
ctkXnatFile
Definition: ctkXnatFile.h:36
ctkXnatObject::reset
virtual void reset()
ctkXnatObject
Definition: ctkXnatObject.h:44
ctkXnatObject::name
virtual QString name() const
Gets the name of the object.
ctkXnatDefaultSchemaTypes.h
ctkXnatFile::FILE_FORMAT
static const QString FILE_FORMAT
Definition: ctkXnatFile.h:66
ctkXnatObject::resourceUri
virtual QString resourceUri() const =0
ctkXnatFile::FILE_NAME
static const QString FILE_NAME
Definition: ctkXnatFile.h:64
ctkXnatDefaultSchemaTypes::XSI_FILE
static QString XSI_FILE
Definition: ctkXnatDefaultSchemaTypes.h:41
ctkXnatFile::FILE_CONTENT
static const QString FILE_CONTENT
Definition: ctkXnatFile.h:67
ctkXnatFile::FILE_TAGS
static const QString FILE_TAGS
Definition: ctkXnatFile.h:65
ctkXnatObject.h