Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TDS v5 and HYRAX catalog traversing issue #15

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions threddsclient/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import logging
logger = logging.getLogger(__name__)

FILE_SERVICE = "HTTPServer"
OPENDAP_SERVICE = "OPENDAP"
WMS_SERVICE = "WMS"
WCS_SERVICE = "WCS"
FILE_SERVICE = ["HTTPServer"]
OPENDAP_SERVICE = ["OPENDAP","OpenDAP"]
WMS_SERVICE = ["WMS"]
WCS_SERVICE = ["WCS"]


class Node(object):
Expand Down Expand Up @@ -93,8 +93,10 @@ def authority(self):
@property
def service_name(self):
service_name = None
if self.soup.get('servicename'):
service_name = self.soup.get('servicename')
if self.soup.servicename:
service_name = self.soup.servicename.text
elif self.soup.serviceName:
service_name = self.soup.serviceName.text
elif self.soup.metadata:
if self.soup.metadata.serviceName:
service_name = self.soup.metadata.serviceName.text
Expand Down Expand Up @@ -168,7 +170,7 @@ def __init__(self, soup, catalog):
def access_url(self, service_type=FILE_SERVICE):
url = None
for service in self.catalog.get_services(self.service_name):
if service.service_type == service_type:
if service.service_type in service_type:
url = urlparse.urljoin(service.url, self.url_path)
break
return url
Expand Down