Class OutputFormatConfiguration

java.lang.Object
com.deltaxml.core.config.OutputFormatConfiguration

public class OutputFormatConfiguration extends Object

Specifies configuration options related to the format of the comparison result from a DocumentComparator.

These options include tracked change formats and the enabling of change grouping.

Since:
7.0
  • Constructor Details

  • Method Details

    • getResultFormat

      public ResultFormat getResultFormat()

      Returns the currently configured ResultFormat.

      Returns:
      an instance of ResultFormat describing the format of the result document
    • setResultFormat

      public void setResultFormat(ResultFormat format) throws IllegalStateException

      Sets the result format that should be output from the comparison.

      N.B. A ResultFormat which produces a tracked change result is incompatible with an existing setting of ModifiedFormatOutput.CHANGE in this OutputFormatConfiguration object.

      Parameters:
      format - an instance of ResultFormat specifying which format to use for the result document
      Throws:
      IllegalStateException - when the ModifiedFormatOutput is set to ModifiedFormatOutput.CHANGE and the ResultFormat set is not ResultFormat.DELTA
    • getTrackChangesAuthor

      public String getTrackChangesAuthor()

      Returns the String currently set as the author for tracked change results.

      Returns:
      a String representing the author name to use when generating tracked changes in the result document
    • setTrackChangesAuthor

      public void setTrackChangesAuthor(String author)

      Sets the String to use for the author when generating tracked changes.

      N.B. This setting only takes effect if the current ResultFormat is one of the tracked change representations.

      Parameters:
      author - a String representing the author name to use when generating tracked changes in the result document
    • getTrackChangesDate

      public Calendar getTrackChangesDate()

      Returns the Calendar instance currently configured to represent the date used when generating track changes.

      Returns:
      a Calendar representation of the date. A null means that the date is determined at run time by the XSLT script generating the tracked changes
    • setTrackChangesDate

      public void setTrackChangesDate(Calendar date)

      Specifies a Calendar instance to use as the date representation when generating tracked changes. A null value can be used to generate the current date/time when the comparison runs

      N.B. This setting only takes effect if the current ResultFormat is one of the tracked change representations.

      Parameters:
      date - a Calendar representation of the date to use when generating tracked changes in the result document
    • setModifiedFormatOutput

      public void setModifiedFormatOutput(ModifiedFormatOutput mode) throws IllegalStateException

      Sets the behaviour for outputting elements with modified formatting.

      N.B. A setting of ModifiedFormatOutput.CHANGE is incompatible with a ResultFormat setting that produces a tracked change result.

      Parameters:
      mode - the ModifiedFormatOutput representation of the behaviour to apply
      Throws:
      IllegalStateException - when the ResultFormat is not ResultFormat.DELTA and the ModifiedFormatOutput is set to ModifiedFormatOutput.CHANGE
    • getModifiedFormatOutput

      public ModifiedFormatOutput getModifiedFormatOutput()

      Returns the ModifiedFormatOutput instance representing the currently configured behaviour.

      Returns:
      the ModifiedFormatOutput instance
    • setModifiedAttributeMode

      public void setModifiedAttributeMode(ModifiedAttributeMode mode)

      Sets the behaviour for the outputting of modified attributes.

      Parameters:
      mode - the ModifiedAttributeMode representation of the behaviour to apply
    • getModifiedAttributeMode

      public ModifiedAttributeMode getModifiedAttributeMode()

      Returns the ModifiedAttributeMode instance representing the currently configured behaviour.

      Returns:
      the ModifiedFormatOutput instance
    • setAttributeChangeMarked

      public void setAttributeChangeMarked(boolean leaveMarker)

      Sets the behaviour for marking elements with an attribute changed marker. When enabled the leave attribute change marker adds a deltaxml:attributeChanges attribute to any element that has attribute change, so long as the modified attribute processing is enabled setModifiedAttributeMode(ModifiedAttributeMode).

      Notes:

      • the created deltaxml:attributeChanges has a value of true.
      • before this setting is used, the attributes on an element may already have been processed, such as by the processing of defaulted attributes.
      Parameters:
      leaveMarker - whether to create a new attribute, deltaxml:attributeChanges, which specifies that at least one other attribute on the element has changed.
    • isAttributeChangeMarked

      public boolean isAttributeChangeMarked()

      Returns a boolean value specifying whether an deltaxml:attributeChanges attribute is set on an element whose attributes have changed.

      Returns:
      a boolean value specifying whether an deltaxml:attributeChanges attribute is set on an element whose attributes have changed.
    • setXmetalTcsTableChangeMode

      public void setXmetalTcsTableChangeMode(XmetalTrackChangesTableChangeMode value)

      Specifies how changes in XMetaL tables should be tracked.

      The XMetaL editor cannot track the addition or deletion of a row or cell within a table. Such changes can be pushed down to the cell level, pushed up to the table level (e.g. a CALS or HTML 'table' element), or ignored. The advantage of pushing the changes down to the cell content level, is that this provides the highest level of change granularity, at the cost of having to accept or reject every changed cell in the table independently.

      The push up processing means that any table that contains a row or cell level update is represented by a table level add and delete.

      The ignore option is similar to the way in which track changes within tables are handled in XMetaL; as neither row insertion and deletion or cell splitting and merging is tracked. However, for clarity this mode of operation ignores all changes within a table, it simply produces the 'B' version of the table.

      Default: XmetalTrackChangesTableChangeMode.DOWN

      Parameters:
      value - the value to set for the xmetalTcsTableChangeMode parameter
      See Also:
    • getXmetalTcsTableChangeMode

      public XmetalTrackChangesTableChangeMode getXmetalTcsTableChangeMode()

      Returns the XMetal table change mode.

      Returns:
      the XMetal table change mode.
      See Also:
    • setOrderlessPresentationMode

      public void setOrderlessPresentationMode(OrderlessPresentationMode value)

      Sets the OrderlessPresentationMode to use when elements are compared in an orderless manner.

      Parameters:
      value - the OrderlessPresentationMode instance to use
      See Also:
    • getOrderlessPresentationMode

      public OrderlessPresentationMode getOrderlessPresentationMode()

      Returns the OrderlessPresentationMode in use.

      Returns:
      an instance of OrderlessPresentationMode representing the setting currently in use.
    • getGrouping

      public boolean getGrouping()

      Returns a boolean value specifying whether grouping adjacent changes is enabled or not.

      Returns:
      a boolean value specifying whether grouping adjacent changes is enabled or not.
      See Also:
    • setGrouping

      public void setGrouping(boolean grouping)

      Sets whether grouping adjacent changes is enabled or not.

      Parameters:
      grouping - to set grouping adjacent changes
      See Also:
    • getFramemakerTableChangeMode

      public FrameMakerTrackChangesTableChangeMode getFramemakerTableChangeMode()

      Returns the FrameMaker table change mode.

      Returns:
      the FrameMaker table change mode.
      See Also:
    • setFramemakerTableChangeMode

      public void setFramemakerTableChangeMode(FrameMakerTrackChangesTableChangeMode framemakerTableChangeMode)

      Specifies how changes in FrameMaker tables should be tracked.

      The FrameMaker editor cannot track the addition or deletion of a row or cell within a table. Such changes can be pushed down to the cell level, pushed up to the table level (e.g. a CALS or HTML 'table' element), or ignored. The advantage of pushing the changes down to the cell content level, is that this provides the highest level of change granularity, at the cost of having to accept or reject every changed cell in the table independently.

      The push up processing means that any table that contains a row or cell level update is represented by a table level add and delete.

      The ignore option is similar to the way in which track changes within tables are handled in XMetaL; as neither row insertion and deletion or cell splitting and merging is tracked. However, for clarity this mode of operation ignores all changes within a table, it simply produces the 'B' version of the table.

      Default: FrameMakerTrackChangesTableChangeMode.DOWN

      Parameters:
      framemakerTableChangeMode - the value to set for the frameMakerTcsTableChangeMode parameter
      See Also: