Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <mastercatalog.h>
Public Member Functions | |
MasterCatalog () | |
bool | prepare () |
bool | addContainer (const QUrl &location) |
bool | addItems (const std::vector< Ilwis::Resource > &items) |
bool | removeItems (const QList< Resource > &items) |
quint64 | url2id (const QUrl &url, IlwisTypes tp) const |
Resource | name2Resource (const QString &name, IlwisTypes tp=itUNKNOWN) const |
Resource | id2Resource (quint64 iid) const |
quint64 | name2id (const QString &name, IlwisTypes tp=itUNKNOWN) const |
IlwisTypes | id2type (quint64 id) const |
quint64 | createId () const |
void | registerObject (ESPIlwisObject &data) |
bool | isRegistered (quint64 id) const |
bool | unregister (quint64) |
std::vector< Resource > | select (const QUrl &resource, const QString &selection) const |
QUrl | name2url (const QString &name, IlwisTypes tp=itUNKNOWN) const |
ESPIlwisObject | get (const QUrl &resource, IlwisTypes type) const |
ESPIlwisObject | get (quint64 id) const |
bool | contains (const QUrl &url, IlwisTypes type) const |
bool | usesContainers (const QUrl &scheme) const |
void | addContainerException (const QString &scheme) |
Friends | |
KERNELSHARED_EXPORT MasterCatalog * | mastercatalog () |
Master catalog holds references to all discovered data files, operations and to all instantiated ilwis objects The master catalog is basically a database and all information about resources that ilwis can handle can be found in this database. The fields in the database are a reflection of the fields in the resource class and the variable set of properties each resource can have. Main function of the mastercatalog is
MasterCatalog::MasterCatalog | ( | ) |
Constructs a new MasterCatalog
bool MasterCatalog::addContainer | ( | const QUrl & | location | ) |
Adds a container with Resources to the MasterCatalog (think about a folder)
location | the url to the container |
bool MasterCatalog::addItems | ( | const std::vector< Ilwis::Resource > & | items | ) |
Adds a list of Resources to the MasterCatalog
items | the Resources that should be added |
bool MasterCatalog::contains | ( | const QUrl & | url, |
IlwisTypes | type | ||
) | const |
Checks whether a certain url + IlwisType combination is in the MasterCatalog
url | the url |
type | the ilwistype |
quint64 Ilwis::MasterCatalog::createId | ( | ) | const |
Generates a new unique id, which is not yet used by any resource
ESPIlwisObject MasterCatalog::get | ( | const QUrl & | resource, |
IlwisTypes | type | ||
) | const |
Retrieves an ilwisobject from the MasterCatalog based on the url en the ilwisttype
resource | the url to the resource that should be gotten |
type | the type of the resource |
ESPIlwisObject MasterCatalog::get | ( | quint64 | id | ) | const |
Retrieve an item from the mastercatalog with its id
id | the id of the required item |
Resource MasterCatalog::id2Resource | ( | quint64 | iid | ) | const |
Translates an id that is in the MasterCatalog to correct Resource
iid | the id that has to be translated,must be in the MasterCatalog |
IlwisTypes MasterCatalog::id2type | ( | quint64 | id | ) | const |
Translates an id from the MasterCatalog to the correct IlwisType
id | the id that needs translation |
bool MasterCatalog::isRegistered | ( | quint64 | id | ) | const |
Checks whether a certain id is registered with an Resource in the MasterCatalog
id | the id that should be checked |
quint64 MasterCatalog::name2id | ( | const QString & | name, |
IlwisTypes | tp = itUNKNOWN |
||
) | const |
Translates a name that is in the MasterCatalog to the corret id
this look up might fail, even though the conditions are met
name | the name that has to be translated, must be in the MasterCatalog |
tp | the IlwisType that belongs to the name, defaults to itUNKOWN |
Resource MasterCatalog::name2Resource | ( | const QString & | name, |
IlwisTypes | tp = itUNKNOWN |
||
) | const |
Translates a name that is in the MasterCatalog to the corret Resource
this look up might fail, even though the conditions are met
name | the name that has to be translated, must be in the MasterCatalog |
tp | the IlwisType that belongs to the name, defaults to itUNKOWN |
QUrl MasterCatalog::name2url | ( | const QString & | name, |
IlwisTypes | tp = itUNKNOWN |
||
) | const |
Translates a name from the MasterCatalog to the correct url
this look up might fail, even though the conditions are met
name | the name that has to be translated, must be in the MasterCatalog |
tp | tp the IlwisType that belongs to the name, defaults to itUNKOWN |
bool MasterCatalog::prepare | ( | ) |
prepares the mastercatalog for use by loading all the settings
void MasterCatalog::registerObject | ( | ESPIlwisObject & | data | ) |
Registers an new object in the MasterCatalog
data | the data that forms the new object |
bool MasterCatalog::removeItems | ( | const QList< Resource > & | items | ) |
Removes a list of Resources from the MasterCatalog
items | The Resources that should be removed from the MasterCatalog |
std::vector< Resource > MasterCatalog::select | ( | const QUrl & | resource, |
const QString & | selection | ||
) | const |
Selects multiple records from the MasterCatalog selection language not yet finished
resource | |
selection |
bool MasterCatalog::unregister | ( | quint64 | id | ) |
unregisters the given id and removes the related object from the MasterCatalog
quint64 MasterCatalog::url2id | ( | const QUrl & | url, |
IlwisTypes | tp | ||
) | const |
Translates an url that is in the MasterCatalog to the correct id
url | the url that has to be translated, must be in the MasterCatalog |
tp | the ilwisType that belongs to the url |