casework / CASE-Mapping-Python

Apache License 2.0
0 stars 3 forks source link

Fix #17 issue, adding ObservableApplicationVersion class, changing Ap… #58

Closed fabrizio-turchi closed 4 months ago

fabrizio-turchi commented 5 months ago

@ajnelson-nist I changed the Bundle class in core module, by defining a new "property" self["uco-core:UcoInherentCharacterizationThing"] = [] and adding the append_to_uco_inherent_characterization_thing(self, *args) method. Therefore instead of defining the super classes (UcoThing and UcoInherentCharacterizationThing) I thought that the changes I made could be a simpler solution. If you think it would be better to adopt another solution let me know, I will gladly do so!

fabrizio-turchi commented 4 months ago

@ajnelson-nist A slightly better solution would be to avoid the statement:

self["uco-core:UcoInherentCharacterizationThing"] = []

and change the append_to_uco_inherent_characterization_thing method like this:

if not self.get("uco-core:UcoInherentCharacterizationThing"):
            self["uco-core:UcoInherentCharacterizationThing"] = []

self._append_observable_objects(
    "uco-core:UcoInherentCharacterizationThing", *args
)