gitdelehe / ontouml-lightweight-editor

Automatically exported from code.google.com/p/ontouml-lightweight-editor
0 stars 0 forks source link

Wrong Association.getMemberEnd().size() value. (null elements) #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the ontouml2sbvr pachage, go to the TreeProcessor.java class, search for the 
.ProcessAssociation() method and change it with this small snippet (which will 
allow you to trace the error):

public void ProcessAssociation (Association a) {
    // just binary associations (not treating derivation)
    if (a.getMemberEnd().size() != 2) {
        System.out.println("association not binary -- " + a.getMemberEnd().size());
    for (Property p : a.getMemberEnd())
        System.out.println(" -- " + p.getName());
    System.out.println();
    return;
    }

Then tun the OntoUML2SBVR.java program against the attached .refontouml 
project. You will see the following dump generate by the above snippet:

association not binary -- 3
 -- marriage
 -- husband
 -- null

association not binary -- 4
 -- marriage
 -- wife
 -- null
 -- null

association not binary -- 4
 -- husband
 -- wife
 -- null
 -- null

NULL ends appear as mediated by the association which is not considered in the 
translation OntoUML->SBVR.
Obrigado.

Original issue reported on code.google.com by giulio.p...@gmail.com on 15 Jul 2014 at 4:28

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, I wrote NULL end, while it should have been "NULL named ends".

Original comment by giulio.p...@gmail.com on 15 Jul 2014 at 4:49

GoogleCodeExporter commented 9 years ago
Hi Giulio,

This was a bug in the relator pattern. The pattern was creating non-binary 
relationship which does not make any sense according to OntoUML relationships. 
I just fixed that and the fix should be available in the next release of the 
tool (perhaps v9.32) which should come out next week, probably.

Note: the fix was already commited, so you can continue to work on SVN.

Thanks a lot,
John

Original comment by johnguer...@gmail.com on 16 Jul 2014 at 2:16