WCGA / West-Coast-Ocean-Data-Portal

bugs and fixes for the geoportal back end and UI front end of the WCODP
1 stars 0 forks source link

WMS link type not recognized in iso-2 records #23

Closed emiliom closed 9 years ago

emiliom commented 9 years ago

Now that iso-2 records are coming through as intended, I'm taking a closer look.

Currently I think the only iso-2 records having WMS services are the 4 ones from NANOOS (ie, all except "ROMS modeled..."). The CeNCOOS records don't have WMS yet. Anyway, WCODP does not provide a WMS link type for these records. For these records, the json metadata (json link) doesn't define any of its recognized link types as WMS, though it does include the actual WMS GetCapability URL (here's one example). But GeoPortal seems to recognize and categorize/type that iso-2 link type w/o problems; here's the same record, as shown in the GeoPortal client -- go to the bottom of the page.

@tchaddad, any thoughts on where we could look to start assessing whether this is something we (you and me) can address, or a more complex problem to assign to Point97?

tchaddad commented 9 years ago

Interesting observation about the raw Geoportal client. I'll have to dig deeper to see why it is working there. I suspect it may be because that client is not using the JSON output - it seems likely it may be a purely XLST generated page.

Ideas on where to look for differences between NANOOS and CeNCOOS records:

Locations in GeoPortal config files where links types are detected and interpreted:

Reference discussions in https://github.com/Ecotrust/wc-data-registry/issues/113 and https://github.com/Ecotrust/wc-data-registry/issues/117 for context. Editing the above files and pushing to dev is simple, however @fishytodd will need to be involved to restart geoportal in order to test results.

If none of the above is fruitful, then as with OpenDAP, it could end up being a case where the JSON generation is the key place where the last part of the solution resides. if that is the case, then we will need to touch the files that Ryan touched in this old changeset: https://github.com/Ecotrust/geoportal-server/commit/f4c61285e96eb38d548c2a7ce6c18eabd80e6f71

tchaddad commented 9 years ago

One last thought on link detection:

The config files above may only be handling single matches, i.e:

if pattern 'x' is detected then assign 'y' link type

we may want to look and see if adding multiple match logic would catch the urls that are slipping through the cracks, e.g.:

if pattern 'a' or 'b' or 'c' is detected then assign 'y' link type

tchaddad commented 9 years ago

Just one more note - this issue may also be related to https://github.com/WCGA/West-Coast-Ocean-Data-Portal/issues/21

I will try to get example record URLs from Chris Romsos to confirm.

emiliom commented 9 years ago

Thanks for the R&D, @tchaddad. Very helpful.

It does smell like a JSON feed problem. Exhibit A, quoting from you in issue 117

The net effect of this is that all the link types that we want to detect can be configured to be detected in the XML configurations, but they will not display in the UI until we fix the JSON feed to show the new labels. If we do not fix the labels, the JSON simply refers to all the new link types as "CustomLink".

The WMS GetCapabilities URL in my sample iso-2 records is indeed coming through in the JSON feed as a "CustomLink" type.

It's intriguing that the raw GeoPortal client shows the link types using the same labels seen or expected in the JSON feed (eg, "details", "website", "WMS"). That suggests it may be doing something else besides just an XSLT transformation.

Regarding this comment:

Ideas on where to look for differences between NANOOS and CeNCOOS records:

I'm not sure what you're referring to. What I was trying to say is that the CeNCOOS iso-2 records don't have WMS services at all in their harvested metadata, so we shouldn't look there when debugging this iso-2 WMS issue.

tchaddad commented 9 years ago

I'm not sure what you're referring to. What I was trying to say is that the CeNCOOS iso-2 records don't have WMS services at all in their harvested metadata, so we shouldn't look there when debugging this iso-2 WMS issue.

OK no problem - I misread you original comment, as you switched between talking about NANOOS and CeNCOOS records, and then back. Everything else I mentioned is still relevant I think.

tchaddad commented 9 years ago

We will attempt the fix described in #7 and #21 on the Geoportal XSLT side and see if it helps us push further.

tchaddad commented 9 years ago

We've confirmed that this issue is not an XSLT issue (links are being detected just fine). Rather, it is a JSON feed problem as described in issue 117 from the old repo.

emiliom commented 9 years ago

Thanks for trying, @tchaddad. One question: if this boils down to issue 117 from the old repo, that means once it can be addressed, the OPeNDAP link-type recognition issue will also be addressed at the same time, right? That'd be very cool.

tchaddad commented 9 years ago

In answer to your most recent question, Yes, OPeNDAP, would be addressed at the same time.

tchaddad commented 9 years ago

To come back to the original question about WMS being detected in iso-2 records, I believe the fix we pushed to Dev server today should fix this problem. The catch is that the NANOOS records that it applies to will have to be re-harvested and re-indexed to see the results.

@fishytodd will be letting us know when he reharvests the NANOOS WAF so that we can confirm...

emiliom commented 9 years ago

Thanks for all your work this week, Tanya!!! Wow. Now to address your questions or report back:

tchaddad commented 9 years ago

Yes, apologies for the confusion. The Labeling for OPeNDAP will be handled when we get Point97 to tweak the JSON feed to include the correct label.

The link detection portion for OPeNDAP is actually already working, and you can confirm this by checking records in the UI, and viewing the ESRI JSON link - you will see that the links are being detected and labeled as "CustomLink". That label is not being rendered in the UI at this time.

Since WMS as a label was already available in the JSON, only the link detection portion needed to be fixed for those items. So Although we addressed link detection for both at this time, the labeling portion of the problem is still on hold for Point97.

hope this helps clarify...

emiliom commented 9 years ago

Thanks for the explanation.

tchaddad commented 9 years ago

The topic in the title here is now closable. I'd like to move the OpenDAP portion of the discussion into a new Issue (to elevate it's visibility), so stay tuned for a mention of the new Issue number for the OpeNDAP portion

fishytodd commented 9 years ago

Re-harvested after moving indexables files, works now!