2013-02-06 15:14:16 +01:00
|
|
|
//typedef QMap<int, QgsField> QgsFieldMap;
|
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
/* Description of feature class in GML */
|
|
|
|
class QgsGmlFeatureClass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QgsGmlFeatureClass( );
|
|
|
|
QgsGmlFeatureClass( QString name, QString path );
|
|
|
|
|
|
|
|
~QgsGmlFeatureClass();
|
|
|
|
|
|
|
|
QList<QgsField> & fields();
|
|
|
|
|
|
|
|
int fieldIndex( const QString & name );
|
|
|
|
|
|
|
|
QString path() const;
|
|
|
|
|
|
|
|
QStringList & geometryAttributes();
|
|
|
|
};
|
|
|
|
|
2013-02-06 15:14:16 +01:00
|
|
|
class QgsGmlSchema: QObject
|
|
|
|
{
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsgmlschema.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
QgsGmlSchema();
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2013-02-06 15:14:16 +01:00
|
|
|
~QgsGmlSchema();
|
|
|
|
|
|
|
|
/** Get fields info from XSD */
|
|
|
|
bool parseXSD( const QByteArray &xml );
|
|
|
|
|
|
|
|
/** Guess GML schema from data if XSD does not exist.
|
|
|
|
* Currently only recognizes UMN Mapserver GetFeatureInfo GML response.
|
|
|
|
* @param data GML data
|
|
|
|
* @return true in case of success */
|
|
|
|
bool guessSchema( const QByteArray &data );
|
|
|
|
|
|
|
|
QStringList typeNames() const;
|
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
/** Get fields for type/class name parsed from GML or XSD */
|
2013-02-06 15:14:16 +01:00
|
|
|
QList<QgsField> fields( const QString & typeName );
|
|
|
|
|
2013-06-23 16:00:16 +02:00
|
|
|
/** Get list of geometry attributes for type/class name */
|
2013-02-06 15:14:16 +01:00
|
|
|
QStringList geometryAttributes( const QString & typeName );
|
|
|
|
};
|