Network SubModels

From DSL

Jump to: navigation, search

[edit] Methods: Submodels

GeNIe supports encapsulation of parts of models inside containers called submodels. The following methods allows for submodel management.


  • int getSubmodelHandle(String id)

Returns the handle of the submodel with the specified id.


  • int getMainSubmodelHandle()

Returns the handle of the main submodel (which is the model itself).


  • String getMainSubmodelId()

Returns the id of the main submodel (which is the model itself). Calling this method is actually equivalent to calling getId().


  • void addSubmodel(int parentHandle, String id)

Adds a submodel to the specified model (parentHandle). To add a submodel to the main model use: addSubmodel(getMainSubmodelHandle, "new_submodel_id").


  • void deleteSubmodel(int handle)

void deleteSubmodel(String id)

Deletes the specified submodel from the network.


  • void setSubmodelId(int handle, String id)

Sets the id of the specified submodel.


  • String getSubmodelId(int handle)

Returns the id of the specified submodel.


  • void setSubmodelName(int handle, String name)

void setSubmodelName(String idm String name)

Sets the name of the specified submodel.


  • String getSubmodelName(int handle)

String getSubmodelName(String id)

Returns the name of the specified submodel.


  • void setSubmodelAnnotation(int handle, String annotation)

void setSubmodelAnnotation(String idm String annotation)

Sets the annotation of the specified submodel.


  • String getSubmodelAnnotation(int handle)

String getSubmodelAnnotation(String id)

Returns the annotation of the specified submodel.


  • void linkNodeToSubmodel(int submodelHandle, int nodeHandle)

void linkNodeToSubmodel(String submodelId, int nodeHandle)

void linkNodeToSubmodel(int submodelHandle, String nodeId)

void linkNodeToSubmodel(String submodelId, String nodeId)

Links the specified node to the specified submodel. This can be used to add/remove nodes to/from a submodel.


  • int getSubmodelCount()

Returns the number of submodels in the system.


  • int getNextSubmodel(int handle)

Returns the handle of the next submodel. Works symmetrically to getNextNode().


  • String getSubmodelOfNode(int nodehandle)

String getSubmodelOfNode(String nodeId)

Returns the id of a submodel where the specified node is located.


  • int getNextSubmodel(int handle)

Returns the handle of the next submodel. Works symmetrically to getNextNode().

Personal tools