Package net.sf.okapi.filters.openxml
Class ConditionalParameters
- java.lang.Object
-
- net.sf.okapi.common.BaseParameters
-
- net.sf.okapi.common.StringParameters
-
- net.sf.okapi.filters.openxml.ConditionalParameters
-
- All Implemented Interfaces:
Cloneable
,IParameters
,ISimplifierRulesParameters
public class ConditionalParameters extends StringParameters implements ISimplifierRulesParameters
-
-
Field Summary
Fields Modifier and Type Field Description static int
MSWORD
ParseType
nFileType
TreeSet<String>
tsComplexFieldDefinitionsToExtract
TreeSet<String>
tsExcelExcludedColors
TreeSet<String>
tsExcludeWordStyles
TreeSet<Integer>
tsPowerpointIncludedSlideNumbers
Slide numbers of those slides that should be extracted.TreeSet<String>
tsWordExcludedColors
TreeSet<String>
tsWordHighlightColors
-
Fields inherited from class net.sf.okapi.common.StringParameters
buffer
-
Fields inherited from class net.sf.okapi.common.BaseParameters
path
-
Fields inherited from interface net.sf.okapi.common.ISimplifierRulesParameters
SIMPLIFIERRULES, SIMPLIFIERRULES_DISPLAY_NAME, SIMPLIFIERRULES_SHORT_DESC
-
-
Constructor Summary
Constructors Constructor Description ConditionalParameters()
-
Method Summary
-
Methods inherited from class net.sf.okapi.common.StringParameters
fromString, getBoolean, getGroup, getInteger, getString, setBoolean, setGroup, setInteger, setString
-
Methods inherited from class net.sf.okapi.common.BaseParameters
getParametersDescription, getPath, load, load, setPath
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.common.IParameters
copy
-
-
-
-
Field Detail
-
MSWORD
public static final int MSWORD
- See Also:
- Constant Field Values
-
tsPowerpointIncludedSlideNumbers
public TreeSet<Integer> tsPowerpointIncludedSlideNumbers
Slide numbers of those slides that should be extracted. The set is 1-based (not 0-based) for better readability, i.e. 1 ist the first slide. Only considered ifPOWERPOINT_INCLUDED_SLIDE_NUMBERS_ONLY
was set totrue
.
-
nFileType
public ParseType nFileType
-
-
Method Detail
-
getMaxAttributeSize
public int getMaxAttributeSize()
-
setMaxAttributeSize
public void setMaxAttributeSize(int maxAttributeSize)
-
getTranslateDocProperties
public boolean getTranslateDocProperties()
-
setTranslateDocProperties
public void setTranslateDocProperties(boolean translateDocProperties)
-
getTranslatePowerpointDocProperties
public boolean getTranslatePowerpointDocProperties()
-
setTranslatePowerpointDocProperties
public void setTranslatePowerpointDocProperties(boolean value)
-
getReorderPowerpointDocProperties
public boolean getReorderPowerpointDocProperties()
-
setReorderPowerpointDocProperties
public void setReorderPowerpointDocProperties(boolean value)
-
setReorderPowerpointRelationships
public void setReorderPowerpointRelationships(boolean value)
-
getReorderPowerpointRelationships
public boolean getReorderPowerpointRelationships()
-
getTranslatePowerpointDiagramData
public boolean getTranslatePowerpointDiagramData()
-
setTranslatePowerpointDiagramData
public void setTranslatePowerpointDiagramData(boolean value)
-
getReorderPowerpointDiagramData
public boolean getReorderPowerpointDiagramData()
-
setReorderPowerpointDiagramData
public void setReorderPowerpointDiagramData(boolean value)
-
getTranslatePowerpointCharts
public boolean getTranslatePowerpointCharts()
-
setTranslatePowerpointCharts
public void setTranslatePowerpointCharts(boolean value)
-
getReorderPowerpointCharts
public boolean getReorderPowerpointCharts()
-
setReorderPowerpointCharts
public void setReorderPowerpointCharts(boolean value)
-
getTranslateComments
public boolean getTranslateComments()
-
setTranslateComments
public void setTranslateComments(boolean translateComments)
-
getTranslatePowerpointComments
public boolean getTranslatePowerpointComments()
-
setTranslatePowerpointComments
public void setTranslatePowerpointComments(boolean value)
-
getReorderPowerpointComments
public boolean getReorderPowerpointComments()
-
setReorderPowerpointComments
public void setReorderPowerpointComments(boolean value)
-
getCleanupAggressively
public boolean getCleanupAggressively()
-
setCleanupAggressively
public void setCleanupAggressively(boolean aggressiveCleanup)
-
getAutomaticallyAcceptRevisions
public boolean getAutomaticallyAcceptRevisions()
-
setAutomaticallyAcceptRevisions
public void setAutomaticallyAcceptRevisions(boolean automaticallyAcceptRevisions)
-
getTranslatePowerpointNotes
public boolean getTranslatePowerpointNotes()
-
setTranslatePowerpointNotes
public void setTranslatePowerpointNotes(boolean translatePowerpointNotes)
-
getReorderPowerpointNotes
public boolean getReorderPowerpointNotes()
-
setReorderPowerpointNotes
public void setReorderPowerpointNotes(boolean value)
-
getTranslatePowerpointMasters
public boolean getTranslatePowerpointMasters()
-
setTranslatePowerpointMasters
public void setTranslatePowerpointMasters(boolean translatePowerpointMasters)
-
setIgnorePlaceholdersInPowerpointMasters
public void setIgnorePlaceholdersInPowerpointMasters(boolean ignorePlaceholdersInPowerpointMasters)
-
getIgnorePlaceholdersInPowerpointMasters
public boolean getIgnorePlaceholdersInPowerpointMasters()
-
getTranslateWordHeadersFooters
public boolean getTranslateWordHeadersFooters()
-
setTranslateWordHeadersFooters
public void setTranslateWordHeadersFooters(boolean translateWordHeadersFooters)
-
setTranslateWordNumberingLevelText
public void setTranslateWordNumberingLevelText(boolean value)
-
getTranslateWordNumberingLevelText
public boolean getTranslateWordNumberingLevelText()
-
getTranslateWordHidden
public boolean getTranslateWordHidden()
-
setTranslateWordHidden
public void setTranslateWordHidden(boolean translateWordHidden)
-
getTranslatePowerpointHidden
public boolean getTranslatePowerpointHidden()
-
setTranslatePowerpointHidden
public void setTranslatePowerpointHidden(boolean translatePowerpointHidden)
-
getTranslateExcelHidden
public boolean getTranslateExcelHidden()
Return true if we should translate hidden cells and columns, false (default) if we should not. Note that this setting has no affect on cells that are excluded from translation due to color or by column name in the configuration.- Returns:
- true if we should translate hidden cells and columns
-
setTranslateExcelHidden
public void setTranslateExcelHidden(boolean translateExcelHidden)
-
getTranslateExcelExcludeColors
public boolean getTranslateExcelExcludeColors()
-
setTranslateExcelExcludeColors
public void setTranslateExcelExcludeColors(boolean translateExcelExcludeColors)
-
getTranslateExcelSheetNames
public boolean getTranslateExcelSheetNames()
-
setTranslateExcelSheetNames
public void setTranslateExcelSheetNames(boolean translateExcelSheetNames)
-
getTranslateExcelCellsCopied
public boolean getTranslateExcelCellsCopied()
-
setTranslateExcelCellsCopied
public void setTranslateExcelCellsCopied(boolean value)
-
getTranslateExcelDiagramData
public boolean getTranslateExcelDiagramData()
-
setTranslateExcelDiagramData
public void setTranslateExcelDiagramData(boolean translateExcelDiagramData)
-
getTranslateExcelDrawings
public boolean getTranslateExcelDrawings()
-
setTranslateExcelDrawings
public void setTranslateExcelDrawings(boolean translateExcelDrawings)
-
getTranslateWordExcludeGraphicMetaData
public boolean getTranslateWordExcludeGraphicMetaData()
-
setTranslateWordExcludeGraphicMetaData
public void setTranslateWordExcludeGraphicMetaData(boolean excludeGraphicMetaData)
-
getAddTabAsCharacter
public boolean getAddTabAsCharacter()
-
setAddTabAsCharacter
public void setAddTabAsCharacter(boolean bAddTabAsCharacter)
-
getAddLineSeparatorCharacter
public boolean getAddLineSeparatorCharacter()
-
setAddLineSeparatorCharacter
public void setAddLineSeparatorCharacter(boolean bAddLineSeparatorAsCharacter)
-
getLineSeparatorReplacement
public char getLineSeparatorReplacement()
-
setLineSeparatorReplacement
public void setLineSeparatorReplacement(char lineSeparatorReplacement)
-
getReplaceNoBreakHyphenTag
public boolean getReplaceNoBreakHyphenTag()
-
setReplaceNoBreakHyphenTag
public void setReplaceNoBreakHyphenTag(boolean bReplaceNoBreakHyphenTag)
-
getIgnoreSoftHyphenTag
public boolean getIgnoreSoftHyphenTag()
-
setIgnoreSoftHyphenTag
public void setIgnoreSoftHyphenTag(boolean bIgnoreSoftHyphenTag)
-
setExtractExternalHyperlinks
public void setExtractExternalHyperlinks(boolean bExtractExternalHyperlinks)
-
getExtractExternalHyperlinks
public boolean getExtractExternalHyperlinks()
-
setPowerpointIncludedSlideNumbersOnly
public void setPowerpointIncludedSlideNumbersOnly(boolean bIncludedSlideNumbersOnly)
-
getPowerpointIncludedSlideNumbersOnly
public boolean getPowerpointIncludedSlideNumbersOnly()
-
getTranslateWordInExcludeStyleMode
public boolean getTranslateWordInExcludeStyleMode()
-
setTranslateWordInExcludeStyleMode
public void setTranslateWordInExcludeStyleMode(boolean inExcludeMode)
-
getTranslateWordInExcludeHighlightMode
public boolean getTranslateWordInExcludeHighlightMode()
-
setTranslateWordInExcludeHighlightMode
public void setTranslateWordInExcludeHighlightMode(boolean inExcludeHighlightMode)
-
getTranslateWordExcludeColors
public boolean getTranslateWordExcludeColors()
-
setTranslateWordExcludeColors
public void setTranslateWordExcludeColors(boolean translateWordExcludeColors)
-
getReorderPowerpointNotesAndComments
@Deprecated public boolean getReorderPowerpointNotesAndComments()
Deprecated.This will be removed after the next release (1.45). The substituting methods are: -setReorderPowerpointNotes(boolean)
-setReorderPowerpointComments(boolean)
- Returns:
-
setReorderPowerpointNotesAndComments
@Deprecated public void setReorderPowerpointNotesAndComments(boolean value)
Deprecated.This will be removed after the next release (1.45). The substituting methods are: -- {@link ConditionalParameters#setReorderPowerpointComments(boolean)}
-
getIgnoreWordFontColors
public boolean getIgnoreWordFontColors()
-
setIgnoreWordFontColors
public void setIgnoreWordFontColors(boolean value)
-
getWordFontColorsMinIgnoranceThreshold
public String getWordFontColorsMinIgnoranceThreshold()
-
setWordFontColorsMinIgnoranceThreshold
public void setWordFontColorsMinIgnoranceThreshold(String value)
-
getWordFontColorsMaxIgnoranceThreshold
public String getWordFontColorsMaxIgnoranceThreshold()
-
setWordFontColorsMaxIgnoranceThreshold
public void setWordFontColorsMaxIgnoranceThreshold(String value)
-
getAllowWordStyleOptimisation
public boolean getAllowWordStyleOptimisation()
-
setAllowWordStyleOptimisation
public void setAllowWordStyleOptimisation(boolean value)
-
getPreserveExcelStylesInTargetColumns
public boolean getPreserveExcelStylesInTargetColumns()
-
setPreserveExcelStylesInTargetColumns
public void setPreserveExcelStylesInTargetColumns(boolean value)
-
getAllowEmptyTargets
public boolean getAllowEmptyTargets()
-
setAllowEmptyTargets
public void setAllowEmptyTargets(boolean useSourceForEmptyTarget)
-
getSubfilter
public String getSubfilter()
-
setSubfilter
public void setSubfilter(String subfilter)
-
worksheetConfigurations
public WorksheetConfigurations worksheetConfigurations()
-
fontMappings
public FontMappings fontMappings()
-
reset
public void reset()
Description copied from class:StringParameters
Reset this parameters object to its default values.Subclasses should override this method to set any initial values and instantiate any objects that require allocation. It is recommended that subclasses also call
super.reset()
in the override to ensure that the buffer is empty.- Specified by:
reset
in interfaceIParameters
- Overrides:
reset
in classStringParameters
-
fromString
public void fromString(String data)
Description copied from class:StringParameters
Reset this parameters object to its default values and then load additional parameters from the provided data.Subclasses should not normally need to override this method unless they are maintaining complex values (eg,
InlineCodeFinder
) that require extra initialization as part of their parameter state.- Specified by:
fromString
in interfaceIParameters
- Overrides:
fromString
in classStringParameters
- Parameters:
data
- the string holding the parameters. It must be formatted as the string generated by toString(). Line-breaks must be normalized to '\n'. It can also be null or empty, in such case the parameters are left with their current values. Use reset() to reset the parameters to their defaults.
-
toString
public String toString()
Description copied from class:StringParameters
Serialize this parameters object to a string.Subclasses should not normally need to override this method unless they are maintaining complex values (eg,
InlineCodeFinder
) that require extra serialization as part of their parameter state.- Specified by:
toString
in interfaceIParameters
- Overrides:
toString
in classStringParameters
- Returns:
- the string holding all the parameters.
-
save
public void save(String newPath)
Description copied from interface:IParameters
Saves the parameters to a file.- Specified by:
save
in interfaceIParameters
- Overrides:
save
in classBaseParameters
- Parameters:
newPath
- the full path of the parameters file to save.
-
load
public void load(URI inputURI, boolean p_bIgnoreErrors)
-
clone
public ConditionalParameters clone()
-
getSimplifierRules
public String getSimplifierRules()
Description copied from interface:ISimplifierRulesParameters
Get the code simplifier rules as defined bySimplifierRules
(JavaCC file: core/simplifierrules/SimplifierRules.jj).- Specified by:
getSimplifierRules
in interfaceISimplifierRulesParameters
- Returns:
- rules as a string.
-
setSimplifierRules
public void setSimplifierRules(String rules)
Description copied from interface:ISimplifierRulesParameters
Set the simplifier rules.- Specified by:
setSimplifierRules
in interfaceISimplifierRulesParameters
- Parameters:
rules
- new simplifier rules
-
validateSimplifierRules
public void validateSimplifierRules() throws ParseException
Description copied from interface:ISimplifierRulesParameters
Validate the current code simplifier rules.- Specified by:
validateSimplifierRules
in interfaceISimplifierRulesParameters
- Throws:
ParseException
- if the rule cannot be parsed
-
-