Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <catalog.h>
Public Member Functions | |
Catalog () | |
Catalog (const Resource &resource) | |
std::vector< Resource > | items () const |
Collection of ilwis-objects contained in this catalog. More... | |
virtual bool | prepare () |
Brings the Catalog in a valid state. More... | |
bool | isValid () const |
Indicates if a Catalog is in a valid state. More... | |
IlwisTypes | ilwisType () const |
return the type (as 64-integer). types are described in Ilwis::IlwisObject More... | |
virtual QString | resolve (const QString &name, IlwisTypes tp=itUNKNOWN) const |
QUrl | parentCatalog () const |
void | setParentCatalog (const QUrl &url) |
sets the Catalog this Catalog is part of. More... | |
QUrl | filesystemLocation () const |
convenience method for translating the location of the catalog into a valid file based location More... | |
IlwisObject * | clone () |
![]() | |
IlwisObject () | |
IlwisObject (const Resource &source) | |
void | setName (const QString &nm) |
void | setCode (const QString &cd) |
QDateTime | modifiedTime () const |
returns the moment when the object was last modified More... | |
void | setModifiedTime (const Time &time) |
sets the last modified time of the object More... | |
Time | createTime () const |
void | setCreateTime (const Time &time) |
virtual QString | toString () |
translates the defintion of an object to a string representation More... | |
virtual void | setConnector (ConnectorInterface *connector, int mode=cmINPUT|cmOUTPUT) |
connects an ilwisobject to an input or output source More... | |
virtual bool | isEqual (const Ilwis::IlwisObject *obj) const |
isEqual compares the properties of ilwisobjects to test for equality. More... | |
virtual bool | isReadOnly () const |
isReadOnly tells if the source/target of the ilwisobject maybe modifiable. More... | |
virtual void | setReadOnly (bool yesno) |
virtual bool | hasChanged () const |
virtual void | changed (bool yesno) |
virtual bool | prepare (const QString &def) |
prepare More... | |
bool | fromInternal (const QSqlRecord &rec) |
bool | isAnonymous () const |
virtual Resource | source (int mode=cmINPUT) const |
source the location of the source that represents the physical read origin of this object More... | |
virtual bool | store (int mode=smMETADATA|smBINARYDATA) |
target the location of the source that represents the physical write target of this object More... | |
void | connectTo (const QUrl &url, const QString &format, const QString &fnamespace, ConnectorMode cmode) |
virtual bool | merge (const IlwisObject *obj, int options=0) |
bool | isSystemObject () const |
bool | isInternalObject () const |
![]() | |
QString | code () const |
code returns the code of the identity. If no code is attached it will return sUNDEF ("?"). More... | |
quint64 | id () const |
id returns a unsigned 64-bit number unique for the objects using the identity More... | |
virtual QString | name () const |
name returns the name of an object. All objects have names though names need not to be unique More... | |
void | setName (const QString &n) |
setName sets the name of an object. All objects have names though names need not to be unique More... | |
virtual QString | description () const |
void | setDescription (const QString &desc) |
Friends | |
class | CatalogConnector |
Additional Inherited Members | |
![]() | |
enum | ConnectorMode { cmINPUT =1, cmOUTPUT =2, cmEXTENDED =4 } |
The ConnectorMode enum Describes the state of the instance of the connector. More... | |
enum | StoreMode { smMETADATA =1, smBINARYDATA =2 } |
![]() | |
template<typename T > | |
static T | create (const QString &def) |
template<typename T > | |
static T | create (quint64 id) |
static IlwisObject * | create (const Resource &source, const PrepareOptions &options=PrepareOptions()) |
static IlwisTypes | findType (const QString &source) |
findType More... | |
static QString | type2Name (IlwisTypes t) |
static IlwisTypes | name2Type (const QString &name) |
static void | addTypeFunction (IlwisTypeFunction) |
addTypeFunction More... | |
static IlwisTypes | name2ExtendedType (const QString &dname) |
![]() | |
QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) |
const QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) const |
bool | setValid (bool yesno) |
void | copyTo (IlwisObject *obj) |
![]() | |
std::mutex | _mutex |
std::mutex | _loadforstore |
The catalog class holds the collection of data in a certain data-source. Catalogs come in many shapes and sizes. Basically anything that can contain other Ilwis-objects is a catalog. The obvious example if of course a folder on the harddrive, but also file-formats that contain other objects can be considered catalogs, or services that give access to coverage, or ftp network locations etc... Note that the class Ilwis::CatalogView implements a filtered view on catalog(s).
|
explicit |
empty constructor. The object is in an invalid state
Catalog::Catalog | ( | const Resource & | resource | ) |
Attaches a Catalog to a location described in the resource. The object is not yet filled. This happens in the prepare method.
cat |
QUrl Catalog::filesystemLocation | ( | ) | const |
convenience method for translating the location of the catalog into a valid file based location
Some of the underlying librairies of the framework can only handle files. This means that data that is not contained in a regular file/folder based *structure but still is basically a file can not be handled by the framework (e.g. files in a zip file). This method translates the url inot a location in the file system that contains a (temporary) copy of the file(s) in that container. In this way the underlying library still can handle the data as-if it was a regular file.
|
virtual |
return the type (as 64-integer). types are described in Ilwis::IlwisObject
Implements Ilwis::IlwisObject.
|
virtual |
Indicates if a Catalog is in a valid state.
A Catalog is in a valid state if the url that describes its location is valid and the objects items are loaded. Having no items doesnt mean that the object is not in a valid state because the catalog might be empty.
Reimplemented from Ilwis::IlwisObject.
std::vector< Resource > Catalog::items | ( | ) | const |
Collection of ilwis-objects contained in this catalog.
QUrl Catalog::parentCatalog | ( | ) | const |
Retrieves the location the catalog is currently attached to.
location are maintained by the connector, not by the catalog. But sometimes it is needed to need to know the location the catalog is attached to. Catalogs may form a hierarchical system.
|
virtual |
Brings the Catalog in a valid state.
The prepare method executes the loadData method of the Ilwis::CatalogConnector that backs the Catalog object. A succesfull loadData will make the Catalog valid.
Reimplemented from Ilwis::IlwisObject.
|
virtual |
translates a given name to a full resource locator valid within the context of the Catalog
void Catalog::setParentCatalog | ( | const QUrl & | url | ) |