Stream exchange services
Presentation
Objecteering provides two services for stream exchange facilities and two formats:
· the "externalization format": This format is specific to Objecteering. It has the advantage of providing a complete stream storage of the Objecteering data, and of using the universal identification mechanism. The teamwork facility and the module externalization service use this format.
· the XMI format: This format corresponds to the OMG UML XMI standard. It is an open format which allows the exchange of models between different tools. It contains neither Objecteering-specific data nor diagrams, nor does it use identifiers.
"Externalization" format services
boolean Object:externalizeIntoDir
(in String dirName, in boolean isRecursive)
This either recursively externalizes or not, according to "isRecursive", the current object in the "dirName" directory in one or several files. It returns "true" if this has been correctly carried out.
boolean Object:internalizeFile
(in String rootFile, in String dirName,
in boolean recursive)
This internalizes the "rootFile" file contained in "dirName". If "recursive" is true, then all components of the object described in "rootFile" are also internalized.
If "recursive" if false, then only components which are not described in their own file are internalized.
In this mode, if the object described in "rootFile" exists in the database before internalization and there are non-internalized components described in "rootFile", these remain linked as components.
Those which are not described in "rootFile" are deleted.
When the "internalizeFile" service is called on an externalized file corresponding to a package in non-recursive mode, only "simple" elements, which are not themselves described through externalized files (for example, types), are internalized with the package. Any sub-packages or classes described in the externalized file of the parent package ("rootFile") are not internalized, even though references to these objects are present in this file. Only by calling the "internalizeFile" service in recursive mode is it possible to internalize sub-packages and classes.
If the internalization has been properly carried out, this returns "true". The internalization is always carried out in the context of a project.
boolean Object:internalizeSetOfFiles
(in String rootFiles[], in String dirName,
in boolean recursive)
The same is true for "internalizeFile" but a set of files which are internalized are taken into account all at once.
String Object:getExternalFileNameFromObject
(in String pRootDir, in boolean pWithExt)
This returns the name of the externalization file associated with the current object.
If "pWithExt" is true, the externalization files extension is added. "pRootDir" can be an empty string.
String Object:getExternalFileNameFromString
(in String pRootDir,
in String pObjectLogicalId,
in String pObjectName, in boolean pWithExt)
This returns the name of the externalization file associated with the object identified by "pObjectLogicalId" or "pObjectName" name, preceded by "pRootDir". If "pWithExt" is true, the externalization files extension is added. "pRootDir" can be an empty string.
The pObjectLogicalId and pObjectName parameters are exclusive. In the case of conflict, "pObjectLogicalId" is selected. Use "pObjectName" for a "Project" or a "SoModule".