| java.lang.Object com.metaboss.sdlctools.models.impl.XMIReferenceResolverImpl
XMIReferenceResolverImpl | public class XMIReferenceResolverImpl implements XMIReferenceResolver(Code) | | Implementation of the XMIReferenceResolver, which takes care of partitioning.
|
Method Summary | |
public void | register(String pSystemId, String pXmiId, RefObject pRefObject) Registers an object that can be resolved. | public void | resolve(Client client, RefPackage extent, String systemId, XMIInputConfig configuration, Collection hrefs) Resolves external references and calls
XMIReferenceResolver.Client.resolvedReference for each.
Before returning from this method (only in case of outermost call to it - i.e. |
XMIReferenceResolverImpl | public XMIReferenceResolverImpl(File pModelRootDirectory, XmiIdGenerator pXmiIdGenerator)(Code) | | Parameters: pModelRootDirectory - - file representing the root directory of the model we use it to look for files Parameters: pObjectsInPartitionsMap - - map of xmiIds stored in each systemId we register each resolved xmi id with it Parameters: pXmiIdGenerator - - utility xmiId generator we put known ids to it so they do not get reused |
register | public void register(String pSystemId, String pXmiId, RefObject pRefObject)(Code) | | Registers an object that can be resolved. This method should be called by
XMI consumer each time it successfuly deserializes an object from XMI, given that the object
was assigned an xmiId (for objects that do not have xmiId defined in XMI file
this method should not be called).
Implementation of this interface should remember all the registered objects and
use them for resolving hrefs.
Parameters: pSystemId - URI of the document that called this method (the URI is essential forcorrect resolution of cyclic and relative references). Parameters: pXmiId - XMI ID of the object deserialized from XMI. If XMI ID for the objectis not available, this method should not be called. Parameters: object - Object deserialized from XMI. |
resolve | public void resolve(Client client, RefPackage extent, String systemId, XMIInputConfig configuration, Collection hrefs) throws MalformedXMIException, IOException(Code) | | Resolves external references and calls
XMIReferenceResolver.Client.resolvedReference for each.
Before returning from this method (only in case of outermost call to it - i.e. this
does not hold for nested recursive calls from XMI consumers created from within this
method) the instance of this class should be restored to its initial state (all
registered references should be forgotten).
Parameters: client - Implementation of callback method used for reference resolving notifications. Parameters: extent - Target package (for resolved objects). Parameters: systemId - URI of the document where href is used. This parameter is provided only if it is known by XMI consumer, otherwise null is passed. Parameters: configuration - Configuration to be used for XMI consumer used for reading external XMI document to resolve the href (if needed). Parameters: hrefs - References to be resolved. throws: MalformedXMIException - Thrownto indicate an error (element cannot be resolved, etc.) throws: IOException - I/O error during XMI reading. |
|
|