diff options
Diffstat (limited to 'bsie/lib')
-rw-r--r-- | bsie/lib/__init__.py | 5 | ||||
-rw-r--r-- | bsie/lib/bsie.py | 5 | ||||
-rw-r--r-- | bsie/lib/builder.py | 5 | ||||
-rw-r--r-- | bsie/lib/naming_policy.py | 13 | ||||
-rw-r--r-- | bsie/lib/pipeline.py | 7 |
5 files changed, 5 insertions, 30 deletions
diff --git a/bsie/lib/__init__.py b/bsie/lib/__init__.py index 48379de..f44fb74 100644 --- a/bsie/lib/__init__.py +++ b/bsie/lib/__init__.py @@ -1,9 +1,4 @@ -""" -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports import typing diff --git a/bsie/lib/bsie.py b/bsie/lib/bsie.py index a572525..b02e707 100644 --- a/bsie/lib/bsie.py +++ b/bsie/lib/bsie.py @@ -1,9 +1,4 @@ -""" -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports import typing diff --git a/bsie/lib/builder.py b/bsie/lib/builder.py index 39da441..3a15311 100644 --- a/bsie/lib/builder.py +++ b/bsie/lib/builder.py @@ -1,9 +1,4 @@ -""" -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports import logging import typing diff --git a/bsie/lib/naming_policy.py b/bsie/lib/naming_policy.py index 131a70b..9b9a45d 100644 --- a/bsie/lib/naming_policy.py +++ b/bsie/lib/naming_policy.py @@ -1,9 +1,4 @@ -""" -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports import abc import os @@ -85,9 +80,9 @@ class DefaultNamingPolicy(NamingPolicy): def handle_node(self, node: Node) -> Node: if node.uri is not None: return node - if node.node_type == ns.bsfs.File: + if node.node_type == ns.bsn.Entity : return self.name_file(node) - if node.node_type == ns.bsfs.Preview: + if node.node_type == ns.bsn.Preview: return self.name_preview(node) raise errors.ProgrammingError('no naming policy available for {node.node_type}') @@ -97,7 +92,7 @@ class DefaultNamingPolicy(NamingPolicy): fragment = node.hints['ucid'] else: # random name fragment = self._uuid() - node.uri = (self._prefix + 'file')[fragment] + node.uri = getattr(self._prefix.file(), fragment) return node def name_preview(self, node: Node) -> Node: @@ -114,7 +109,7 @@ class DefaultNamingPolicy(NamingPolicy): fragment = self._uuid() if 'size' in node.hints: # append size fragment += '_s' + str(node.hints['size']) - node.uri = (self._prefix + 'preview')[fragment] + node.uri = getattr(self._prefix.preview(), fragment) return node ## EOF ## diff --git a/bsie/lib/pipeline.py b/bsie/lib/pipeline.py index 0bc5109..30fd6fd 100644 --- a/bsie/lib/pipeline.py +++ b/bsie/lib/pipeline.py @@ -1,9 +1,4 @@ -""" -Part of the bsie module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports from collections import defaultdict import logging @@ -109,7 +104,7 @@ class Pipeline(): rdr2ext[rdr].add(ext) # create subject for file - subject = node.Node(ns.bsfs.File, + subject = node.Node(ns.bsn.Entity, ucid=bsfs.uuid.UCID.from_path(path), ) |