20using namespace Qt::StringLiterals;
34 QString html = u
"<html><head></head>\n<body>\n"_s;
36 html += u
"<h1>%1</h1>\n<hr>\n"_s.arg(
"Catalog"_L1 );
37 html +=
"<table class=\"list-view\">\n"_L1;
38 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"id"_s,
id() );
39 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"stac_version"_s,
stacVersion() );
40 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"title"_s,
title() );
41 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"description"_s,
description() );
42 html +=
"</table>\n"_L1;
46 html += u
"<h1>%1</h1>\n<hr>\n"_s.arg(
"Extensions"_L1 );
50 html += u
"<li>%1</li>\n"_s.arg( extension );
57 html += u
"<h1>%1</h1>\n<hr>\n"_s.arg(
"Conformance Classes"_L1 );
61 html += u
"<li>%1</li>\n"_s.arg( cc );
66 html += u
"<h1>%1</h1>\n<hr>\n"_s.arg(
"Links"_L1 );
69 html +=
"<table class=\"list-view\">\n"_L1;
70 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"relation"_s, link.relation() );
71 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"title"_s, link.title() );
72 html += u
"<tr><td class=\"highlight\">%1</td><td><a href=\"%2\">%2</a></td></tr>\n"_s.arg( u
"url"_s, link.href() );
73 html += u
"<tr><td class=\"highlight\">%1</td><td>%2</td></tr>\n"_s.arg( u
"type"_s, link.mediaType() );
74 html +=
"</table><br/>\n"_L1;
77 html +=
"\n</body>\n</html>\n"_L1;
108 mConformanceClasses = QSet< QString >( conformanceClasses.constBegin(), conformanceClasses.constEnd() );
StacObjectType
Available types of stac objects.
void addConformanceClass(const QString &conformanceClass)
Adds conformanceClass to the list of catalog's conformance classes.
QString toHtml() const override
Returns an HTML representation of the STAC object.
void setTitle(const QString &title)
Sets a short descriptive one-line title for the Catalog.
QString description() const
Returns a Detailed multi-line description to fully explain the Catalog.
Qgis::StacObjectType type() const override
Returns the Type of the STAC object.
QSet< QString > mConformanceClasses
void setConformanceClasses(const QStringList &conformanceClasses)
Sets the list of conformanceClasses this catalog conforms to.
QgsStacCatalog()=delete
Default constructor deleted, use the variant with required parameters.
bool conformsTo(const QString &conformanceClass) const
Checks if the catalog is a STAC API conforming to the specified conformanceClass.
void setDescription(const QString &description)
Sets a detailed multi-line description to fully explain the Catalog.
QString title() const
Returns a short descriptive one-line title for the Catalog.
Stores data associated with a STAC link.
QString stacVersion() const
Returns the STAC version the object implements.
QString id() const
Id of the STAC object.
QVector< QgsStacLink > mLinks
QgsStacObject()=delete
Default constructor is used for creating invalid objects.
QStringList mStacExtensions
QVector< QgsStacLink > links() const
Returns the STAC links included in the object.