站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

XMIReferenceProvider (NetBeans MDR API) - NetBeans API Javadoc 5.0.0

 

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

public 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.

 

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