768004a9a75008184cbe5c61ee5db397fdfcdf17
[librarian.git] / src / librarian / meta / types / text.py
1 from .base import MetaValue
2
3
4 class TextValue(MetaValue, str):
5     @classmethod
6     def from_text(cls, text):
7         return cls(str(text))
8
9     def __str__(self):
10         return self.value
11
12
13
14 class NameIdentifier(TextValue):
15     has_language = False
16
17
18 class LegimiCategory(NameIdentifier):
19     pass
20
21
22 class ThemaCategory(NameIdentifier):
23     pass
24
25
26 class Epoch(NameIdentifier):
27     pass
28
29
30 class Kind(NameIdentifier):
31     pass
32
33
34 class Genre(NameIdentifier):
35     pass
36
37
38 class Audience(NameIdentifier):
39     pass