QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
stac
qgsstacobject.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsstacobject.cpp
3
---------------------
4
begin : August 2024
5
copyright : (C) 2024 by Stefanos Natsis
6
email : uclaros at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgsstacobject.h
"
17
18
#include <QString>
19
20
using namespace
Qt::StringLiterals;
21
22
QgsStacObject::QgsStacObject
(
const
QString &
id
,
const
QString &version,
const
QVector< QgsStacLink > &
links
)
23
:
mId
(
id
)
24
,
mStacVersion
( version )
25
,
mLinks
(
links
)
26
{}
27
28
QString
QgsStacObject::stacVersion
()
const
29
{
30
return
mStacVersion
;
31
}
32
33
void
QgsStacObject::setStacVersion
(
const
QString &version )
34
{
35
mStacVersion
= version;
36
}
37
38
QStringList
QgsStacObject::stacExtensions
()
const
39
{
40
return
mStacExtensions
;
41
}
42
43
void
QgsStacObject::setStacExtensions
(
const
QStringList &extensions )
44
{
45
mStacExtensions
= extensions;
46
}
47
48
QString
QgsStacObject::id
()
const
49
{
50
return
mId
;
51
}
52
53
void
QgsStacObject::setId
(
const
QString &
id
)
54
{
55
mId
=
id
;
56
}
57
58
QVector< QgsStacLink >
QgsStacObject::links
()
const
59
{
60
return
mLinks
;
61
}
62
63
void
QgsStacObject::setLinks
(
const
QVector< QgsStacLink > &
links
)
64
{
65
mLinks
=
links
;
66
}
67
68
QString
QgsStacObject::url
()
const
69
{
70
for
(
const
QgsStacLink
&link :
mLinks
)
71
{
72
if
( link.relation() ==
"self"
_L1 )
73
return
link.href();
74
}
75
return
QString();
76
}
77
78
QString
QgsStacObject::rootUrl
()
const
79
{
80
for
(
const
QgsStacLink
&link :
mLinks
)
81
{
82
if
( link.relation() ==
"root"
_L1 )
83
return
link.href();
84
}
85
return
QString();
86
}
87
88
QString
QgsStacObject::parentUrl
()
const
89
{
90
for
(
const
QgsStacLink
&link :
mLinks
)
91
{
92
if
( link.relation() ==
"parent"
_L1 )
93
return
link.href();
94
}
95
return
QString();
96
}
QgsStacLink
Stores data associated with a STAC link.
Definition
qgsstaclink.h:31
QgsStacObject::stacVersion
QString stacVersion() const
Returns the STAC version the object implements.
Definition
qgsstacobject.cpp:28
QgsStacObject::id
QString id() const
Id of the STAC object.
Definition
qgsstacobject.cpp:48
QgsStacObject::mId
QString mId
Definition
qgsstacobject.h:113
QgsStacObject::stacExtensions
QStringList stacExtensions() const
Returns the list of extensions the STAC object implements.
Definition
qgsstacobject.cpp:38
QgsStacObject::parentUrl
QString parentUrl() const
Returns the url stored in the object's "parent" link.
Definition
qgsstacobject.cpp:88
QgsStacObject::rootUrl
QString rootUrl() const
Returns the url stored in the object's "root" link.
Definition
qgsstacobject.cpp:78
QgsStacObject::setStacExtensions
void setStacExtensions(const QStringList &stacExtensions)
Sets the list of stacExtensions the object implements.
Definition
qgsstacobject.cpp:43
QgsStacObject::mLinks
QVector< QgsStacLink > mLinks
Definition
qgsstacobject.h:116
QgsStacObject::QgsStacObject
QgsStacObject()=delete
Default constructor is used for creating invalid objects.
QgsStacObject::setId
void setId(const QString &id)
Sets the id for the STAC object.
Definition
qgsstacobject.cpp:53
QgsStacObject::setStacVersion
void setStacVersion(const QString &stacVersion)
Sets the STAC version the object implements.
Definition
qgsstacobject.cpp:33
QgsStacObject::setLinks
void setLinks(const QVector< QgsStacLink > &links)
Sets the STAC links included in the object.
Definition
qgsstacobject.cpp:63
QgsStacObject::url
QString url() const
Returns the url stored in the object's "self" link.
Definition
qgsstacobject.cpp:68
QgsStacObject::mStacExtensions
QStringList mStacExtensions
Definition
qgsstacobject.h:115
QgsStacObject::mStacVersion
QString mStacVersion
Definition
qgsstacobject.h:114
QgsStacObject::links
QVector< QgsStacLink > links() const
Returns the STAC links included in the object.
Definition
qgsstacobject.cpp:58
qgsstacobject.h
Generated on
for QGIS API Documentation by
1.17.0