ctkXnatFile.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*=============================================================================
  2. Library: XNAT/Core
  3. Copyright (c) University College London,
  4. Centre for Medical Image Computing
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef ctkXnatFile_h
  16. #define ctkXnatFile_h
  17. #include "ctkXNATCoreExport.h"
  18. #include "ctkXnatObject.h"
  19. #include "ctkXnatDefaultSchemaTypes.h"
  20. class ctkXnatConnection;
  21. class ctkXnatFilePrivate;
  22. /**
  23. * @ingroup XNAT_Core
  24. */
  25. class CTK_XNAT_CORE_EXPORT ctkXnatFile : public ctkXnatObject
  26. {
  27. public:
  28. ctkXnatFile(ctkXnatObject* parent = 0, const QString& schemaType = ctkXnatDefaultSchemaTypes::XSI_FILE);
  29. virtual ~ctkXnatFile();
  30. virtual QString resourceUri() const;
  31. virtual void setName(const QString &name);
  32. virtual QString name() const;
  33. void setFileFormat(const QString& fileFormat);
  34. QString fileFormat() const;
  35. void setFileTags(const QString& fileTags);
  36. QString fileTags() const;
  37. void setFileContent(const QString& fileContent);
  38. QString fileContent() const;
  39. void download(const QString& filename);
  40. void upload(const QString& filename);
  41. void reset();
  42. static const QString FILE_NAME;
  43. static const QString FILE_TAGS;
  44. static const QString FILE_FORMAT;
  45. static const QString FILE_CONTENT;
  46. private:
  47. virtual void fetchImpl();
  48. virtual void downloadImpl(const QString&);
  49. Q_DECLARE_PRIVATE(ctkXnatFile)
  50. };
  51. #endif