31using namespace Qt::StringLiterals;
39 const QFileInfo xsdFileInfo( resourcesDir, u
"schemaExtension.xsd"_s );
40 QString schema_str = u
"<?xml version='1.0'?>"_s;
42 if ( !xsdFileInfo.exists() )
48 QFile file( xsdFileInfo.absoluteFilePath() );
49 if ( file.open( QFile::ReadOnly | QFile::Text ) )
51 QTextStream in( &file );
52 schema_str = in.readAll();
60 response.
setHeader( u
"Content-Type"_s, u
"text/xml; charset=utf-8"_s );
61 response.
write( schema_str );
@ Critical
Critical/error message.
static QString serverResourcesPath()
Returns the path to the server resources directory.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true, const char *file=__builtin_FILE(), const char *function=__builtin_FUNCTION(), int line=__builtin_LINE())
Adds a message to the log instance (and creates it if necessary).
Defines the response interface passed to QgsService.
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device.
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
Median cut implementation.
void writeGetSchemaExtension(QgsServerResponse &response)
Output GetSchemaExtension response.