23 #include "wxgis/catalog/gxobject.h"
24 #include "wxgis/catalog/gxdataset.h"
25 #include "wxgis/core/json/jsonval.h"
26 #include "wxgis/catalog/contupdater.h"
28 #ifdef wxGIS_USE_POSTGRES
30 #include "wxgis/datasource/postgisdataset.h"
32 class wxGxRemoteDBSchema;
42 class WXDLLIMPEXP_GIS_CLT wxGxRemoteConnection :
48 DECLARE_CLASS(wxGxRemoteConnection)
50 wxGxRemoteConnection(
wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
51 virtual ~wxGxRemoteConnection(
void);
53 virtual
bool Destroy(
void);
54 virtual wxString GetCategory(
void)
const {
return wxString(_(
"Database Connection")); };
55 virtual void Refresh(
void);
57 virtual bool Connect(
void);
58 virtual bool Disconnect(
void);
59 virtual bool IsConnected(
void);
61 virtual bool Delete(
void);
62 virtual bool CanDelete(
void) {
return true;};
63 virtual bool Rename(
const wxString& NewName);
64 virtual bool CanRename(
void) {
return true; };
65 virtual bool Copy(
const CPLString &szDestPath,
ITrackCancel*
const pTrackCancel);
66 virtual bool CanCopy(
const CPLString &szDestPath) {
return true; };
67 virtual bool Move(
const CPLString &szDestPath,
ITrackCancel*
const pTrackCancel);
68 virtual bool CanMove(
const CPLString &szDestPath) {
return CanCopy(szDestPath) & CanDelete(); };
70 virtual bool AreChildrenViewable(
void)
const {
return true;};
71 virtual bool CanCreate(
long nDataType,
long DataSubtype);
73 bool CreateSchema(
const wxString& sSchemaName);
74 wxString CheckUniqSchemaName(
const wxString& sSchemaName,
const wxString& sAdd = wxT(
" "),
int nCounter = 0)
const;
77 virtual void LoadChildren(
void);
78 virtual wxGxRemoteDBSchema* GetNewRemoteDBSchema(
int nRemoteId,
const wxString &sName,
const CPLString &soPath, wxGISPostgresDataSource *pwxGISRemoteConn);
82 virtual wxGxObjectMap GetRemoteObjects();
83 virtual void AddObject(
int nRemoteId,
const wxString &sName);
96 class WXDLLIMPEXP_GIS_CLT wxGxRemoteDBSchema :
102 DECLARE_CLASS(wxGxRemoteDBSchema)
104 wxGxRemoteDBSchema(
int nRemoteId, wxGISPostgresDataSource* pwxGISRemoteConn,
wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
105 virtual ~wxGxRemoteDBSchema(
void);
107 virtual
bool Destroy();
108 virtual wxString GetCategory(
void)
const {
return wxString(_(
"Remote Database Schema")); };
109 virtual void Refresh(
void);
111 virtual bool AreChildrenViewable(
void)
const {
return true;};
112 virtual bool HasChildren(
void);
113 virtual bool CanCreate(
long nDataType,
long DataSubtype);
115 virtual bool Delete(
void);
116 virtual bool CanDelete(
void);
117 virtual bool Rename(
const wxString& NewName);
118 virtual bool CanRename(
void);
119 virtual bool Copy(
const CPLString &szDestPath,
ITrackCancel*
const pTrackCancel);
120 virtual bool CanCopy(
const CPLString &szDestPath);
121 virtual bool Move(
const CPLString &szDestPath,
ITrackCancel*
const pTrackCancel);
122 virtual bool CanMove(
const CPLString &szDestPath);
123 wxString CheckUniqTableName(
const wxString& sTableName,
const wxString& sAdd = wxT(
" "),
int nCounter = 0)
const;
126 virtual void LoadChildren(
void);
127 virtual wxGxObject* GetNewTable(
int nRemoteId,
const wxString &sTableName,
const wxGISEnumDatasetType eType);
129 virtual wxGxObjectMap GetRemoteObjects();
130 virtual void AddObject(
int nRemoteId,
const wxString &sName);
132 wxGISPostgresDataSource* m_pwxGISRemoteConn;
135 #endif //wxGIS_USE_POSTGRES
153 virtual wxString GetCategory(
void)
const {
return wxString(_(
"Tile Map service"));};
155 virtual void FillMetadata(
bool bForce =
false);
Definition: gxremoteconn.h:145
A TrackCancel interface class.
Definition: core.h:144
Definition: contupdater.h:70
Definition: contupdater.h:36
Definition: gxdataset.h:177
Definition: catalog.h:123
Definition: gxobject.h:37