|
@@ -92,6 +92,7 @@ Create
|
|
|
__12345
|
|
|
|
|
|
The operation requires the model on which we are working, and the type of the element you want to instantiate.
|
|
|
+ Note that this type is specified by the ID of the model that is being instantiated.
|
|
|
When successful, the operation returns the identifier that can be used in future operations.
|
|
|
This identifier has no value within the model, and should only be used as a handle to that specific model element.
|
|
|
|
|
@@ -175,7 +176,10 @@ Read
|
|
|
>>> read_outgoing("models/my_pn", "p1", "P2T")
|
|
|
["p2t"]
|
|
|
|
|
|
- It is possible to get all outgoing associations as well, by leaving the type empty (the empty string).
|
|
|
+ It is possible to get all outgoing associations as well, by leaving the type empty (the empty string)::
|
|
|
+
|
|
|
+ >>> read_outgoing("models/my_pn", "p1", "")
|
|
|
+ ["p2t"]
|
|
|
|
|
|
6. *read_incoming* similarly reads out all incoming associations of a certain type, for a specific element.
|
|
|
For example, to read out all incoming T2P links of a place::
|
|
@@ -183,7 +187,10 @@ Read
|
|
|
>>> read_incoming("models/my_pn", "p2", "T2P")
|
|
|
["t2p"]
|
|
|
|
|
|
- Again, the type can be set to the empty string to return all incoming associations.
|
|
|
+ Again, the type can be set to the empty string to return all incoming associations::
|
|
|
+
|
|
|
+ >>> read_incoming("models/my_pn", "p2", "")
|
|
|
+ ["t2p"]
|
|
|
|
|
|
7. *read_association_source* reads out the source of a specific association, and can be used in conjunction with *read_outgoing* and *read_incoming*.
|
|
|
For example, to read out which is the source of an arc::
|
|
@@ -205,7 +212,8 @@ Read
|
|
|
>>> connections_between("models/my_pn", "p1", "t1")
|
|
|
["P2T"]
|
|
|
|
|
|
-10. *all_instances* read out the set of all instances of a specific type in the model.
|
|
|
+10. *all_instances* reads out the set of all instances of a specific type in the model.
|
|
|
+ Again, inheritance information is taken into account.
|
|
|
For example, to find all Places in our PetriNet model::
|
|
|
|
|
|
>>> all_instances("models/my_pn", "Place")
|