org.netbeans.api.mdr/1 1.4.22

org.netbeans.api.xmi
Interface XMIReferenceProvider


public interface XMIReferenceProvider

Implementation of this interface can be passed to XMI producers/writers (using XMIOutputConfig.setReferenceProvider(org.netbeans.api.xmi.XMIReferenceProvider) method) to enable custom controling of target documents the written object should go into and what XMI ID they should use. If an XMI producer supports this property, it will call getReference(javax.jmi.reflect.RefObject) method for each RefObject to be written into the document and either use the XMI ID returned (if the object should reside in the same document) or serialize only a href to the object (if it resides in a different XMI document).


Nested Class Summary
static class XMIReferenceProvider.XMIReference
          Simple structure for representing XMI references to elements corresponding to an object.
 
Method Summary
 XMIReferenceProvider.XMIReference getReference(javax.jmi.reflect.RefObject object)
          Method called by XMI producer for each object that is serialized or referenced from the generated XMI document.
 

Method Detail

getReference

XMIReferenceProvider.XMIReference getReference(javax.jmi.reflect.RefObject object)
Method called by XMI producer for each object that is serialized or referenced from the generated XMI document. If the returned reference points to the same document as being written, xmi.id part of the returned reference will be used and wherever the element is referenced, simple xmi.idref with this xmi.id will be generated. If the returned reference points to a different file, href will be generated. Format of the generated href should be result of the following:

getDocumentURI() + "#" + getXmiId()

Parameters:
object - Object to be serialized (or referenced).
Returns:
Structure representing reference to the object.

org.netbeans.api.mdr/1 1.4.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.