Java API Sample
This sample is a basic demonstration of how to use DITA Merge's Java API to run some DITA Merge operations with hard-coded file paths.
The sample is implemented in the
main method of a single Java class, SimpleRunner.java, and the approach taken is as follows:
Create File objects for sample inputs.
Instantiate the ConcurrentMerge object using the constructor;
Set the ancestor file with setAncestor;
Add the demo input versions with addVersion;
Call extractAll to get hold of the DeltaV2 representation of the merge.
Additionally use is made of the ThreeWayMerge class and one of its
merge methods which allows merge operations to be performed using a single method call. This class also allows the approach show above but we only demonstrate the simpler method calls in the sample code.
The files and instructions for this sample are available on Bitbucket.