def __init__(self, string_value: Optional[str] = None) -> None:
        """
        Constructor from optional string value.
        :param string_value:
        """
        assert (string_value is None or len(string_value) in (2, 3))
        if string_value is not None:
            char1 = string_value[0]
            assert (char1 in "CFMLODR")
            self.leaf = char1 in 'LMR'
            self.approximate = char1 == 'M'
            self.draggable = char1 in 'FD'
            self.concept = char1 in 'CFML'

            char2 = string_value[1]
            assert (char2 in "AIH")
            self.active = char2 == 'A'
            self.hidden = char2 == 'H'

            char3 = string_value[2] if len(cast(Sized, string_value)) == 3 else ' '
            assert (char3 in " E")
            self.editable = char3 == 'E'
        else:
            self.leaf = False           # C
            self.approximate = False    # Leaf only - multiple targets
            self.draggable = True       # Folder only
            self.concept = True         # Concept or Modifier Dimension

            self.active = True
            self.hidden = False         # No commitment whether hidden is active

            self.editable = True
def __init__ ( self , string_value : Optional [ str ] = None ) -> None : assert ( string_value is None or len ( string_value ) in ( 2 , 3 ) ) if string_value is not None : char1 = string_value [ 0 ] assert ( char1 in "CFMLODR" ) self . leaf = char1 in 'LMR' self . approximate = char1 == 'M' self . draggable = char1 in 'FD' self . concept = char1 in 'CFML' char2 = string_value [ 1 ] assert ( char2 in "AIH" ) self . active = char2 == 'A' self . hidden = char2 == 'H' char3 = string_value [ 2 ] if len ( cast ( Sized , string_value ) ) == 3 else ' ' assert ( char3 in " E" ) self . editable = char3 == 'E' else : self . leaf = False self . approximate = False self . draggable = True self . concept = True self . active = True self . hidden = False self . editable = True
Constructor from optional string value.
        :param string_value: