json2graph.decoder.decode_obj_generalizationset
Functions to decode specificities of the object GeneralizationSet.
- Function’s nomenclatures:
Functions that set one property are named: set_<subject>_<predicate>_<object>.
Functions that set multiple object properties are named: set_<subject>_relations.
Functions that set multiple data properties are named: set_<subject>_attributes.
Functions that set both object and data properties are named: set_<subject>_properties.
Functions that set default values: set_<subject>_defaults.
Module Contents
Functions
|
Set the default values to ontouml:generalizationSets to the resulting graph. |
Set the ontouml:generalization and ontouml:categorizer property to the resulting graph. |
|
|
Decode an object of type GeneralizationSet. |
- json2graph.decoder.decode_obj_generalizationset.set_generalizationset_defaults(generalizationset_dict, ontouml_graph)
Set the default values to ontouml:generalizationSets to the resulting graph.
Default isDisjoint: If isDisjoint is null, set as False.
Default isComplete: If isComplete is null, set as False.
- Parameters:
generalizationset_dict (dict) – GeneralizationSet object loaded as a dictionary.
ontouml_graph (Graph) – Knowledge graph that complies with the OntoUML Vocabulary.
- Return type:
None
- json2graph.decoder.decode_obj_generalizationset.set_generalizationset_relations(generalizationset_dict, ontouml_graph)
Set the ontouml:generalization and ontouml:categorizer property to the resulting graph.
- Parameters:
generalizationset_dict (dict) – GeneralizationSet object loaded as a dictionary.
ontouml_graph (Graph) – Knowledge graph that complies with the OntoUML Vocabulary.
- Return type:
None
- json2graph.decoder.decode_obj_generalizationset.create_generalizationset_properties(json_data, ontouml_graph)
Decode an object of type GeneralizationSet.
Receives the whole JSON loaded data as a dictionary and manipulates it to create all properties in which the object’s type is domain of.
- Created properties:
ontouml:generalization (range ontouml:Generalization)
ontouml:categorizer (range ontouml:Class)
- Parameters:
json_data (dict) – JSON’s data to have its fields decoded loaded into a dictionary.
ontouml_graph (Graph) – Knowledge graph that complies with the OntoUML Vocabulary.
- Return type:
None