This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | XMIReader can't load model written by XMIWriter | ||
---|---|---|---|
Product: | java | Reporter: | Mark McKinlay <mckinlay> |
Component: | Unsupported | Assignee: | Daniel Prusa <dprusa> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | XMI Meta-model fro list issue |
Description
Mark McKinlay
2002-05-31 01:59:37 UTC
Created attachment 6018 [details]
XMI Meta-model fro list issue
I have investigated the attached APML metamodel and I have found out that the association end "dest" in the association "LogicInLinks" and the association end "src" in "LogicOutLinks" are both of the "composite" aggregation type. If we have an association containing ends E1 and E2, where e.g. E2 is composite, and there exists a link (o1, o2) related to the association, then object o1 is considered to be a component of o2. It is a simililar situation as in case of attributes' values and it holds that an object can be a component of at most one composite object. Your code performs: start.getOutLinks().add(link); /* "link" become a component of "start" node */ end.getInLinks().add(link); /* a JMI exception should be thrown here, "link" cannot become a component of another object */ So the conclusions are: 1) There is a bug in mdr - it does not check composite relations when links are added. 2) XMI Writer does not generate correct XMI files when requirements on compositions are not satisfied. 3) Since LogicLink is expected to be connected with two Nodes I suggest you to change "composite" aggregation type in both cases to "none" aggregation type. Dan, can we close this issue? Yes, it can be closed, since checking of composite relations has been implemented (point (3) is fixed). |