Re: PROPOSAL: Extensions to XMIReader and XMIWriter interfaces
Daniel Prusa <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
More thougths on this topic: write(Collection) writes objects in Collection and all their components in the composition relation - there is not any possibility to control components writing and exclude some of them. Modified XMIReferenceProvider can solve this, however, it is a question if it is not better to have some switchable flag in write(Collection) determining whether components should be automatically included or not (if not, their serialization would be driven by their presence in Collection) - after that both types of filtering (write(Collection) vs. XMIReferenceProvider) are equivalent as for their capabilities. They differ in the way how objects to be written are specified (list of objects vs. function) which can play important role in some situations. The conclusion is I am not so sure now if the benefit of the extended XMIReferenceProvider is so big ... > it can be useful to slightly extend capabilities of > getXMIReference(RefObject) method by allowing return null value and > interpreting it as 'do not serialize this object and all links it > participate in'. It will allow to implement different types of filtering on > data in repository. If we consider write(Collection) method we can say it is > just an example of such filtering - write(Collection) can be easily > implemented using XMIRefereceProvider. Moreover, another customizations are > possible then.