json2graph.decoder.decode_obj_path

Functions to decode specificities of the object Path.

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_path_path_point(path_dict, ontouml_graph)

Create an ontouml:Point, their properties and the ontouml:point of an ontouml:Path.

create_path_properties(json_data, ontouml_graph)

Decode an object of type Path.

json2graph.decoder.decode_obj_path.set_path_path_point(path_dict, ontouml_graph)

Create an ontouml:Point, their properties and the ontouml:point of an ontouml:Path.

Parameters:
  • path_dict (dict) – Path object loaded as a dictionary.

  • ontouml_graph (Graph) – Knowledge graph that complies with the OntoUML Vocabulary.

Return type:

None

json2graph.decoder.decode_obj_path.create_path_properties(json_data, ontouml_graph)

Decode an object of type Path.

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 instances of:
  • ontouml:Point

Created properties:
  • ontouml:point (range ontouml:Point)

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