public class SequentialMerge extends Object implements MergeBase<DeltaXMLDitaMergeException,InvalidInputException,LicenseException,DifferentRootElementException,DoctypeChangeException,DoctypeMissingException,UnorderedDuplicateKeysException,DifferingOrderedAttributesException,UnorderedElementContainingPCDATAException>
A sequential merge class which supports n-way merging of the sequentially edited DITA documents.
The term sequential describes a scenario in which the each of the versions added to the merge would be a derivative of the previous version. Such a merge would be 'non-concurrent'.
Constructor and Description |
---|
SequentialMerge()
Constructs a new SequentialMerge 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.
|
CalsTableConfiguration |
getCalsTableConfiguration()
Returns the current configuration options for CALS table comparison.
|
SequentialMergeState |
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.
|
SequentialMergeResultType |
getResultType()
Reports the result type setting for the Merger.
|
List<String> |
getVersions()
Returns an immutable list of versions which have been added.
|
boolean |
getWordByWord()
Reports the state of the WordByWord setting.
|
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 |
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(SequentialMergeResultType type)
Sets the type of result which this Merger will produce.
|
void |
setWordByWord(boolean wbwValue)
Determines whether WordByWord filter is used.
|
public SequentialMerge()
Constructs a new SequentialMerge instance.
After construction the SequentialMerge object will, by default, preserve Doctype information. The
DoctypePreservationMode.PRESERVE_WHEN_UNCHANGED
setting is used unless configured with the
SequentialMerge.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 SequentialMerge.setEntityReferencePreservationMode(com.deltaxml.mergecommon.config.EntityReferencePreservationMode)
method.
public void setResultType(SequentialMergeResultType type)
type
- the desired result typepublic SequentialMergeResultType 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 SequentialMergeState getCurrentState()
Returns the current state of the DitaMerge object. The state affects which methods can be validly be called, this is
documented in the SequentialMergeState
enum.
public void addVersion(File file, String version) throws IllegalStateException, IllegalArgumentException, FileNotFoundException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException
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
public void addVersion(InputStream is, String systemId, String version) throws IllegalStateException, IllegalArgumentException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException
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
public void addVersion(Reader r, String systemId, String version) throws IllegalStateException, IllegalArgumentException, DifferentRootElementException, InvalidInputException, DifferingOrderedAttributesException, LicenseException, UnorderedDuplicateKeysException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException
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
public void addVersion(URL url, String version) throws IllegalStateException, IllegalArgumentException, IOException, DifferentRootElementException, InvalidInputException, LicenseException, UnorderedDuplicateKeysException, DifferingOrderedAttributesException, UnorderedElementContainingPCDATAException, com.deltaxml.cores9api.ComparisonCancelledException
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
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 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 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)
Copyright © 2023 Deltaman Group Ltd. All Rights Reserved.