RevisionType

Contents
[ ]

Inheritance: java.lang.Object, java.lang.Enum

public enum RevisionType extends Enum<RevisionType>

Represents the types of revisions in a document.

Example usage:


 try (RevisionHandler revisionHandler = new RevisionHandler(sourceFile)) {
     List revisionList = revisionHandler.getRevisions();

     for (RevisionInfo revisionInfo : revisionList) {
         if (revisionInfo.getType() == RevisionType.DELETION)
             // Set an action to be applied to the revision
             revisionInfo.setAction(RevisionAction.Accept);
     }
     // Create an instance of ApplyRevisionOptions
     ApplyRevisionOptions revisionChanges = new ApplyRevisionOptions();
     revisionChanges.setChanges(revisionList);
     // Apply the revisions using the options
     revisionHandler.applyRevisionChanges(resultFile, revisionChanges);
 }
 

Fields

Field Description
INSERTION Represents a type when new content was inserted in the document.
DELETION Represents a type when content was removed from the document.
FORMAT_CHANGE Represents a type when change of formatting was applied to the parent node.
STYLE_DEFINITION_CHANGE Represents a type when change of formatting was applied to the parent style.
MOVING Represents a type when content was moved in the document.

Methods

Method Description
values()
valueOf(String name)
fromInt(int toIntValue) Creates new constant of enum RevisionType using provided numeric value.
fromString(String toStringValue) Parses string representation of RevisionType to get the enum constant.
toInt() Numeric representation of RevisionType.
toString() String representation of RevisionType.

INSERTION

public static final RevisionType INSERTION

Represents a type when new content was inserted in the document.

DELETION

public static final RevisionType DELETION

Represents a type when content was removed from the document.

FORMAT_CHANGE

public static final RevisionType FORMAT_CHANGE

Represents a type when change of formatting was applied to the parent node.

STYLE_DEFINITION_CHANGE

public static final RevisionType STYLE_DEFINITION_CHANGE

Represents a type when change of formatting was applied to the parent style.

MOVING

public static final RevisionType MOVING

Represents a type when content was moved in the document.

values()

public static RevisionType[] values()

Returns: com.groupdocs.comparison.words.revision.RevisionType[]

valueOf(String name)

public static RevisionType valueOf(String name)

Parameters:

Parameter Type Description
name java.lang.String

Returns: RevisionType

fromInt(int toIntValue)

public static RevisionType fromInt(int toIntValue)

Creates new constant of enum RevisionType using provided numeric value.

Parameters:

Parameter Type Description
toIntValue int The numeric representation of RevisionType

Returns: RevisionType - RevisionType enum constant associated with numeric value

fromString(String toStringValue)

public static RevisionType fromString(String toStringValue)

Parses string representation of RevisionType to get the enum constant.

Parameters:

Parameter Type Description
toStringValue java.lang.String The string representation of RevisionType

Returns: RevisionType - RevisionType enum constant associated with input string

toInt()

public int toInt()

Numeric representation of RevisionType.

Returns: int - numeric value of enum constant

toString()

public String toString()

String representation of RevisionType.

Returns: java.lang.String - string value of enum constant