Re: PROPOSAL (round 4): Extensions to MDR XMI API

Brian Smith <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Martin,

0. Could you explain what the intended threading model is? I.e. when can 
multiple threads simultaneously operate on a shared 
XMIReader/XMIWriter/XMIProducer/XMIReferenceResolver/etc.

1. Do you think that XMIOutputConfig/XMIInputConfig need to be abstract? 
I am thinking that they are just a statically-typed variant of 
Properties/Map.

2. I think that XMIOutputConfig and XMIInputConfig need to be Cloneable 
or at least there should be some other way to copy them.

3. There is an obscure (never used?) XMI.Reference element in XMI (See 
XMI 1.2 3.8.4). I think the motivation for the XMI.Reference element is 
to allow links to binary data (e.g. icons for stereotypes in the UML 
metamodel). Do you think that XMIReferenceResolver and 
XMIReferenceProvider can be used for them? If not, maybe that could be 
noted in the JavaDoc to avoid confusion since the names are similar.

4. I don't see how an XMIReferenceResolver can be used in multiple 
invocations (concurrent or serialized), because it is stateful, and 
because there is no way to reset the state. Is it your intention that an 
ever-accumulating state is to be shared by multiple readers, and that a 
new XMIReferenceResolver/XMIInputConfig needs to be created whenever a 
fresh state is needed?

5. Do you think it would be a good idea to have XMIReferenceProvider be 
able to (optionally) provide xmi.uuid values too?

6. I recommend that you add some package-level JavaDoc to 
org.netbeans.api.xmi that makes it clear that XMI is for JMI-related 
stuff and not for general-purpose XML processing like org.netbeans.api.xml.

8. I recommend that the SAX-specific stuff be moved into a package like 
org.netbeans.api.xmi.sax like was done for javax.xml.transform.sax. I 
might also like to add an org.netbeans.api.xmi.dom and implementation 
sometime, as I mentioned before. This would also let you just say that 
the "SAX API" = org.netbeans.api.xmi.sax and that the entire package is 
currently unstable.

Thanks,
Brian

Martin Matula wrote:
> Attached are sources and javadoc of the 4th revision of XMI API. I have 
> fully separated SAX logic from standard XMI logic as suggested by Brian. 
> XMIConsumer, XMIProducer and their factories are included only to 
> demonstrate how the interfaces can be extended in the future. These four 
> interfaces will not be added to the MDR API now - they are there just to 
> prove that it will be easy to add them if the other interfaces will look 
> like as proposed in this proposal.
> We need to finalize this discussion so please send your comments as soon 
> as possible.
> Thanks,
> Martin
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.