Package com.inet.pdfc.generator.model
Class DiffGroup
java.lang.Object
com.inet.pdfc.generator.model.DiffGroup
- All Implemented Interfaces:
Serializable
A
Any group has a type which indicates the severity of the
NOTE: Some
DiffGroup describes a set of subsequent Modifications in a document. It is characterized
by the fact the the elements in front of and after the DiffGroup are equal. Furthermore there are
no equal elements inside the range of a DiffGroup.Any group has a type which indicates the severity of the
Modifications in this group.
For a detailed description refer to the DiffGroup.GroupType enumeration.NOTE: Some
DiffGroup have no modifications at all. These groups always have the type
DiffGroup.GroupType.Sync and are a hint to faster sync back to equal elements after a modification.- Since:
- 3.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the type of aDiffGroupand thus how to interpret the content of the affected elements lists. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract List<com.inet.pdfc.model.PagedElement>Returns a list of elements which are added or have a new value in the SECOND document.abstract com.inet.pdfc.generator.model.IDiffGroupBoundsReturns the elements which define the bounds of the group in the element flow of the first and second document.abstract RectanglegetBounds(boolean first) Returns the overall outline of all affected elements of this group in one of the documents.getDifferencePages(boolean first) Return the difference pageNumbers or null if no elements exist for this documentabstract intReturns the number modifications in this group.abstract List<Modification>Returns the list of modifications contained in this group.abstract List<com.inet.pdfc.model.PagedElement>Returns a list of elements which are removed or have a modified value in the FIRST document.abstract DiffGroup.GroupTypegetType()Returns the type of differences in this group.abstract booleanReturns whether this differences group contains at least one visibleModificationtoString()
-
Constructor Details
-
DiffGroup
public DiffGroup()
-
-
Method Details
-
getRemovedElements
Returns a list of elements which are removed or have a modified value in the FIRST document.
NOTE: The bounds of these element are relative to their page. This is different to the total outline of the difference group, which is relative to the document.- Returns:
- the list of removed or modified elements, not
null - Since:
- 3.0
-
getAddedElements
Returns a list of elements which are added or have a new value in the SECOND document.
NOTE: The bounds of these element are relative to their page. This is different to the total outline of the difference group, which is relative to the document.- Returns:
- the list of added or modified elements, not
null - Since:
- 3.0
-
getBounds
Returns the overall outline of all affected elements of this group in one of the documents.- Parameters:
first-truefor the first document,false- Returns:
- the outline rectangle
- Since:
- 3.0
-
getDifferencesCount
public abstract int getDifferencesCount()Returns the number modifications in this group. May return zero if there is no visible modification.- Returns:
- the number modifications in this group
- Since:
- 3.0
-
getBoundingElements
public abstract com.inet.pdfc.generator.model.IDiffGroupBounds getBoundingElements()Returns the elements which define the bounds of the group in the element flow of the first and second document. This information is useful to determine whether the difference is in-line with the matched content and to place markers at locations where there is some content missing.- Returns:
- the group bounds, never
nullalthough the elements in the bounds instance may all benull - Since:
- 3.0
-
getType
Returns the type of differences in this group. This type as well defines the severity of theModifications in this group.- Returns:
- the type of differences in this group, never
null - Since:
- 3.0
- See Also:
-
toString
-
getModifications
Returns the list of modifications contained in this group. The is the primary entry point to list the differences in a group. Each of these modifications describe one singular modification including the affected elements and the option to get a localized difference description.- Returns:
- the list of modifications, may be
nullfor sync groups - Since:
- 3.0
-
getDifferencePages
Return the difference pageNumbers or null if no elements exist for this document- Parameters:
first-truefor the first document,false- Returns:
- the difference pageNumbers
- Since:
- 4.0
-
isVisible
public abstract boolean isVisible()Returns whether this differences group contains at least one visibleModification- Returns:
trueif there is at least one visibleModification, hence false- Since:
- 20.04
-