diff options
Diffstat (limited to 'bsie/matcher/nodes.py')
-rw-r--r-- | bsie/matcher/nodes.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/bsie/matcher/nodes.py b/bsie/matcher/nodes.py new file mode 100644 index 0000000..047e7d1 --- /dev/null +++ b/bsie/matcher/nodes.py @@ -0,0 +1,49 @@ + +# standard imports +from dataclasses import dataclass +import typing + +# bsie imports +from bsie.utils import bsfs, ns + +# exports +__all__: typing.Sequence[str] = ( + 'Entity', + 'Face', + 'Node', + 'Person', + 'Preview', + 'Tag', + ) + +@dataclass(kw_only=True, unsafe_hash=True) +class Node: # pylint: disable=missing-class-docstring + # FIXME: Only allow changes to uri after init + uri: typing.Optional[bsfs.URI] = None + +@dataclass(kw_only=True, unsafe_hash=True) +class Entity(Node): # pylint: disable=missing-class-docstring + node_type: bsfs.URI = ns.bsn.Entity + ucid: str + +@dataclass(kw_only=True, unsafe_hash=True) +class Face(Node): # pylint: disable=missing-class-docstring + node_type: bsfs.URI = ns.bsn.Face + ucid: str + +@dataclass(kw_only=True, unsafe_hash=True) +class Person(Node): # pylint: disable=missing-class-docstring + node_type: bsfs.URI = ns.bsn.Person + +@dataclass(kw_only=True, unsafe_hash=True) +class Preview(Node): # pylint: disable=missing-class-docstring + node_type: bsfs.URI = ns.bsn.Preview + ucid: str + size: int + +@dataclass(kw_only=True, unsafe_hash=True) +class Tag(Node): # pylint: disable=missing-class-docstring + node_type: bsfs.URI = ns.bsn.Tag + label: str + +## EOF ## |