Re: PROPOSAL: Extensions to XMIReader and XMIWriter interfaces
Martin Matula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Michiel, Vries, Michiel de wrote: > The issues which we see are the following: > > - the HRefResolver needs to receive a little bit more information: we need > to have the type of the object to be resolved. This to be able to create a > placeholder for the object. How is the XMIReader supposed to find out the type? I guess this would only work with the files written with our XMIWriter (that would add a specific decoration to each href). But in that case, why don't you implement the XMIReferenceProvider the way that it will encode the type information in the returned reference (xmi.id and href)? This is a good solution for you and does not require any changes to be made to XMI writer used also by the people that do not need this. > - for reading we would like to have the xmi writer to write the most > specific type to the output file, because in that case the reader knows the > actual type for which a placeholder needs to be created. Why don't you encode the type information in xmi.id/href? (see above) > - for writing we need to have a link to the refObject and a String > representing the current filename. In that way you can distinguish if the > refObject needs to be in a different filename than the current one. OK, I thought that this may be passed to the XMIReferenceProvider constructor, however I can add it as a parameter to getReference method if you want. Martin