This option is used to reduced the size of a MagicDraw model in order to keep elements that matter at the end of a publication.
The pruning file is based on a XML schema. Its entry point is a setup
. A setup
tag can contain a scope
, an excluded
, visitScopePolicies
or visitReferencePolicies
tags.
A scope
tag defines what should be kept after the pruning. It contains a kind
and an id
tags. The allowed values for a kind
tag are METACLASS, METACLASS_STRICT, STEREOTYPE_QN, QUALIFIED_NAME, XMIID.
Depending of the kind
chosen, fill the id
as follow:
An excluded
tag defines what should be excluded after the pruning. It contains a kind
and an id
tags. See the description of the two tags in the scope description
A visitScopePolicies
tag defines that describes the rules to follow to navigate through a scope
. It contains a applyOn
, includeReferences
or an excludeReferences
tags.
If no applyOn
specified, the rules defined by the other tag applies on all scopes.
includeReferences
and excludeReferences
tag can only be valued with:
ALL
, all references including containment and containerCONTAINMENT
, all containment referencesCONTAINER
, reference to its container
A visitReferencePolicies
tag defines that describes the rules to follow to navigate through the references. It contains a applyOn
, includeReferences
or an excludeReferences
tags.
If no applyOn
specified, the rules defined by the other tag applies on all references.
includeReferences
and excludeReferences
tag are described in the paragraph just before.
A sample is provided beside the file publisher.properties.
This sample keeps in the model all activities, their references and their containers. All other elements are deleted.
<setup>
<scope>
<kind>METACLASS</kind>
<id>Activity</id>
</scope>
<visitScopePolicies>
<includeReferences>ALL</includeReferences>
</visitScopePolicies>
<visitReferencePolicies>
<includeReferences>CONTAINER</includeReferences>
</visitReferencePolicies>
</setup>
The default value of the option in publisher.properties file:
# Determines the path to the prune configuration file. Default: empty string
md2rhp.magicdraw.prune.setup.path=
If the MagicDraw model must be pruned, path to prune configuration file must be set in publisher.properties file:
# Determines the path to the prune configuration file. Default: empty string
md2rhp.magicdraw.prune.setup.path=<path to the pruning file>
If the md2rhp.magicdraw.prune.setup.path
property is not set in the publisher.properties file, the property is set to an empty string, by default.