To use the connector RPY in a Eclipse application, this property
"rhapsody.omroot"
must be set first to the location of a Rhapsody Share
folder, see this paragraph.
To use this connector in a Java program, please refer to this paragraph for details.
If properties are not declared, default values are used, see underlined values.
rhapsody.omroot
Share
folder. Default path is computed with the current open Rhapsody
application, see details.rpy.ini.file
logFile=d:/rpy.log traceRPY=false loglevelRPY=error resolveUnloadedHandlers=false ignoreReadOnly=true ignoreUseExternal=true ignoreFullPathName=true ignoreFeatureDescriptions=true computeAllTags=true disabledProcess=derived,Component
rpy.ini.file
, the file is search under the HOME path according to the OS.rpy.ini.file
could be set only in the Java command-line arguments for a simple Java Program:
java -Drpy.ini.file=d:\rpy_config.ini -Drhapsody.omroot=D:/Users/user-id/IBM/Rational/Rhapsody/8.1.4/Share -jar MyProgram.jarOr for an Eclipse platform in the Configuration File:
-vmargs -Drhapsody.omroot=D:/Users/user-id/IBM/Rational/Rhapsody/8.1.4/Share -Drpy.ini.file=D:/rpy_config.ini -Xms256m -Xmx1024m
logFile
loglevelRPY
traceRPY
.traceRPY
to debug could decrease performance to read a huge model.
computeAllTags
allTags
and improve so performance.
To be active, the option disabledProcess
should not contains argument ModelElement
.ignoreReadOnly
readOnly
and improve so performance.ignoreUseExternal
external
and improve so performance.ignoreFullPathName
fullPathName
and improve so performance.traceRPY
loglevelRPY
.disabledProcess
ignoreFeatureDescriptions
descriptionHTML
and description
and improve so performance.ignorePreloadPredefinedTypes
resolveUnloadedHandlers
As seen in prerequisites, the Rhapsody Share
folder must be declared first:
-Drhapsody.omroot=<RhapsodyShareFolder>
To declare the other properties:
-Drpy.ini.file=<iniFile>
com.sodius.mdw.core
,
java.util.Map
to store
properties:MDWorkbench workbench = MDWorkbenchFactory.create(); Model model = workbench.getMetamodelManager().getMetamodel("rhapsody").createModel(); Map<String, Object> options = new HashMap<String, Object>(); options.put("traceRPY", new Boolean(true)); options.put("loglevelRPY", "debug"); model.read("RPY", "project.rpy", options); workbench.shutdown();
MDWorkbench workbench = MDWorkbenchFactory.create(); Model model = workbench.getMetamodelManager().getMetamodel("rhapsody").createModel(); ConnectorDescriptor desc = workbench.getMetamodelManager().getMetamodel("rhapsody").getModelReaderDescriptor("RPY"); desc.setProperty("traceRPY", new Boolean(true)); desc.setProperty("loglevelRPY", "debug"); model.read("RPY", "project.rpy", null); workbench.shutdown();
rhapsody.omroot
and rpy.ini.file
at beginning of process, the others are read only on-demand.rpy.ini.file
Map
"options" variable provided in method model.read("RPY",
"project.rpy", options)
-DloglevelRPY=debug
desc.setProperty("loglevelRPY", "debug")