Skip to content

Use var prefix list #103

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

Merged
merged 2 commits into from
Sep 6, 2022
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: 10 additions & 6 deletions lib/bald/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,17 +818,19 @@ def _prefixes_and_aliases(fhandle, identity, alias_dict, prefix_contexts, cache)
for pid in prefix_ids.split(' '):
if pid in fhandle.groups:
prefix_groups.append(fhandle.groups[pid])
elif pid in fhandle.variables:
prefix_groups.append(fhandle.variables[pid])
elif pid.startswith('http://') or pid.startswith('https://'):
prefix_urls.append(pid)
prefixes = {}

skipped_variables = []
for prefix_group in prefix_groups:
if prefix_group != {}:
prefixes = (dict([(prefix, getattr(prefix_group, prefix)) for
prefix in prefix_group.ncattrs() if prefix.endswith('__')]))
if isinstance(prefix_group, netCDF4._netCDF4.Variable):
skipped_variables.append(prefix_var.name)
for prefix_obj in prefix_groups:
if prefix_obj != {}:
prefixes = (dict([(prefix, getattr(prefix_obj, prefix)) for
prefix in prefix_obj.ncattrs() if prefix.endswith('__')]))
if isinstance(prefix_obj, netCDF4._netCDF4.Variable):
skipped_variables.append(prefix_obj.name)
# else:
# for k in fhandle.ncattrs():
# if k.endswith('__'):
Expand Down Expand Up @@ -1085,6 +1087,8 @@ def _load_netcdf_group_vars(fhandle, agroup, root_container, baseuri, identity_p

response = cache['https://www.opengis.net/def/binary-array-ld']
reference_graph.parse(data=response.text, format='n3')
#reference_graph.parse(data=response.text, format='turtle')


# # reference_graph.parse('https://www.opengis.net/def/binary-array-ld')
# qstr = ('prefix bald: <https://www.opengis.net/def/binary-array-ld/> '
Expand Down