openclean.engine.object.vocabulary module
Handle and factory implementations for controlled vocabularies that are registered with the object library.
- class openclean.engine.object.vocabulary.VocabularyFactory
Bases:
openclean.engine.object.base.ObjectFactory
Factory for controlled vocabularies.
- deserialize(descriptor: Dict, data: List) openclean.engine.object.base.ObjectHandle
Convert an object serialization that was generated by the object serializer into a vocabulary handle.
- Parameters
descriptor (dict) – Dictionary serialization for the vocabulary descriptor as created by the serialize method.
data (list of dict) – Serialization for the terms in the vocabulary.
- Return type
- serialize(object: openclean.engine.object.vocabulary.VocabularyHandle) Tuple[Dict, List]
Serialize the given controlled vocabulary handle.
- Parameters
object (openclean.engine.object.vocabulary.VocabularyHandle) – Object of type that is supported by the serializer.
- Return type
tuple of dict and list
- class openclean.engine.object.vocabulary.VocabularyHandle(values: Set, name: str, namespace: Optional[str] = None, label: Optional[str] = None, description: Optional[str] = None)
Bases:
openclean.engine.object.base.ObjectHandle
Handle for controlled vocabularies that are registered with the object library. Extends the base handle with a set of values that form the terms in the vocabulary.
- name: str