11# Auto generated from meta.yaml by pythongen.py version: 0.9.0 
2- # Generation date: 2021-05-10 17:13  
2+ # Generation date: 2021-06-11 08:45  
33# Schema: meta 
44# 
55# id: https://w3id.org/linkml/meta 
2121from  linkml_runtime .utils .enumerations  import  EnumDefinitionImpl 
2222from  rdflib  import  Namespace , URIRef 
2323from  linkml_runtime .utils .curienamespace  import  CurieNamespace 
24- from  .annotations  import  Annotation 
25- from  .extensions  import  Extension 
26- from  .types  import  Boolean , Datetime , Integer , Ncname , String , Uri , Uriorcurie 
24+ from  linkml_runtime . linkml_model .annotations  import  Annotation 
25+ from  linkml_runtime . linkml_model .extensions  import  Extension 
26+ from  linkml_runtime . linkml_model .types  import  Boolean , Datetime , Integer , Ncname , String , Uri , Uriorcurie 
2727from  linkml_runtime .utils .metamodelcore  import  Bool , NCName , URI , URIorCURIE , XSDDateTime 
2828
2929metamodel_version  =  "1.7.0" 
@@ -144,20 +144,20 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
144144            self .name  =  ElementName (self .name )
145145
146146        if  not  isinstance (self .id_prefixes , list ):
147-             self .id_prefixes  =  [self .id_prefixes ]
147+             self .id_prefixes  =  [self .id_prefixes ]  if   self . id_prefixes   is   not   None   else  [] 
148148        self .id_prefixes  =  [v  if  isinstance (v , NCName ) else  NCName (v ) for  v  in  self .id_prefixes ]
149149
150150        if  self .definition_uri  is  not None  and  not  isinstance (self .definition_uri , URIorCURIE ):
151151            self .definition_uri  =  URIorCURIE (self .definition_uri )
152152
153153        if  not  isinstance (self .aliases , list ):
154-             self .aliases  =  [self .aliases ]
154+             self .aliases  =  [self .aliases ]  if   self . aliases   is   not   None   else  [] 
155155        self .aliases  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .aliases ]
156156
157157        self ._normalize_inlined_as_dict (slot_name = "local_names" , slot_type = LocalName , key_name = "local_name_source" , keyed = True )
158158
159159        if  not  isinstance (self .mappings , list ):
160-             self .mappings  =  [self .mappings ]
160+             self .mappings  =  [self .mappings ]  if   self . mappings   is   not   None   else  [] 
161161        self .mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .mappings ]
162162
163163        if  self .description  is  not None  and  not  isinstance (self .description , str ):
@@ -169,23 +169,23 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
169169            self .deprecated  =  str (self .deprecated )
170170
171171        if  not  isinstance (self .todos , list ):
172-             self .todos  =  [self .todos ]
172+             self .todos  =  [self .todos ]  if   self . todos   is   not   None   else  [] 
173173        self .todos  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .todos ]
174174
175175        if  not  isinstance (self .notes , list ):
176-             self .notes  =  [self .notes ]
176+             self .notes  =  [self .notes ]  if   self . notes   is   not   None   else  [] 
177177        self .notes  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .notes ]
178178
179179        if  not  isinstance (self .comments , list ):
180-             self .comments  =  [self .comments ]
180+             self .comments  =  [self .comments ]  if   self . comments   is   not   None   else  [] 
181181        self .comments  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .comments ]
182182
183183        if  not  isinstance (self .examples , list ):
184-             self .examples  =  [self .examples ]
184+             self .examples  =  [self .examples ]  if   self . examples   is   not   None   else  [] 
185185        self .examples  =  [v  if  isinstance (v , Example ) else  Example (** v ) for  v  in  self .examples ]
186186
187187        if  not  isinstance (self .in_subset , list ):
188-             self .in_subset  =  [self .in_subset ]
188+             self .in_subset  =  [self .in_subset ]  if   self . in_subset   is   not   None   else  [] 
189189        self .in_subset  =  [v  if  isinstance (v , SubsetDefinitionName ) else  SubsetDefinitionName (v ) for  v  in  self .in_subset ]
190190
191191        if  self .from_schema  is  not None  and  not  isinstance (self .from_schema , URI ):
@@ -195,27 +195,27 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
195195            self .imported_from  =  str (self .imported_from )
196196
197197        if  not  isinstance (self .see_also , list ):
198-             self .see_also  =  [self .see_also ]
198+             self .see_also  =  [self .see_also ]  if   self . see_also   is   not   None   else  [] 
199199        self .see_also  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .see_also ]
200200
201201        if  not  isinstance (self .exact_mappings , list ):
202-             self .exact_mappings  =  [self .exact_mappings ]
202+             self .exact_mappings  =  [self .exact_mappings ]  if   self . exact_mappings   is   not   None   else  [] 
203203        self .exact_mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .exact_mappings ]
204204
205205        if  not  isinstance (self .close_mappings , list ):
206-             self .close_mappings  =  [self .close_mappings ]
206+             self .close_mappings  =  [self .close_mappings ]  if   self . close_mappings   is   not   None   else  [] 
207207        self .close_mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .close_mappings ]
208208
209209        if  not  isinstance (self .related_mappings , list ):
210-             self .related_mappings  =  [self .related_mappings ]
210+             self .related_mappings  =  [self .related_mappings ]  if   self . related_mappings   is   not   None   else  [] 
211211        self .related_mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .related_mappings ]
212212
213213        if  not  isinstance (self .narrow_mappings , list ):
214-             self .narrow_mappings  =  [self .narrow_mappings ]
214+             self .narrow_mappings  =  [self .narrow_mappings ]  if   self . narrow_mappings   is   not   None   else  [] 
215215        self .narrow_mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .narrow_mappings ]
216216
217217        if  not  isinstance (self .broad_mappings , list ):
218-             self .broad_mappings  =  [self .broad_mappings ]
218+             self .broad_mappings  =  [self .broad_mappings ]  if   self . broad_mappings   is   not   None   else  [] 
219219        self .broad_mappings  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .broad_mappings ]
220220
221221        if  self .deprecated_element_has_exact_replacement  is  not None  and  not  isinstance (self .deprecated_element_has_exact_replacement , URIorCURIE ):
@@ -285,7 +285,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
285285            self .version  =  str (self .version )
286286
287287        if  not  isinstance (self .imports , list ):
288-             self .imports  =  [self .imports ]
288+             self .imports  =  [self .imports ]  if   self . imports   is   not   None   else  [] 
289289        self .imports  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .imports ]
290290
291291        if  self .license  is  not None  and  not  isinstance (self .license , str ):
@@ -294,11 +294,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
294294        self ._normalize_inlined_as_dict (slot_name = "prefixes" , slot_type = Prefix , key_name = "prefix_prefix" , keyed = True )
295295
296296        if  not  isinstance (self .emit_prefixes , list ):
297-             self .emit_prefixes  =  [self .emit_prefixes ]
297+             self .emit_prefixes  =  [self .emit_prefixes ]  if   self . emit_prefixes   is   not   None   else  [] 
298298        self .emit_prefixes  =  [v  if  isinstance (v , NCName ) else  NCName (v ) for  v  in  self .emit_prefixes ]
299299
300300        if  not  isinstance (self .default_curi_maps , list ):
301-             self .default_curi_maps  =  [self .default_curi_maps ]
301+             self .default_curi_maps  =  [self .default_curi_maps ]  if   self . default_curi_maps   is   not   None   else  [] 
302302        self .default_curi_maps  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .default_curi_maps ]
303303
304304        if  self .default_prefix  is  not None  and  not  isinstance (self .default_prefix , str ):
@@ -421,6 +421,7 @@ class Definition(Element):
421421    last_updated_on : Optional [Union [str , XSDDateTime ]] =  None 
422422    modified_by : Optional [Union [str , URIorCURIE ]] =  None 
423423    status : Optional [Union [str , URIorCURIE ]] =  None 
424+     string_serialization : Optional [str ] =  None 
424425
425426    def  __post_init__ (self , * _ : List [str ], ** kwargs : Dict [str , Any ]):
426427        if  self .is_a  is  not None  and  not  isinstance (self .is_a , DefinitionName ):
@@ -433,15 +434,15 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
433434            self .mixin  =  Bool (self .mixin )
434435
435436        if  not  isinstance (self .mixins , list ):
436-             self .mixins  =  [self .mixins ]
437+             self .mixins  =  [self .mixins ]  if   self . mixins   is   not   None   else  [] 
437438        self .mixins  =  [v  if  isinstance (v , DefinitionName ) else  DefinitionName (v ) for  v  in  self .mixins ]
438439
439440        if  not  isinstance (self .apply_to , list ):
440-             self .apply_to  =  [self .apply_to ]
441+             self .apply_to  =  [self .apply_to ]  if   self . apply_to   is   not   None   else  [] 
441442        self .apply_to  =  [v  if  isinstance (v , DefinitionName ) else  DefinitionName (v ) for  v  in  self .apply_to ]
442443
443444        if  not  isinstance (self .values_from , list ):
444-             self .values_from  =  [self .values_from ]
445+             self .values_from  =  [self .values_from ]  if   self . values_from   is   not   None   else  [] 
445446        self .values_from  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .values_from ]
446447
447448        if  self .created_by  is  not None  and  not  isinstance (self .created_by , URIorCURIE ):
@@ -459,6 +460,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
459460        if  self .status  is  not None  and  not  isinstance (self .status , URIorCURIE ):
460461            self .status  =  URIorCURIE (self .status )
461462
463+         if  self .string_serialization  is  not None  and  not  isinstance (self .string_serialization , str ):
464+             self .string_serialization  =  str (self .string_serialization )
465+ 
462466        super ().__post_init__ (** kwargs )
463467
464468
@@ -600,7 +604,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
600604            self .owner  =  DefinitionName (self .owner )
601605
602606        if  not  isinstance (self .domain_of , list ):
603-             self .domain_of  =  [self .domain_of ]
607+             self .domain_of  =  [self .domain_of ]  if   self . domain_of   is   not   None   else  [] 
604608        self .domain_of  =  [v  if  isinstance (v , ClassDefinitionName ) else  ClassDefinitionName (v ) for  v  in  self .domain_of ]
605609
606610        if  self .subproperty_of  is  not None  and  not  isinstance (self .subproperty_of , SlotDefinitionName ):
@@ -640,11 +644,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
640644            self .is_a  =  SlotDefinitionName (self .is_a )
641645
642646        if  not  isinstance (self .mixins , list ):
643-             self .mixins  =  [self .mixins ]
647+             self .mixins  =  [self .mixins ]  if   self . mixins   is   not   None   else  [] 
644648        self .mixins  =  [v  if  isinstance (v , SlotDefinitionName ) else  SlotDefinitionName (v ) for  v  in  self .mixins ]
645649
646650        if  not  isinstance (self .apply_to , list ):
647-             self .apply_to  =  [self .apply_to ]
651+             self .apply_to  =  [self .apply_to ]  if   self . apply_to   is   not   None   else  [] 
648652        self .apply_to  =  [v  if  isinstance (v , SlotDefinitionName ) else  SlotDefinitionName (v ) for  v  in  self .apply_to ]
649653
650654        super ().__post_init__ (** kwargs )
@@ -682,7 +686,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
682686            self .name  =  ClassDefinitionName (self .name )
683687
684688        if  not  isinstance (self .slots , list ):
685-             self .slots  =  [self .slots ]
689+             self .slots  =  [self .slots ]  if   self . slots   is   not   None   else  [] 
686690        self .slots  =  [v  if  isinstance (v , SlotDefinitionName ) else  SlotDefinitionName (v ) for  v  in  self .slots ]
687691
688692        self ._normalize_inlined_as_dict (slot_name = "slot_usage" , slot_type = SlotDefinition , key_name = "name" , keyed = True )
@@ -696,11 +700,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
696700            self .subclass_of  =  URIorCURIE (self .subclass_of )
697701
698702        if  not  isinstance (self .union_of , list ):
699-             self .union_of  =  [self .union_of ]
703+             self .union_of  =  [self .union_of ]  if   self . union_of   is   not   None   else  [] 
700704        self .union_of  =  [v  if  isinstance (v , ClassDefinitionName ) else  ClassDefinitionName (v ) for  v  in  self .union_of ]
701705
702706        if  not  isinstance (self .defining_slots , list ):
703-             self .defining_slots  =  [self .defining_slots ]
707+             self .defining_slots  =  [self .defining_slots ]  if   self . defining_slots   is   not   None   else  [] 
704708        self .defining_slots  =  [v  if  isinstance (v , SlotDefinitionName ) else  SlotDefinitionName (v ) for  v  in  self .defining_slots ]
705709
706710        if  self .tree_root  is  not None  and  not  isinstance (self .tree_root , Bool ):
@@ -710,11 +714,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
710714            self .is_a  =  ClassDefinitionName (self .is_a )
711715
712716        if  not  isinstance (self .mixins , list ):
713-             self .mixins  =  [self .mixins ]
717+             self .mixins  =  [self .mixins ]  if   self . mixins   is   not   None   else  [] 
714718        self .mixins  =  [v  if  isinstance (v , ClassDefinitionName ) else  ClassDefinitionName (v ) for  v  in  self .mixins ]
715719
716720        if  not  isinstance (self .apply_to , list ):
717-             self .apply_to  =  [self .apply_to ]
721+             self .apply_to  =  [self .apply_to ]  if   self . apply_to   is   not   None   else  [] 
718722        self .apply_to  =  [v  if  isinstance (v , ClassDefinitionName ) else  ClassDefinitionName (v ) for  v  in  self .apply_to ]
719723
720724        super ().__post_init__ (** kwargs )
@@ -882,23 +886,23 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
882886            self .deprecated  =  str (self .deprecated )
883887
884888        if  not  isinstance (self .todos , list ):
885-             self .todos  =  [self .todos ]
889+             self .todos  =  [self .todos ]  if   self . todos   is   not   None   else  [] 
886890        self .todos  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .todos ]
887891
888892        if  not  isinstance (self .notes , list ):
889-             self .notes  =  [self .notes ]
893+             self .notes  =  [self .notes ]  if   self . notes   is   not   None   else  [] 
890894        self .notes  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .notes ]
891895
892896        if  not  isinstance (self .comments , list ):
893-             self .comments  =  [self .comments ]
897+             self .comments  =  [self .comments ]  if   self . comments   is   not   None   else  [] 
894898        self .comments  =  [v  if  isinstance (v , str ) else  str (v ) for  v  in  self .comments ]
895899
896900        if  not  isinstance (self .examples , list ):
897-             self .examples  =  [self .examples ]
901+             self .examples  =  [self .examples ]  if   self . examples   is   not   None   else  [] 
898902        self .examples  =  [v  if  isinstance (v , Example ) else  Example (** v ) for  v  in  self .examples ]
899903
900904        if  not  isinstance (self .in_subset , list ):
901-             self .in_subset  =  [self .in_subset ]
905+             self .in_subset  =  [self .in_subset ]  if   self . in_subset   is   not   None   else  [] 
902906        self .in_subset  =  [v  if  isinstance (v , SubsetDefinitionName ) else  SubsetDefinitionName (v ) for  v  in  self .in_subset ]
903907
904908        if  self .from_schema  is  not None  and  not  isinstance (self .from_schema , URI ):
@@ -908,7 +912,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
908912            self .imported_from  =  str (self .imported_from )
909913
910914        if  not  isinstance (self .see_also , list ):
911-             self .see_also  =  [self .see_also ]
915+             self .see_also  =  [self .see_also ]  if   self . see_also   is   not   None   else  [] 
912916        self .see_also  =  [v  if  isinstance (v , URIorCURIE ) else  URIorCURIE (v ) for  v  in  self .see_also ]
913917
914918        if  self .deprecated_element_has_exact_replacement  is  not None  and  not  isinstance (self .deprecated_element_has_exact_replacement , URIorCURIE ):
@@ -921,7 +925,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
921925            self .is_a  =  PermissibleValueText (self .is_a )
922926
923927        if  not  isinstance (self .mixins , list ):
924-             self .mixins  =  [self .mixins ]
928+             self .mixins  =  [self .mixins ]  if   self . mixins   is   not   None   else  [] 
925929        self .mixins  =  [v  if  isinstance (v , PermissibleValueText ) else  PermissibleValueText (v ) for  v  in  self .mixins ]
926930
927931        self ._normalize_inlined_as_dict (slot_name = "extensions" , slot_type = Extension , key_name = "tag" , keyed = False )
0 commit comments