Opened 11 years ago
Closed 9 years ago
#439 closed defect (fixed)
usage of ps_descriptions table in petascope 8.x
Reported by: | damiano | Owned by: | Bidesh Thapaliya |
---|---|---|---|
Priority: | critical | Milestone: | Future |
Component: | petascope | Version: | 8.5 |
Keywords: | ps_descriptions | Cc: | mantovani@…, Dimitar Misev, Piero Campalani, Peter Baumann |
Complexity: | Easy |
Description
in table ps_descriptions "abstract" and "keywords" are not used
Change History (25)
comment:1 by , 11 years ago
Summary: | ps_descriptions table in petascope 8.x → usage of ps_descriptions table in petascope 8.x |
---|
comment:2 by , 11 years ago
Cc: | added |
---|---|
Complexity: | Medium → Easy |
comment:3 by , 11 years ago
I also searched through the schemas some time ago, and found no keywords to be associated to coverages.
They can however be set in the service capabilities by overwriting/editing the template in Petascope (petascope.wcs2.templates.ServiceIdentification.templ
, eg with Tomcat in $CATALINA_BASE/webapps/petascope/WEB-INF/classes/petascope/wcs2/templates/
). See also PetascopeUserGuide#Servicecapabilitiesmetadata .
However the table ps_description
suggests these are per coverage.
Looking into the code I see these fields are only used in the updateMetadataWithDescription
method in the wcst
package:
$ grep updateMetadataWithDescription [...]/java/petascope/ -R java/petascope/wcst/transaction/executeTransaction.java: private CoverageMetadata updateMetadataWithDescription(CoverageMetadata meta, CoverageDescriptionType desc) throws WCPSException, WCSTException { ...
comment:4 by , 11 years ago
Corrige: description elements are possible in a CoverageSummary
, however Petascope is not using them.
If you need them I suggest to participate in this discussion at some point.
comment:5 by , 11 years ago
Keywords: | ps_descriptions added |
---|---|
Milestone: | → Future |
comment:6 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
They are actually allowed in the general ows:DescriptionType
, which is extended by the wcs:CoverageDescriptionType
.
http://schemas.opengis.net/ows/2.0/owsDataIdentification.xsd
comment:7 by , 11 years ago
Patch is submitted.
Once accepted the content of the table ps_descriptions
will not be ignored, and will fill in the correspondent OWS elements in the coverage descriptions.
One raw per coverage is admitted by database contraints, and I saw in the WCS 1.0.0 implementation that for keyword it was allowed a syntax to permit multiple keywords, see:
petascope.wcs.server.core.executeDescribeCoverage
class which uses the str2String()
method of the SDU
class in the package petascope.wcps.server.core
for the keywords:
... if (string.startsWith("{") && string.contains(",") && string.endsWith("}")) { ...
This means that:
# SELECT * from ps_descriptions; id | coverage | title | abstract | keywords ----+----------+--------------+-----------------+----------------- 1 | 1 | this title 1 | this abstract 1 | this keyword 1 (1 row)
will resolve to:
<wcs:CoverageDescription ...> <ows:Title>this title 1</ows:Title> <ows:Abstract>this abstract 1</ows:Abstract> <ows:Keywords>this keyword 1</ows:Keywords> ...
And this:
# SELECT * from ps_descriptions; id | coverage | title | abstract | keywords ----+----------+--------------+-----------------+------------------ 1 | 1 | this title 1 | this abstract 1 | {key1,key2,key3} (1 row)
will resolve to :
<wcs:CoverageDescription ...> <ows:Title>this title 1</ows:Title> <ows:Abstract>this abstract 1</ows:Abstract> <ows:Keywords>key1</ows:Keywords> <ows:Keywords>key2</ows:Keywords> <ows:Keywords>key3</ows:Keywords>
If the same behavior is needed for multiple titles and abstracts, please just request it.
comment:9 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:10 by , 11 years ago
Priority: | major → critical |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
An important leak in the submitted patch breaks the WCS service when non mandatory fields like abstract
and keywords
are left blank.
Current Workaround: set those fields as empty strings, rather then letting them null.
comment:11 by , 11 years ago
Not sure which version does that patch affect (as milestone is Future)?
comment:12 by , 11 years ago
Status: | reopened → accepted |
---|
comment:13 by , 11 years ago
This is on release_8.5
branch, and the leak occurs from v8.5.2
on. Patch upcoming.
comment:14 by , 11 years ago
What I said in comment:6 is wrong: wcs:CoverageDescriptionType
does not extend ows:DescriptionType, but rather
gml:AbstractFeature which does not include an
ows:DescriptionType` element (the one for titles, abstracts and keywords).
This means that now the addition of title (+ abstracts or keywords) breaks the validity of the GML response.
This fragment:
<ows:Title>this title 1</ows:Title> <ows:Abstract>this abstract 1</ows:Abstract> <ows:Keywords>key1</ows:Keywords> <ows:Keywords>key2</ows:Keywords> <ows:Keywords>key3</ows:Keywords>
taken from ps_descriptions
should go in the coverage summaries of a GetCapabilities response.
In order to have a valid GML, currently it is better to drop the contents of ps_description
.
comment:15 by , 11 years ago
Cc: | added |
---|
Being the capabilities document always quite a hot topic, I will address the two issues in two different patches: one for the null pointer (ready for subhmission) and the second for moving those elements to the capabilities document (after discussion).
comment:17 by , 11 years ago
Having discussed with endusers, we need to move from DescribeCoverage to GetCapabilities this:
<ows:Title>this title 1</ows:Title>
<ows:Abstract>this abstract 1</ows:Abstract>
<ows:Keywords>key1</ows:Keywords>
<ows:Keywords>key2</ows:Keywords>
<ows:Keywords>key3</ows:Keywords>
comment:18 by , 11 years ago
This could be easily done, and should be done since we have this feature available.
From #314, we have now a parameter for enable/disable the OWS Metadata element in a capabilities document, we could change its purpose to switch for light/fat capabilities: light capabilities drops out OWS metadata and coverage descriptions (title/abstract/keywords).
comment:19 by , 11 years ago
No objections from my side for this solution:
- light mode provides faster performance
- fat mode provides slower performance with detailed information
comment:21 by , 10 years ago
It seems that configuration in petascope.properties
is the way to go (see #735 also).
I'll patch the new params soon. !
comment:22 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
(Configurable) coverage descriptions added to coverage summary in changeset:46aaa33.
An update of petascopedb
is needed.
The patch is related to v9, not to v8.5 as this ticket, so I spawned #802 for it.
comment:23 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:24 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
comment:25 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in 9+, I don't think we'll do it in v8 though, so closing.
Thanks for reporting Damiano.
From a quick look at WCS 2.0 and GMLCOV 1.0.1 specs I could not find reference to "keywords" hence I think this belongs to some other related standards, would you please provide where you expect these fields to be outputted to make this report self-contained so we can speed up its resolution by a community member?
Once this info is there I think the ticket can be considered "easy" to solve = good for newcomers.