Prune Versions
The Prune Versions component can be used to remove all versioning information from a xADL document. The end result of running a xADL document through this component is a document which has all version graphs removed as well as any links from types to their respective version nodes removed. The component achieves this by simply iterating over all types and clearing the links to their version nodes; additionally, all version graphs are removed from the document. For more information on xADL documents, visit the xADL 2.0 website.
This component could be used, for example, along with the
Selector and
Pruner components. Please refer to the
Selector Driver component for instructions on how to use the Selector, Pruner,
and Prune Versions components through a convenient GUI.
Using the Prune Versions component
In order to use the Prune Versions component, it is necessary to create and fire off a PerformPruneVersionsMessage within the component that wishes to make use of the Prune Versions service. The PerformPruneVersionsMessage constructor is defined as follows:
PerformPruneVersionsMessagepublic PerformPruneVersionsMessage(String archURL, String targetArchURL, String componentID)
|
The PerformPruneVersionsMessage should be sent up the ArchStudio architecture. The following code demonstrates this:
/* * Create a PerformPruneVersionsMessage message. * Assumes that arguments used exist and were * already assigned appropriately. */ PerformPruneVersionsMessage pruneMessage = new PerformPruneVersionsMessage(archURL, targetArchURL, componentID); // Send request up to the Prune Versions' bottom Iface sendToAll(pruneMessage, topIface); |
The Prune Versions component fires off PruneVersionsStatusMessage messages to indicate the progress of the "pruning." These messages can be intercepted and used to keep track of the progress of the Prune Versions operations. The PruneVersionsStatusMessage message holds the following values that can be used for determining the state of a "prune" operation:
PruneVersionsStatusMessagepublic PruneVersionsStatusMessage(String prunedArchURL, String componentID, int currentValue, int upperBound ,boolean isDone, boolean errorOccurred, Exception error)
|
All of these values can be obtained through a simple get operation. For
example, getPrunedArchURL()
would get the prunedArchURL value,
getComponentID()
would get the componentID value, and so forth.
Questions about the Prune Versions component should be sent to Christopher Van der Westhuizen.