Skip to content

Commit

Permalink
Add a method to remove DwC name space prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafelafrance committed Mar 1, 2024
1 parent acdba6a commit 2f841fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions traiter/pylib/darwin_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def ns(name):
namespace = DC if name in DUBLIN else DWC
return name if name.startswith(namespace) else namespace + name

@staticmethod
def remove_ns(label):
return label.split(":")[-1]

def items(self):
yield from {k: v for k, v in self.props.items() if k != DYN}.items()
if self.props[DYN]:
Expand Down

0 comments on commit 2f841fb

Please sign in to comment.