QRODS
qrods_p.h
1 #ifndef QRODS_P_H
2 #define QRODS_P_H
3 #include "qrods.h"
4 #include "collectionclient.h"
5 #include "filecontentsclient.h"
6 #include "dataobjectclient.h"
7 #include "qmetadatamodel_p.h"
8 #include "serverinfoclient.h"
9 #include <QList>
10 
11 #define QRODS_VERSION "0.0.1"
12 
14 {
15 
16 private:
17  QString _host;
18  int _port;
19  QString _user;
20  QString _password;
21  QString _currentPath;
22  QString _version;
23  CollectionClient *collectionClient;
24  FileContentsClient *fileClient;
25  DataObjectClient *dataClient;
26  ServerInfoClient *serverClient;
27  QMetadataModel *dataModel;
28  QRODS *qrods;
29 
30 public:
31  QRODSPrivate(QRODS *qrods);
32 
33  bool connectToServer(QString path, bool secureHttp);
34 
35  void setUser(QString &user);
36  void setPassword(QString &password);
37  void setHost(QString &host);
38  void setPort(int port);
39 
40  QString& getQRODSVersion();
41  QString& user();
42  QString& password();
43  QString& host();
44  int port();
45 
46  void addCollection(QString &path);
47  void removeCollection(QString &path);
48  void uploadFile(QString &remotePath, QString &localPath);
49  void getFile(QString &remotePath, QString &localPath);
50  QList<MetadataEntry*>* getDataObjectMetadata(QString &path);
51  void addCollectionMetadata(QString &path, MetadataEntry &entry);
52  void deleteCollectionMetadata(QString &path, MetadataEntry &entry);
53  void getCollectionDataLazy(FileListingEntry* entry) const;
54  void removeDataObject(QString &path, bool force);
55  void setDataPath(QString &dataObj);
56  void getNextPage(FileListingEntry* entry) const;
58 
59 
60 public:
61 
62  QMap<QString, FileListingEntry*> _collections;
63  FileListingEntry* _rootNode = 0;
64 
65  QScrollBar* bar = 0;
66  int oldValue;
67  QMap<QString, FileListingEntry*> nodes;
68  QMap<QString, QModelIndex> indexes;
69  QMap<FileListingEntry::EntryColumn, QString> columns;
70  QList<FileListingEntry::EntryColumn> visibleColumns;
71 
72  QAbstractItemView* view = NULL;
73 };
74 
75 #endif // QRODS_P_H
Definition: qrods_p.h:13
Definition: serverinfoclient.h:9
void setPassword(QString &password)
QRODSPrivate::setPassword sets the password.
Definition: qrods_p.cpp:45
int port()
QRODSPrivate::port gets the port.
Definition: qrods_p.cpp:122
Definition: dataobjectclient.h:15
Definition: qrods.h:12
void removeCollection(QString &path)
QRODSPrivate::removeCollection removes a collection.
Definition: qrods_p.cpp:144
QString & user()
QRODSPrivate::user gets user.
Definition: qrods_p.cpp:89
QMetadataModel * getDataModel()
QRODSPrivate::getDataModel returns a QRODS.
Definition: qrods_p.cpp:265
Definition: qmetadatamodel.h:12
QString & getQRODSVersion()
QRODSPrivate::getQRODSVersion gets QRODS version.
Definition: qrods_p.cpp:79
bool connectToServer(QString path, bool secureHttp)
QRODSPrivate::connectToServer connets to a server.
Definition: qrods_p.cpp:276
void removeDataObject(QString &path, bool force)
QRODSPrivate::removeDataObject.
Definition: qrods_p.cpp:230
QRODSPrivate(QRODS *qrods)
QRODSPrivate::QRODSPrivate constructor.
Definition: qrods_p.cpp:9
void addCollectionMetadata(QString &path, MetadataEntry &entry)
QRODSPrivate::addCollectionMetadata adds a collection to a metadata.
Definition: qrods_p.cpp:194
void addCollection(QString &path)
QRODSPrivate::addCollection adds a collection.
Definition: qrods_p.cpp:133
void getFile(QString &remotePath, QString &localPath)
QRODSPrivate::getFile get a file.
Definition: qrods_p.cpp:170
Definition: metadataentry.h:8
void uploadFile(QString &remotePath, QString &localPath)
QRODSPrivate::uploadFile uploads a file.
Definition: qrods_p.cpp:157
Definition: collectionclient.h:12
void setPort(int port)
QRODSPrivate::setPort sets the Port.
Definition: qrods_p.cpp:68
void deleteCollectionMetadata(QString &path, MetadataEntry &entry)
QRODSPrivate::deleteCollectionMetadata.
Definition: qrods_p.cpp:206
void getCollectionDataLazy(FileListingEntry *entry) const
QRODSPrivate::getCollectionDataLazy List the collection contents by using a load lazing approach...
Definition: qrods_p.cpp:218
Definition: filelistingentry.h:9
Definition: filecontentsclient.h:8
QString & password()
QRODSPrivate::password returns the password.
Definition: qrods_p.cpp:100
void getNextPage(FileListingEntry *entry) const
QRODSPrivate::getNextPage.
Definition: qrods_p.cpp:254
QString & host()
QRODSPrivate::host returns the host.
Definition: qrods_p.cpp:111
QList< MetadataEntry * > * getDataObjectMetadata(QString &path)
QRODSPrivate::getDataObjectMetadata gets the object data of a metadata.
Definition: qrods_p.cpp:182
void setUser(QString &user)
QRODSPrivate::setUser sets the user.
Definition: qrods_p.cpp:34
void setHost(QString &host)
QRODSPrivate::setHost sets the host.
Definition: qrods_p.cpp:57
void setDataPath(QString &dataObj)
QRODSPrivate::setDataPath Sets the path of a remote object associated with the QRODS metadata model...
Definition: qrods_p.cpp:243