public class HTMLOptions extends AbstractOptions
HTML filter would have the following options ([+] means default on).
Add or rewrite encoding declaration in HTML and XHTML files:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTION_COMPRESS_WHITESPACE |
static java.lang.String |
OPTION_IGNORE_TAGS |
static java.lang.String |
OPTION_PARAGRAPH_ONBR |
static java.lang.String |
OPTION_REMOVE_COMMENTS |
static java.lang.String |
OPTION_REWRITE_ENCODING |
static java.lang.String |
OPTION_SKIP_META |
static java.lang.String |
OPTION_SKIP_REGEXP |
static java.lang.String |
OPTION_TRANSLATE_BUTTONVALUE |
static java.lang.String |
OPTION_TRANSLATE_HREF |
static java.lang.String |
OPTION_TRANSLATE_HREFLANG |
static java.lang.String |
OPTION_TRANSLATE_LANG |
static java.lang.String |
OPTION_TRANSLATE_SRC |
static java.lang.String |
OPTION_TRANSLATE_VALUE |
Constructor and Description |
---|
HTMLOptions(java.util.Map<java.lang.String,java.lang.String> options) |
Modifier and Type | Method and Description |
---|---|
boolean |
getCompressWhitespace() |
java.lang.String |
getIgnoreTags() |
boolean |
getParagraphOnBr()
Returns whether a new paragraph should be started on BR.
|
boolean |
getRemoveComments() |
org.omegat.filters2.html2.HTMLOptions.REWRITE_MODE |
getRewriteEncoding()
Returns whether and when (X)HTML filter adds/rewrites encoding
declaration.
|
java.lang.String |
getSkipMeta()
Returns the meta-tag attribute key-value pairs of which meta-tags should
not be translated
|
java.lang.String |
getSkipRegExp()
Returns the regular expression that matches text not to be translated
|
boolean |
getTranslateButtonValue()
Returns whether button value attributes should be translated.
|
boolean |
getTranslateHref()
Returns whether href attributes should be translated.
|
boolean |
getTranslateHreflang()
Returns whether hreflang attributes should be translated.
|
boolean |
getTranslateLang()
Returns whether lang attributes should be translated.
|
boolean |
getTranslateSrc()
Returns whether src attributes should be translated.
|
boolean |
getTranslateValue()
Returns whether value attributes should be translated.
|
void |
setCompressWhitespace(boolean compressWhitespace)
Sets whether whitespace should be compressed in the HTML document on generating target documents.
|
void |
setIgnoreTags(java.lang.String ignoreTags)
Sets the attribute key-value pairs for which tags should not be translated
|
void |
setParagraphOnBr(boolean paragraphOnBr)
Sets whether a new paragraph should be started on BR.
|
void |
setRemoveComments(boolean removeComments)
Sets whether the comments should be removed from the HTML document on generating target documents.
|
void |
setRewriteEncoding(org.omegat.filters2.html2.HTMLOptions.REWRITE_MODE rewriteEncoding)
Sets when (X)HTML filter should add/rewrite encoding declaration.
|
void |
setSkipMeta(java.lang.String skipMeta)
Sets the meta-tag attribute key-value pairs of which meta-tags should not
be translated
|
void |
setSkipRegExp(java.lang.String skipRegExp)
Sets the regular expression that matches text not to be translated
|
void |
setTranslateButtonValue(boolean translateButtonValue)
Sets whether button value attributes should be translated.
|
void |
setTranslateHref(boolean translateHref)
Sets whether href attributes should be translated.
|
void |
setTranslateHreflang(boolean translateHreflang)
Sets whether hreflang attributes should be translated.
|
void |
setTranslateLang(boolean translateLang)
Sets whether lang attributes should be translated.
|
void |
setTranslateSrc(boolean translateSrc)
Sets whether src attributes should be translated.
|
void |
setTranslateValue(boolean translateValue)
Sets whether value attributes should be translated.
|
getBoolean, getEnum, getOptionsMap, getString, setBoolean, setEnum, setString
public static final java.lang.String OPTION_REWRITE_ENCODING
public static final java.lang.String OPTION_TRANSLATE_HREF
public static final java.lang.String OPTION_TRANSLATE_SRC
public static final java.lang.String OPTION_TRANSLATE_LANG
public static final java.lang.String OPTION_TRANSLATE_HREFLANG
public static final java.lang.String OPTION_TRANSLATE_VALUE
public static final java.lang.String OPTION_TRANSLATE_BUTTONVALUE
public static final java.lang.String OPTION_PARAGRAPH_ONBR
public static final java.lang.String OPTION_SKIP_REGEXP
public static final java.lang.String OPTION_SKIP_META
public static final java.lang.String OPTION_IGNORE_TAGS
public static final java.lang.String OPTION_REMOVE_COMMENTS
public static final java.lang.String OPTION_COMPRESS_WHITESPACE
public HTMLOptions(java.util.Map<java.lang.String,java.lang.String> options)
public org.omegat.filters2.html2.HTMLOptions.REWRITE_MODE getRewriteEncoding()
REWRITE_MODE#ALWAYS
, REWRITE_MODE#IFHEADER
, REWRITE_MODE#IFMETA
, REWRITE_MODE#NEVER
.public void setRewriteEncoding(org.omegat.filters2.html2.HTMLOptions.REWRITE_MODE rewriteEncoding)
rewriteEncoding
- One of REWRITE_MODE#ALWAYS
,
REWRITE_MODE#IFHEADER
, REWRITE_MODE#IFMETA
,
REWRITE_MODE#NEVER
.public boolean getTranslateHref()
public void setTranslateHref(boolean translateHref)
public boolean getTranslateSrc()
public void setTranslateSrc(boolean translateSrc)
public boolean getTranslateLang()
public void setTranslateLang(boolean translateLang)
public boolean getTranslateHreflang()
public void setTranslateHreflang(boolean translateHreflang)
public void setTranslateValue(boolean translateValue)
public boolean getTranslateValue()
public void setTranslateButtonValue(boolean translateButtonValue)
public boolean getTranslateButtonValue()
public boolean getParagraphOnBr()
public void setParagraphOnBr(boolean paragraphOnBr)
public java.lang.String getSkipRegExp()
public void setSkipRegExp(java.lang.String skipRegExp)
public java.lang.String getSkipMeta()
public void setSkipMeta(java.lang.String skipMeta)
public java.lang.String getIgnoreTags()
public void setIgnoreTags(java.lang.String ignoreTags)
ignoreTags
- The strings containing the key-value pairspublic boolean getRemoveComments()
public void setRemoveComments(boolean removeComments)
removeComments
- public boolean getCompressWhitespace()
public void setCompressWhitespace(boolean compressWhitespace)
compressWhitespace
-