Package net.sf.okapi.filters.xliff
Class Parameters
- java.lang.Object
-
- net.sf.okapi.common.BaseParameters
-
- net.sf.okapi.common.StringParameters
-
- net.sf.okapi.filters.xliff.Parameters
-
- All Implemented Interfaces:
Cloneable
,IParameters
,ISimplifierRulesParameters
public class Parameters extends StringParameters implements ISimplifierRulesParameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Parameters.SegmentationType
-
Field Summary
Fields Modifier and Type Field Description static String
ADDALTTRANS
static String
ADDALTTRANSGMODE
static String
EDITALTTRANS
static int
TARGETSTATEMODE_DONOTEXTRACT
static int
TARGETSTATEMODE_EXTRACT
static int
TARGETSTATEMODE_IGNORE
-
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 Parameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromString(String data)
Reset this parameters object to its default values and then load additional parameters from the provided data.boolean
getAddAltTrans()
boolean
getAddAltTransGMode()
boolean
getAddTargetLanguage()
boolean
getAllowEmptyTargets()
boolean
getAlwaysAddTargets()
String
getCdataSubfilter()
InlineCodeFinder
getCodeFinder()
String
getCodeFinderData()
boolean
getEditAltTrans()
boolean
getEscapeGT()
String
getFactoryClass()
boolean
getFallbackToID()
boolean
getForceUniqueIds()
boolean
getIgnoreInputSegmentation()
boolean
getIncludeExtensions()
boolean
getIncludeIts()
String
getIwsBlockTmScoreValue()
String
getIwsTransStatusValue()
String
getIwsTransTypeValue()
Parameters.SegmentationType
getOutputSegmentationType()
boolean
getOverrideTargetLanguage()
String
getPcdataSubfilter()
int
getQuoteMode()
boolean
getQuoteModeDefined()
String
getSdlSegConfValue()
String
getSdlSegLockedValue()
String
getSdlSegOriginValue()
String
getSimplifierRules()
Get the code simplifier rules as defined bySimplifierRules
(JavaCC file: core/simplifierrules/SimplifierRules.jj).boolean
getSkipNoMrkSegSource()
boolean
getSubAsTextUnit()
int
getTargetStateMode()
String
getTargetStateValue()
boolean
getUseCodeFinder()
boolean
getUseCustomParser()
boolean
getUseSegsForSdlProps()
boolean
getUseTranslationTargetState()
boolean
isAlwaysUseSegSource()
boolean
isInlineCdata()
boolean
isIwsBlockFinished()
boolean
isIwsBlockLockStatus()
boolean
isIwsBlockMultipleExact()
boolean
isIwsBlockTmScore()
boolean
isIwsIncludeMultipleExact()
boolean
isIwsRemoveTmOrigin()
boolean
isPreserveSpaceByDefault()
boolean
isUseIwsXliffWriter()
boolean
isUseSdlXliffWriter()
void
reset()
Reset this parameters object to its default values.void
setAddAltTrans(boolean addAltTrans)
void
setAddAltTransGMode(boolean addAltTransGMode)
void
setAddTargetLanguage(boolean addTargetLanguage)
void
setAllowEmptyTargets(boolean allowEmptyTargets)
void
setAlwaysAddTargets(boolean alwaysAddTargets)
void
setAlwaysUseSegSource(boolean alwaysUSeSegSource)
void
setCdataSubfilter(String subfilter)
void
setCodeFinderData(String data)
void
setEditAltTrans(boolean editAltTrans)
void
setEscapeGT(boolean escapeGT)
void
setFactoryClass(String factoryClass)
void
setFallbackToID(boolean fallbackToID)
void
setForceUniqueIds(boolean forceuniqueids)
void
setIgnoreInputSegmentation(boolean ignoreInputSegmentation)
void
setIncludeExtensions(boolean includeExtensions)
void
setIncludeIts(boolean includeIts)
void
setInlineCdata(boolean inlineCdata)
void
setIwsBlockFinished(boolean iwsBlockFinished)
void
setIwsBlockLockStatus(boolean iwsBlockLockStatus)
void
setIwsBlockMultipleExact(boolean iwsBlockMultipleExact)
void
setIwsBlockTmScore(boolean iwsBlockTmScore)
void
setIwsBlockTmScoreValue(String iwsBlockTmScoreValue)
void
setIwsIncludeMultipleExact(boolean iwsIncludeMultipleExact)
void
setIwsRemoveTmOrigin(boolean iwsRemoveTmOrigin)
void
setIwsTransStatusValue(String iwsTransStatusValue)
void
setIwsTransTypeValue(String iwsTransTypeValue)
void
setOutputSegmentationType(Parameters.SegmentationType segmentationType)
void
setOverrideTargetLanguage(boolean overrideTargetLanguage)
void
setPcdataSubfilter(String subfilter)
void
setPreserveSpaceByDefault(boolean preserveSpaceByDefault)
protected void
setQuoteMode(int quoteMode)
protected void
setQuoteModeDefined(boolean defined)
void
setSdlSegConfValue(String sdlSegConfvalue)
void
setSdlSegLockedValue(String sdlSegLockedvalue)
void
setSdlSegOriginValue(String sdlSegOriginvalue)
void
setSimplifierRules(String rules)
Set the simplifier rules.void
setSkipNoMrkSegSource(boolean skipNoMrkSegSource)
void
setSubAsTextUnit(boolean subAsTextUnit)
void
setTargetStateMode(int targetStateMode)
void
setTargetStateValue(String targetStateValue)
void
setUseCodeFinder(boolean useCodeFinder)
void
setUseCustomParser(boolean useCustomParser)
void
setUseIwsXliffWriter(boolean useIwsXliffWriter)
void
setUseSdlXliffWriter(boolean useSdlXliffWriter)
void
setUseSegsForSdlProps(boolean useSegsForSdlProps)
void
setUseTranslationTargetState(boolean targetStateValue)
String
toString()
Serialize this parameters object to a string.void
validateSimplifierRules()
Validate the current code simplifier rules.-
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, save, setPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.common.IParameters
copy
-
-
-
-
Field Detail
-
TARGETSTATEMODE_IGNORE
public static final int TARGETSTATEMODE_IGNORE
- See Also:
- Constant Field Values
-
TARGETSTATEMODE_EXTRACT
public static final int TARGETSTATEMODE_EXTRACT
- See Also:
- Constant Field Values
-
TARGETSTATEMODE_DONOTEXTRACT
public static final int TARGETSTATEMODE_DONOTEXTRACT
- See Also:
- Constant Field Values
-
ADDALTTRANS
public static final String ADDALTTRANS
- See Also:
- Constant Field Values
-
ADDALTTRANSGMODE
public static final String ADDALTTRANSGMODE
- See Also:
- Constant Field Values
-
EDITALTTRANS
public static final String EDITALTTRANS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUseCustomParser
public boolean getUseCustomParser()
-
setUseCustomParser
public void setUseCustomParser(boolean useCustomParser)
-
getFactoryClass
public String getFactoryClass()
-
setFactoryClass
public void setFactoryClass(String factoryClass)
-
getSubAsTextUnit
public boolean getSubAsTextUnit()
-
setSubAsTextUnit
public void setSubAsTextUnit(boolean subAsTextUnit)
-
getEscapeGT
public boolean getEscapeGT()
-
setEscapeGT
public void setEscapeGT(boolean escapeGT)
-
getFallbackToID
public boolean getFallbackToID()
-
setFallbackToID
public void setFallbackToID(boolean fallbackToID)
-
getAddTargetLanguage
public boolean getAddTargetLanguage()
-
setAddTargetLanguage
public void setAddTargetLanguage(boolean addTargetLanguage)
-
getOverrideTargetLanguage
public boolean getOverrideTargetLanguage()
-
setOverrideTargetLanguage
public void setOverrideTargetLanguage(boolean overrideTargetLanguage)
-
getOutputSegmentationType
public Parameters.SegmentationType getOutputSegmentationType()
-
setOutputSegmentationType
public void setOutputSegmentationType(Parameters.SegmentationType segmentationType)
-
getIgnoreInputSegmentation
public boolean getIgnoreInputSegmentation()
-
setIgnoreInputSegmentation
public void setIgnoreInputSegmentation(boolean ignoreInputSegmentation)
-
getAddAltTrans
public boolean getAddAltTrans()
-
setAddAltTrans
public void setAddAltTrans(boolean addAltTrans)
-
getAddAltTransGMode
public boolean getAddAltTransGMode()
-
setAddAltTransGMode
public void setAddAltTransGMode(boolean addAltTransGMode)
-
getEditAltTrans
public boolean getEditAltTrans()
-
setEditAltTrans
public void setEditAltTrans(boolean editAltTrans)
-
getIncludeExtensions
public boolean getIncludeExtensions()
-
setIncludeExtensions
public void setIncludeExtensions(boolean includeExtensions)
-
getIncludeIts
public boolean getIncludeIts()
-
setIncludeIts
public void setIncludeIts(boolean includeIts)
-
getAllowEmptyTargets
public boolean getAllowEmptyTargets()
-
setAllowEmptyTargets
public void setAllowEmptyTargets(boolean allowEmptyTargets)
-
getTargetStateMode
public int getTargetStateMode()
-
setTargetStateMode
public void setTargetStateMode(int targetStateMode)
-
getTargetStateValue
public String getTargetStateValue()
-
setTargetStateValue
public void setTargetStateValue(String targetStateValue)
-
getUseTranslationTargetState
public boolean getUseTranslationTargetState()
-
setUseTranslationTargetState
public void setUseTranslationTargetState(boolean targetStateValue)
-
getQuoteModeDefined
public boolean getQuoteModeDefined()
-
isAlwaysUseSegSource
public boolean isAlwaysUseSegSource()
-
setAlwaysUseSegSource
public void setAlwaysUseSegSource(boolean alwaysUSeSegSource)
-
isPreserveSpaceByDefault
public boolean isPreserveSpaceByDefault()
-
setPreserveSpaceByDefault
public void setPreserveSpaceByDefault(boolean preserveSpaceByDefault)
-
setQuoteModeDefined
protected void setQuoteModeDefined(boolean defined)
-
getQuoteMode
public int getQuoteMode()
-
setQuoteMode
protected void setQuoteMode(int quoteMode)
-
getAlwaysAddTargets
public boolean getAlwaysAddTargets()
-
setAlwaysAddTargets
public void setAlwaysAddTargets(boolean alwaysAddTargets)
-
isUseSdlXliffWriter
public boolean isUseSdlXliffWriter()
-
setUseSdlXliffWriter
public void setUseSdlXliffWriter(boolean useSdlXliffWriter)
-
getSdlSegLockedValue
public String getSdlSegLockedValue()
-
setSdlSegLockedValue
public void setSdlSegLockedValue(String sdlSegLockedvalue)
-
getSdlSegConfValue
public String getSdlSegConfValue()
-
setSdlSegConfValue
public void setSdlSegConfValue(String sdlSegConfvalue)
-
getSdlSegOriginValue
public String getSdlSegOriginValue()
-
setSdlSegOriginValue
public void setSdlSegOriginValue(String sdlSegOriginvalue)
-
getUseSegsForSdlProps
public boolean getUseSegsForSdlProps()
-
setUseSegsForSdlProps
public void setUseSegsForSdlProps(boolean useSegsForSdlProps)
-
isInlineCdata
public boolean isInlineCdata()
-
setInlineCdata
public void setInlineCdata(boolean inlineCdata)
-
getSkipNoMrkSegSource
public boolean getSkipNoMrkSegSource()
-
setSkipNoMrkSegSource
public void setSkipNoMrkSegSource(boolean skipNoMrkSegSource)
-
getUseCodeFinder
public boolean getUseCodeFinder()
-
setUseCodeFinder
public void setUseCodeFinder(boolean useCodeFinder)
-
getCodeFinder
public InlineCodeFinder getCodeFinder()
-
getCodeFinderData
public String getCodeFinderData()
-
setCodeFinderData
public void setCodeFinderData(String data)
-
isUseIwsXliffWriter
public boolean isUseIwsXliffWriter()
-
setUseIwsXliffWriter
public void setUseIwsXliffWriter(boolean useIwsXliffWriter)
-
isIwsBlockFinished
public boolean isIwsBlockFinished()
-
setIwsBlockFinished
public void setIwsBlockFinished(boolean iwsBlockFinished)
-
getIwsTransStatusValue
public String getIwsTransStatusValue()
-
setIwsTransStatusValue
public void setIwsTransStatusValue(String iwsTransStatusValue)
-
isIwsRemoveTmOrigin
public boolean isIwsRemoveTmOrigin()
-
setIwsRemoveTmOrigin
public void setIwsRemoveTmOrigin(boolean iwsRemoveTmOrigin)
-
getIwsTransTypeValue
public String getIwsTransTypeValue()
-
setIwsTransTypeValue
public void setIwsTransTypeValue(String iwsTransTypeValue)
-
setIwsBlockLockStatus
public void setIwsBlockLockStatus(boolean iwsBlockLockStatus)
-
isIwsBlockLockStatus
public boolean isIwsBlockLockStatus()
-
setIwsBlockTmScore
public void setIwsBlockTmScore(boolean iwsBlockTmScore)
-
isIwsBlockTmScore
public boolean isIwsBlockTmScore()
-
setIwsBlockTmScoreValue
public void setIwsBlockTmScoreValue(String iwsBlockTmScoreValue)
-
getIwsBlockTmScoreValue
public String getIwsBlockTmScoreValue()
-
setIwsBlockMultipleExact
public void setIwsBlockMultipleExact(boolean iwsBlockMultipleExact)
-
isIwsBlockMultipleExact
public boolean isIwsBlockMultipleExact()
-
setIwsIncludeMultipleExact
public void setIwsIncludeMultipleExact(boolean iwsIncludeMultipleExact)
-
isIwsIncludeMultipleExact
public boolean isIwsIncludeMultipleExact()
-
getCdataSubfilter
public String getCdataSubfilter()
-
getPcdataSubfilter
public String getPcdataSubfilter()
-
setCdataSubfilter
public void setCdataSubfilter(String subfilter)
-
setPcdataSubfilter
public void setPcdataSubfilter(String subfilter)
-
getForceUniqueIds
public boolean getForceUniqueIds()
-
setForceUniqueIds
public void setForceUniqueIds(boolean forceuniqueids)
-
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
-
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.
-
-