public class ConcurrentMerge extends Object implements MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
A concurrent merge class which supports n-way merging of the concurrently edited DITA documents. Merges two or more edited Darwin Information Typing Architecture (DITA) files with a common ancestor, and produces a DeltaV2 result which can be post-processed to create a merged DITA document.
The term concurrent describes a scenario in which the ancestor version is known to be the original version from which the other versions are derived and therefore preceeds them in time. The other versions that are merged are treated symmetrically as if they had no temporal or other relationship (such a derivation) between each other. Future developments may include a merge based on a 'travelling draft' concept where each of the versions added to the merge would be a derivative of the previous version. Such a merge would be 'non-concurrent'.
An alternative class ThreeWayMerge
is provided with similar capabilities for the common three way use case, but which
also provides a number of additional output types/formats.
Constructor and Description |
---|
ConcurrentMerge()
Constructs a new ConcurrentMerge instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addLicenseFile(File licenseFile)
Adds the license file for use with Flexera licensing.
|
void |
addLicenseServer(String hostname)
Adds a license server for use with concurrent licensing.
|
void |
addLicenseServer(String hostname,
int port)
Adds a license server and port for use with concurrent licensing.
|
void |
addProgressListener(MergeProgressListener listener)
Add a progress listener to the list of registered progress listeners.
|
void |
addVersion(File file,
String version)
Adds a version with a File input.
|
void |
addVersion(InputStream is,
String systemId,
String version)
Adds a version with an input stream input.
|
void |
addVersion(Reader r,
String systemId,
String version)
Adds a version with a File input.
|
void |
addVersion(URL url,
String version)
Adds a version with a URL input.
|
void |
clearProgressListeners()
Remove all currently registered progress listeners.
|
void |
extractAll(File file)
Extracts the entire content of all added versions of the Merger to a File using the deltaV2 merge format.
|
void |
extractAll(OutputStream os)
Extracts the entire content of all added versions of the Merger to a OutputStream using the deltaV2 merge format.
|
void |
extractAll(Writer w)
Extracts the entire content of all added versions of the Merger to a Writer using the deltaV2 merge format.
|
String |
getAncestorVersion()
Returns the version name of the ancestor.
|
CalsTableConfiguration |
getCalsTableConfiguration()
Returns the current configuration options for CALS table comparison.
|
ConcurrentMergeState |
getCurrentState()
Returns the current state of the DitaMerge object.
|
DoctypePreservationMode |
getDoctypePreservationMode()
Reports the current mode.
|
boolean |
getElementSplitting()
States whether modified elements containing text are split when the amount of unchanged text falls below 10%.
|
EntityReferencePreservationMode |
getEntityReferencePreservationMode()
Reports the current mode.
|
EntityResolver |
getEntityResolver()
Gets the explicitly set EntityResolver in use by the merger.
|
EntityResolver |
getEntityResolver(boolean builtInResolver)
Gets the EntityResolver in use by the merger.
|
List<String> |
getFormatExtractionPriorityList()
Reports the current setting of the format extraction priority list.
|
FormattingElementsConfiguration |
getFormattingElementsConfiguration()
Returns the currently used FormattingElementConfiguration object.
|
FormattingOutputType |
getFormattingOutputType()
Get the output type used for representing formatting elements in the output.
|
HtmlTableConfiguration |
getHtmlTableConfiguration()
Returns the current configuration options for HTML table comparison.
|
ConcurrentMergeResultType |
getResultType()
Reports the result type setting for the Merger.
|
RuleConfiguration |
getRuleConfiguration()
Returns the currently used (during extract operations) rule configuration object.
|
List<String> |
getVersions()
Returns an immutable list of versions which have been added.
|
boolean |
getWordByWord()
Reports the state of the WordByWord setting.
|
boolean |
isNewTableProcessingEnabled()
Returns the current setting for new table processing.
|
void |
removeProgressListener(MergeProgressListener listener)
Remove a progress listener from the list of registered progress listeners.
|
void |
reset()
Reverts the state of the merger to the point where
MergeCommon.setAncestor(java.io.File, String) can be used. |
void |
setAncestor(File file,
String version)
Sets the ancestor document with a File input.
|
void |
setAncestor(InputStream is,
String systemId,
String version)
Sets the ancestor document with a InputStream.
|
void |
setAncestor(Reader r,
String systemId,
String version)
Sets the ancestor document with a Reader.
|
void |
setAncestor(URL url,
String version)
Sets the ancestor document with a URL.
|
void |
setCalsTableConfiguration(CalsTableConfiguration config)
Sets the configuration options for CALS table comparison.
|
void |
setDebug(boolean debug)
Enables the generation of intermediate pipeline debug files.
|
void |
setDoctypePreservationMode(DoctypePreservationMode mode)
Sets how Doctype declarations should be preserved.
|
void |
setElementSplitting(boolean enabled)
Sets whether modified elements containing text should be split when the amount of unchanged text falls below 10%.
|
void |
setEntityReferencePreservationMode(EntityReferencePreservationMode mode)
Sets how Entity references should be preserved.
|
void |
setEntityResolver(EntityResolver resolver,
boolean fallbackToDefaultCatalogResolver)
Sets the EntityResolver to use during the comparison.
|
void |
setFormatExtractionPriorityList(List<String> priorityList)
Merge operations represent overlapping hierarchies from the input documents by flattening and subsequently fragmenting
formatting elements where necessary.
|
void |
setFormattingElementsConfiguration(FormattingElementsConfiguration formattingElementsConfiguration)
Provides various settings for specifying formatting elements.
|
void |
setFormattingOutputType(FormattingOutputType formattingOutputType)
Set the output type used for representing formatting elements in the output.
|
void |
setHtmlTableConfiguration(HtmlTableConfiguration config)
Sets the configuration options for HTML table comparison.
|
void |
setIndent(boolean indent)
Enables indentation of output using the serializer output indent property.
|
void |
setLicenseFile(File licenseFile)
Deprecated.
Deprecated in the favour of addLicenseFile.
|
void |
setLicenseServer(String hostname)
Deprecated.
Deprecated in the favour of addLicenseServer.
|
void |
setLicenseServer(String hostname,
int port)
Deprecated.
Deprecated in the favour of addLicenseServer.
|
void |
setRedistributionLicenseContent(long[] key)
Sets a redistribution license for use with subsequent three way merge operations.
|
void |
setRestUsageReporter(com.deltaxml.cores9api.common.usage.ComUsageReporter usageReporter) |
void |
setResultType(ConcurrentMergeResultType type)
Sets the type of result which this Merger will produce.
|
void |
setRuleConfiguration(RuleConfiguration rc)
Allows the rules for merge processing (during extract operations) to be specified.
|
void |
setTableProcessingAlgorithmVersion2(boolean value)
Enables new table processing algorithm for CALS and HTML table.
|
void |
setWordByWord(boolean wbwValue)
Determines whether WordByWord filter is used.
|
public ConcurrentMerge()
After construction, the ConcurrentMerge object will, by default, preserve Doctype information. The
DoctypePreservationMode.PRESERVE_WHEN_UNCHANGED
setting is used unless configured with the
ConcurrentMerge.setDoctypePreservationMode(com.deltaxml.mergecommon.config.DoctypePreservationMode)
method.
Also, entity references will be preserved by default. The EntityReferencePreservationMode.PRESERVE_REFERENCES
setting
is used unless configured with the ConcurrentMerge.setEntityReferencePreservationMode(com.deltaxml.mergecommon.config.EntityReferencePreservationMode)
method.
public void setResultType(ConcurrentMergeResultType type)
type
- the desired result typepublic ConcurrentMergeResultType getResultType()
public void setDebug(boolean debug)
Enables the generation of intermediate pipeline debug files.
setDebug
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
debug
- when true debug files are generatedpublic void setIndent(boolean indent)
Enables indentation of output using the serializer output indent property.
setIndent
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
indent
- when true the output is indentedpublic EntityResolver getEntityResolver()
Gets the explicitly set EntityResolver in use by the merger.
getEntityResolver
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public EntityResolver getEntityResolver(boolean builtInResolver)
Gets the EntityResolver in use by the merger.
getEntityResolver
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
builtInResolver
- Whether to get the built in resolver (with any explicit enhancement), or just the explicitly set
resolver.public void setEntityResolver(EntityResolver resolver, boolean fallbackToDefaultCatalogResolver) throws IllegalStateException
Sets the EntityResolver to use during the comparison.
By default, the Apache Commons Resolver is used as an EntityResolver. If you wish to use a different one, set it up using
this method. Note you can turn off the default catalog support by providing a null
resolver and setting the
fallbackToDefaultCatalogResolver
to false
.
setEntityResolver
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
resolver
- The resolver to use. Using null removes an existing resolver.fallbackToDefaultCatalogResolver
- Sets whether to use the inbuilt catalog resolver if the provided resolver fails to
resolve the entity.IllegalStateException
- Thrown if the merger object's state is not INITIAL or RESET.public void reset()
Reverts the state of the merger to the point where
MergeCommon.setAncestor(java.io.File, String)
can be used. This is useful if you want to
perform a new merge with the same configuration settings.
The merger has a state machine to control the proper ordering of setAncestor and addVersion methods. reset() is used to clear the ancestor and version state. After calling reset() a new ancestor should be provided.
It does not completely re-initialize a merger to the state it would have after calling the constructor, in particular settings for catalogs, entity resolvers and word by word are preserved through a reset method (methods are provided to change these settings, alternatively you can create a new merger object via the constructor).
public ConcurrentMergeState getCurrentState()
Returns the current state of the DitaMerge object. The state affects which methods can be validly be called, this is
documented in the ConcurrentMergeState
enum.
public void setAncestor(File file, String version) throws IllegalStateException, IllegalArgumentException, FileNotFoundException, InvalidInputException, UnorderedElementContainingPCDATAException, UnorderedDuplicateKeysException, LicenseException
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
setAncestor
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
file
- The input file which is the ancestor version.version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This must be an XML NMTOKENIllegalStateException
- Thrown if the merge object's state is not INITIAL or RESET.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN.FileNotFoundException
- Thrown if the provided file object does not exist.InvalidInputException
- Thrown if the input is invalid in some way.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.public void setAncestor(InputStream is, String systemId, String version) throws IllegalStateException, IllegalArgumentException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, UnorderedElementContainingPCDATAException
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
setAncestor
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
is
- The input steam which is the ancestor version.systemId
- The location of the ancestor input stream (for relative lookup).version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not INITIAL or RESET.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN.InvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.public void setAncestor(Reader r, String systemId, String version) throws IllegalStateException, IllegalArgumentException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, UnorderedElementContainingPCDATAException
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
setAncestor
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
r
- The reader which is the ancestor version.systemId
- The location of the ancestor reader (for relative lookup).version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not INITIAL or RESET.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN.InvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.public void setAncestor(URL url, String version) throws IllegalStateException, IllegalArgumentException, IOException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, UnorderedElementContainingPCDATAException
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
setAncestor
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
url
- The URL to load as the ancestor version.version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not INITIAL or RESET.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN.IOException
- Thrown if a stream for the supplied URL cannot be opened.InvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.public void addVersion(File file, String version) throws IllegalStateException, IllegalArgumentException, FileNotFoundException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException, com.deltaxml.core.PipelinedComparatorError
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
addVersion
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
file
- The input file which is the version to be added.version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not STARTED or EXTRACTABLE.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN, if a version has already been added with
this name, or if the supplied name is the same as the ancestor version.FileNotFoundException
- Thrown if the provided file object does not exist.DifferentRootElementException
- Thrown if the version added has a different root XML element as the ancestor.InvalidInputException
- Thrown if the input is invalid.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.DifferingOrderedAttributesException
- Thrown if inputs have different deltaxml:ordered attribute values.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.com.deltaxml.cores9api.ComparisonCancelledException
com.deltaxml.core.PipelinedComparatorError
public void addVersion(InputStream is, String systemId, String version) throws IllegalStateException, IllegalArgumentException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException, com.deltaxml.core.PipelinedComparatorError
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
addVersion
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
is
- The input stream which is the version to be added.systemId
- The location of the version input stream (for relative lookup).version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not STARTED or EXTRACTABLE.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN, if a version has already been added with
this name, or if the supplied name is the same as the ancestor version.DifferentRootElementException
- Thrown if the version added has a different root XML element as the ancestor.InvalidInputException
- Thrown if the input is invalid.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.DifferingOrderedAttributesException
- Thrown if inputs have different deltaxml:ordered attribute values.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.com.deltaxml.cores9api.ComparisonCancelledException
com.deltaxml.core.PipelinedComparatorError
public void addVersion(Reader r, String systemId, String version) throws IllegalStateException, IllegalArgumentException, DifferentRootElementException, InvalidInputException, DifferingOrderedAttributesException, LicenseException, UnorderedDuplicateKeysException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException, com.deltaxml.core.PipelinedComparatorError
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
addVersion
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
r
- The input reader which is the version to be added.systemId
- The location of the ancestor reader (for relative lookup).version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merge object's state is not STARTED or EXTRACTABLE.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN, if a version has already been added with
this name, or if the supplied name is the same as the ancestor version.DifferentRootElementException
- Thrown if the version added has a different root XML element as the ancestor.InvalidInputException
- Thrown if the input is invalid.DifferingOrderedAttributesException
- Thrown if inputs have different deltaxml:ordered attribute values.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.com.deltaxml.cores9api.ComparisonCancelledException
com.deltaxml.core.PipelinedComparatorError
public void addVersion(URL url, String version) throws IllegalStateException, IllegalArgumentException, IOException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException, com.deltaxml.core.PipelinedComparatorError
The version parameter appears in the result file and must correspond to the NMTOKEN production rule in the XML Specification (the same production rule is used in both XML 1.0 and XML 1.1). This precludes the use of the '!' (0x21) and '=' (0x3d) characters used for version delimiting and other characters which could cause confusion such as the space character.
addVersion
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
url
- The URL which is the version to be added.version
- The string to use as the name of the version. This appears in the deltaxml:deltaV2
attributes in
the result. This cannot contain '=' or '!' characters.IllegalStateException
- Thrown if the merger object's state is not STARTED or EXTRACTABLE.IllegalArgumentException
- Thrown if the version parameter is not an NMTOKEN, if a version has already been added with
this name, or if the supplied name is the same as the ancestor version.IOException
- Thrown if a stream for the supplied URL cannot be opened.DifferentRootElementException
- Thrown if the version added has a different root XML element as the ancestor.InvalidInputException
- Thrown if the input is invalid.LicenseException
- Thrown if there is no license installed, or if the installed license is invalid.UnorderedDuplicateKeysException
- Thrown if there are duplicate keys in orderless merge.DifferingOrderedAttributesException
- Thrown if inputs have different deltaxml:ordered attribute values.UnorderedElementContainingPCDATAException
- Thrown if input contains mixed content in orderless merge.com.deltaxml.cores9api.ComparisonCancelledException
com.deltaxml.core.PipelinedComparatorError
public void setWordByWord(boolean wbwValue) throws IllegalStateException
setWordByWord
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
wbwValue
- The new WordByWord setting to use.IllegalStateException
- when this operation is not allowed according to the MergeStatepublic boolean getWordByWord()
getWordByWord
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setDoctypePreservationMode(DoctypePreservationMode mode)
The DoctypePreservationMode.PRESERVE_WHEN_UNCHANGED
setting is used by default.
mode
- the new preservation modepublic DoctypePreservationMode getDoctypePreservationMode()
public void setEntityReferencePreservationMode(EntityReferencePreservationMode mode)
The EntityReferencePreservationMode.PRESERVE_REFERENCES
setting is used by default.
mode
- the new preservation modeEntityReferencePreservationMode
public EntityReferencePreservationMode getEntityReferencePreservationMode()
public void setRuleConfiguration(RuleConfiguration rc) throws IllegalArgumentException
rc
- A new set of rulesIllegalArgumentException
- if the associated version priority list contains illegal version valuesRuleConfiguration.setVersionPriorityList(java.util.List<java.lang.String>)
public RuleConfiguration getRuleConfiguration()
public void extractAll(File file) throws IllegalStateException, DoctypeChangeException, DoctypeMissingException, InvalidInputException, LicenseException
extractAll
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
file
- The file into which the deltaV2 content is extractedIllegalStateException
- the Merger is not in a state ready for extractionDoctypeChangeException
- when there are doctype changes and DoctypePreservationMode specifies that they are reportedDoctypeMissingException
- when there are doctype is missing and DoctypePreservationMode specifies that they are
reportedInvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- if there are any problems with the supplied license or its usepublic void extractAll(Writer w) throws IllegalStateException, DoctypeChangeException, DoctypeMissingException, InvalidInputException, LicenseException
extractAll
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
w
- The writer into which the deltaV2 content is extractedIllegalStateException
- the Merger is not in a state ready for extractionDoctypeChangeException
- when there are doctype changes and DoctypePreservationMode specifies that they are reportedDoctypeMissingException
- when there are doctype is missing and DoctypePreservationMode specifies that they are
reportedInvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- if there are any problems with the supplied license or its usepublic void extractAll(OutputStream os) throws IllegalStateException, DoctypeChangeException, DoctypeMissingException, InvalidInputException, LicenseException
extractAll
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
os
- The OutputStream into which the deltaV2 content is extractedIllegalStateException
- the Merger is not in a state ready for extractionDoctypeChangeException
- when there are doctype changes and DoctypePreservationMode specifies that they are reportedDoctypeMissingException
- when there are doctype is missing and DoctypePreservationMode specifies that they are
reportedInvalidInputException
- Thrown if the input is invalid in some way.LicenseException
- if there are any problems with the supplied license or its usepublic String getAncestorVersion()
getAncestorVersion
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public List<String> getVersions()
getVersions
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setRedistributionLicenseContent(long[] key) throws LicenseException
DeltaXML Redistribution or 'OEM' customers should use this method in conjunction with supplied code which is typically compiled and integrated into their own products. The supplied code provides examples of usage. This method is not intended to be used by other types of license/customer.
A LicenseException should always contain a nested exception or cause containing further details of the underlying issue. This will be typically one of: LicenseContentException, CPUCountException, LicenseSecurityException, LicenseExpiredException, LicenseNotYetValidException, InvalidLicenseException, LicenseConcurrencyLimitException.
Note that some of the exceptions thrown here can also be thrown by a compare method. For example, it may be the case a license has not expired when calling this method, but for long running app-server processes may have expired when calling compare methods later.
setRedistributionLicenseContent
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
key
- a redistribution licenseLicenseException
- if there are any problems with the supplied license or its use@Deprecated public void setLicenseFile(File licenseFile) throws SecurityException, IOException, LicenseException
setLicenseFile
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
licenseFile
- the FlexLM format license fileSecurityException
- if the file cannot be accessedIOException
- if there are problems reading the fileLicenseException
- if there is a problem using the license file@Deprecated public void setLicenseServer(String hostname) throws LicenseException
setLicenseServer
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
hostname
- the license server host or its ip addressLicenseException
- if there is a problem using the license server@Deprecated public void setLicenseServer(String hostname, int port) throws IllegalArgumentException, LicenseException
setLicenseServer
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
hostname
- the license server host or its ip addressport
- the port number on the license server for the lmgrdIllegalArgumentException
- if the port number is out of rangeLicenseException
- if there is a problem using the license serverpublic void addLicenseFile(File licenseFile) throws SecurityException, IOException, LicenseException
addLicenseFile
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
licenseFile
- the FlexLM format license fileSecurityException
- if the file cannot be accessedIOException
- if there are problems reading the fileLicenseException
- if there is a problem using the license filepublic void addLicenseServer(String hostname) throws LicenseException
addLicenseServer
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
hostname
- the license server host or its ip addressLicenseException
- if there is a problem using the license serverpublic void addLicenseServer(String hostname, int port) throws IllegalArgumentException, LicenseException
addLicenseServer
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
hostname
- the license server host or its ip addressport
- the port number on the license server for the lmgrdIllegalArgumentException
- if the port number is out of rangeLicenseException
- if there is a problem using the license serverpublic void setCalsTableConfiguration(CalsTableConfiguration config)
Sets the configuration options for CALS table comparison.
setCalsTableConfiguration
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
config
- a CalsTableConfiguration
object that contains the settings to use for CALS table comparisonpublic CalsTableConfiguration getCalsTableConfiguration()
Returns the current configuration options for CALS table comparison.
getCalsTableConfiguration
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setHtmlTableConfiguration(HtmlTableConfiguration config)
Sets the configuration options for HTML table comparison.
setHtmlTableConfiguration
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
config
- a HtmlTableConfiguration
object that contains the settings to use for HTML table comparisonpublic HtmlTableConfiguration getHtmlTableConfiguration()
Returns the current configuration options for HTML table comparison.
getHtmlTableConfiguration
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
HtmlTableConfiguration
object that contains the settings to use for HTML table comparisonpublic void addProgressListener(MergeProgressListener listener)
addProgressListener
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
listener
- the progress listener to register.public void removeProgressListener(MergeProgressListener listener)
removeProgressListener
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
listener
- the progress listener to remove.public void clearProgressListeners()
clearProgressListeners
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setElementSplitting(boolean enabled) throws IllegalStateException
Sets whether modified elements containing text should be split when the amount of unchanged text falls below 10%.
Note that element splitting does not happen when the WordByWord setting is 'false'.
Default: true
Certain DITA elements such as a section, title are only permitted once in the DITA DTD. Therefore, the element splitting feature is not applied to such elements.
Element splitting is currently applied to following DITA elements.
DITA elements : apiname, b, cite, cmdname, codeph, filepath, i, li, lines, msgnum, msgph, note, p, parmname, pre, q, sli, sub, sup, systemoutput, term, text, tm, tt, u, uicontrol, userinput, var, varname, wintitle
setElementSplitting
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
enabled
- whether or not to enable element splittingIllegalStateException
- when this operation is not allowed according to the MergeStatepublic boolean getElementSplitting()
States whether modified elements containing text are split when the amount of unchanged text falls below 10%.
getElementSplitting
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setFormattingElementsConfiguration(FormattingElementsConfiguration formattingElementsConfiguration) throws IllegalStateException, IllegalArgumentException
formattingElementsConfiguration
- a FormattingElementsConfiguration objectIllegalStateException
- when this operation is not allowed according to the merge stateIllegalArgumentException
- when FormattingElementsConfiguration is nullpublic FormattingElementsConfiguration getFormattingElementsConfiguration()
public void setFormattingOutputType(FormattingOutputType formattingOutputType)
Set the output type used for representing formatting elements in the output. The default is
FormattingOutputType.DELTA_V_2_1
which represents Formatting Elements using our Delta v2.1 format.
setFormattingOutputType
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
formattingOutputType
- the type of representation to use.FormattingOutputType
public FormattingOutputType getFormattingOutputType()
Get the output type used for representing formatting elements in the output.
getFormattingOutputType
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
FormattingOutputType
public void setFormatExtractionPriorityList(List<String> priorityList)
Merge operations represent overlapping hierarchies from the input documents by flattening and subsequently fragmenting formatting elements where necessary.
To produce a result without overlapping or nesting of formatting elements, it may be necessary to remove formatting information in a controlled way.
The format extraction priority list specifies the list of versions by priority. This priority list will be used to extract formatting to resolve overlaps and nesting to produce a deltaV2 result.
Please note that if only some, not all, of the versions are specified in the priority list there is a possibility of format loss due to additions/deletions of formatting by the missing version(s).
setFormatExtractionPriorityList
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
priorityList
- a list of priority versions specified using Stringspublic List<String> getFormatExtractionPriorityList()
getFormatExtractionPriorityList
in interface MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setRestUsageReporter(com.deltaxml.cores9api.common.usage.ComUsageReporter usageReporter)
public boolean isNewTableProcessingEnabled()
isNewTableProcessingEnabled
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
public void setTableProcessingAlgorithmVersion2(boolean value)
setTableProcessingAlgorithmVersion2
in interface MergeCommon<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
value
- The new newTableProcessing setting to use.Copyright © 2023 Deltaman Group Ltd. All Rights Reserved.