Package com.inet.pdfc.results
Class ResultModel.ChangeInfo
- java.lang.Object
-
- com.inet.pdfc.results.ResultModel.ChangeInfo
-
- Enclosing class:
- ResultModel
public static class ResultModel.ChangeInfo extends java.lang.Object
Event object with a page range for both documents where the differences data has changed
-
-
Constructor Summary
Constructors Constructor Description ChangeInfo(ResultModel.STATE_CHANGE_TYPE type, ResultModel source, com.inet.pdfc.generator.message.PageFilterDone doneChunk, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event objectChangeInfo(ResultModel.STATE_CHANGE_TYPE type, ResultModel source, com.inet.pdfc.generator.message.PageReadDone doneChunk, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event objectChangeInfo(ResultModel.STATE_CHANGE_TYPE type, java.util.List<? extends DiffGroup> newDiffs, ResultModel source, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event objectChangeInfo(ResultModel source, com.inet.pdfc.generator.message.ProgressState progress)
Generates an info for a change in the filterChangeInfo(ResultModel source, java.util.Map<DiffGroup,java.util.Set<Modification>> visibilityChanged)
Creates an event for a change in the visibility of someModification
sChangeInfo(ResultModel source, java.util.Map<java.lang.String,VisibilitySetting> settingChanges, com.inet.pdfc.generator.message.ProgressState progress)
Generates an info for a change in the filter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,VisibilitySetting>
getChangedSettings()
Returns the map of changes settings.int
getEndL()
The end page in the first documentint
getEndR()
The end page in the second documentfloat
getProgress()
Returns the overall progress of the comparison and export in percentResultModel
getSource()
Returns the source data modelint
getStartL()
The start page in the first documentint
getStartR()
The start page in the second documentResultModel.STATE_CHANGE_TYPE
getType()
The type of changejava.util.Map<DiffGroup,java.util.Set<Modification>>
getVisibilityChanges()
Returns a map of allModification
s where the visibility was changed.boolean
isAffected(int pageNr, boolean first)
Check whether a certain page was affected by this Change.
-
-
-
Constructor Detail
-
ChangeInfo
public ChangeInfo(ResultModel source, java.util.Map<DiffGroup,java.util.Set<Modification>> visibilityChanged)
Creates an event for a change in the visibility of someModification
s- Parameters:
source
- the source data model, must not benull
visibilityChanged
- a map of the affectedDiffGroup
s andModification
s. EachModification
listed here was update in it's visibility- Since:
- 20.04
-
ChangeInfo
public ChangeInfo(ResultModel.STATE_CHANGE_TYPE type, ResultModel source, com.inet.pdfc.generator.message.PageReadDone doneChunk, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event object- Parameters:
type
- the type of update, must not benull
source
- the source data model, must not benull
doneChunk
- the chunk created when a page can be comparedprogress
- the overall progress of the comparison and export in percent
-
ChangeInfo
public ChangeInfo(ResultModel.STATE_CHANGE_TYPE type, ResultModel source, com.inet.pdfc.generator.message.PageFilterDone doneChunk, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event object- Parameters:
type
- the type of update, must not benull
source
- the source data model, must not benull
doneChunk
- the chunk created when a page can be comparedprogress
- the overall progress of the comparison and export in percent
-
ChangeInfo
public ChangeInfo(ResultModel source, java.util.Map<java.lang.String,VisibilitySetting> settingChanges, com.inet.pdfc.generator.message.ProgressState progress)
Generates an info for a change in the filter- Parameters:
source
- the source data model, must not benull
settingChanges
- the map of changed settingsprogress
- the overall progress of the comparison and export in percent
-
ChangeInfo
public ChangeInfo(ResultModel source, com.inet.pdfc.generator.message.ProgressState progress)
Generates an info for a change in the filter- Parameters:
source
- the source data model, must not benull
progress
- the overall progress of the comparison and export in percent
-
ChangeInfo
public ChangeInfo(ResultModel.STATE_CHANGE_TYPE type, java.util.List<? extends DiffGroup> newDiffs, ResultModel source, com.inet.pdfc.generator.message.ProgressState progress)
Creates the event object- Parameters:
type
- the type of update, must not benull
newDiffs
- the list of new differencessource
- the source data model, must not benull
progress
- the overall progress of the comparison and export in percent
-
-
Method Detail
-
getChangedSettings
public java.util.Map<java.lang.String,VisibilitySetting> getChangedSettings()
Returns the map of changes settings. The key of the map identifies the setting and the property of the setting. The value is the new value of the setting.- Returns:
- the map of changed visibilities, will be empty if the the type of this change is not
ResultModel.STATE_CHANGE_TYPE.FILTER_CHANGE
but nevernull
-
getVisibilityChanges
public java.util.Map<DiffGroup,java.util.Set<Modification>> getVisibilityChanges()
Returns a map of allModification
s where the visibility was changed. Only relevant in case the type ifResultModel.STATE_CHANGE_TYPE.VISIBILITY_CHANGE
- Returns:
- a map of all
Modification
s where the visibility was changed, will benull
if the type is notResultModel.STATE_CHANGE_TYPE.VISIBILITY_CHANGE
-
getStartL
public int getStartL()
The start page in the first document- Returns:
- the start page in the first document
-
getStartR
public int getStartR()
The start page in the second document- Returns:
- the start page in the second document
-
getEndL
public int getEndL()
The end page in the first document- Returns:
- the end page in the first document
-
getEndR
public int getEndR()
The end page in the second document- Returns:
- the end page in the second document
-
getType
public ResultModel.STATE_CHANGE_TYPE getType()
The type of change- Returns:
- the change type
-
getSource
public ResultModel getSource()
Returns the source data model- Returns:
- the source data model
-
isAffected
public boolean isAffected(int pageNr, boolean first)
Check whether a certain page was affected by this Change.- Parameters:
pageNr
- the number of the page, 0-based.first
- true for the first document, false for the second.- Returns:
- true if the given page on given side was affected by this change, otherwise false.
-
getProgress
public float getProgress()
Returns the overall progress of the comparison and export in percent- Returns:
- a percent value, always in interval 0 to 100
-
-