« Back to Fachhochschule St.Gallen - Hochschule für Angewandte Wissenschaften

changing status of attributes belonging to different classes

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dear all,

I'd like to pose you a question concerning the dynamicity of attributes.
How can I change the status of an attribute as consequence of the status acquired by another attribute which belongs to a different class?
e.g.
The knowledge representation is in OWL.
when the data property "Is_succeeded" of the class "KneeReplacementSurgery" gets the value "Yes", I'd like to change the data property "has_status" of the class "Gateway" from "Nagative" to "Positive".
As an alternative to change the data property value, the color of the symbol depicting the class "Gateway" could be changed.

Thank you in advance,
Emanuele

RE: changing status of attributes belonging to different classes
Answer
6/2/14 6:41 AM as a reply to Emanuele Laurenzi.
Dear Emanuele,
attached you can find the two solutions for implementing this dynamic change attribute. Please find attached a sample implementation and example models on the 2 solutions. The libraries are also available in the SVN.

1) EXPRESSION Attribute:
This implementation uses an expression attribute to retrieve the value of another attribute and also adapt the graphical representation accordingly. Please notice that you can write expressions in the Development Toolkit environment as well as in the Notebook of the object in the Modelling Toolkit environment, depending on the planned behaviour.

ABL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueExpression_ADOxx1.3UL1/BIN/ExpressionAttributeLibrary.abl
ADL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueExpression_ADOxx1.3UL1/DOC/ExpressionAttrModel.adl

2) EVENT Handler:
You can also implement the behaviour as an event handler. For this purpose you can use the Event "AfterEditAttributeValue" and combine it with a "IF" condition.

ABL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueEvent_ADOxx13UL1/BIN/ChangeAttributeValueEventLibrary.abl
ADL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueEvent_ADOxx13UL1/DOC/ChangeAttributeValueEventModel.adl