Package com.xmlmind.w2x.docx.toxhtml

## Class Translator

- java.lang.Object
- - com.xmlmind.w2x.docx.toxhtml.Translator

-     public final class Translator
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `AUTOMATIC_IDS_REGEX` | A pattern matching most IDs automatically generated by MS-Word.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Translator()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `getAddColumnNumberPI()` |
    `Pattern` | `getAutomaticIdsPattern()` |
    `String` | `getCharset()` |
    `Console` | `getConsole()` |
    `String[]` | `getConvertedImageExtensions()` |
    `Boolean` | `getCreateMathMLObject()` |
    `String` | `getDefaultLang()` |
    `String` | `getForceLang()` |
    `boolean` | `getKeepAllRanges()` |
    `boolean` | `getLowerCaseResourceNames()` |
    `boolean` | `getMarkCustomStyles()` |
    `String` | `getResourceDirectoryPath()` |
    `String` | `getResourcePrefix()` |
    `boolean` | `getSimplify()` |
    `XHTMLVersion` | `getXHTMLVersion()` |
    `void` | `parseParameters​(String[] params)` |
    `void` | `setAddColumnNumberPI​(boolean columnNumberPI)` |
    `void` | `setAutomaticIds​(String regex)` |
    `void` | `setAutomaticIdsPattern​(Pattern pattern)` |
    `void` | `setCharset​(String charset)` |
    `void` | `setConsole​(Console console)` |
    `void` | `setConvertedImageExtensions​(String[] extensions)` |
    `void` | `setCreateMathMLObject​(Boolean create)` |
    `void` | `setDefaultLang​(String defaultLang)` |
    `void` | `setForceLang​(String forceLang)` |
    `void` | `setKeepAllRanges​(boolean keep)` |
    `void` | `setLowerCaseResourceNames​(boolean lowerCase)` |
    `void` | `setMarkCustomStyles​(boolean mark)` |
    `void` | `setResourceDirectoryPath​(String path)` |
    `void` | `setResourcePrefix​(String prefix)` |
    `void` | `setSimplify​(boolean simplify)` |
    `void` | `setXHTMLVersion​(XHTMLVersion xhtmlVersion)` |
    `Document` | `translate​(File docxFile, File outFile, ResourceDirectory resourceDir)` |
    `Element` | `translateToImg​(Element drawingOrPict)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### AUTOMATIC_IDS_REGEX

          public static final String AUTOMATIC_IDS_REGEX

      A pattern matching most IDs automatically generated by MS-Word.

      Examples: `_TocN`, `_RefN`, `BMN`, `OLE_LINKN`, `_ENREF_N`, `_GoBack`.

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Translator

          public Translator()

  - ### Method Detail

    - #### setConsole

          public void setConsole​(Console console)

    - #### getConsole

          public Console getConsole()

    - #### parseParameters

          public void parseParameters​(String[] params)
                               throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### setAddColumnNumberPI

          public void setAddColumnNumberPI​(boolean columnNumberPI)

    - #### getAddColumnNumberPI

          public boolean getAddColumnNumberPI()

    - #### setXHTMLVersion

          public void setXHTMLVersion​(XHTMLVersion xhtmlVersion)

    - #### getXHTMLVersion

          public XHTMLVersion getXHTMLVersion()

    - #### setCharset

          public void setCharset​(String charset)

    - #### getCharset

          public String getCharset()

    - #### setForceLang

          public void setForceLang​(String forceLang)

    - #### getForceLang

          public String getForceLang()

    - #### setDefaultLang

          public void setDefaultLang​(String defaultLang)

    - #### getDefaultLang

          public String getDefaultLang()

    - #### setConvertedImageExtensions

          public void setConvertedImageExtensions​(String[] extensions)

    - #### getConvertedImageExtensions

          public String[] getConvertedImageExtensions()

    - #### setResourceDirectoryPath

          public void setResourceDirectoryPath​(String path)

    - #### getResourceDirectoryPath

          public String getResourceDirectoryPath()

    - #### setResourcePrefix

          public void setResourcePrefix​(String prefix)

    - #### getResourcePrefix

          public String getResourcePrefix()

    - #### setLowerCaseResourceNames

          public void setLowerCaseResourceNames​(boolean lowerCase)

    - #### getLowerCaseResourceNames

          public boolean getLowerCaseResourceNames()

    - #### setCreateMathMLObject

          public void setCreateMathMLObject​(Boolean create)

    - #### getCreateMathMLObject

          public Boolean getCreateMathMLObject()

    - #### setMarkCustomStyles

          public void setMarkCustomStyles​(boolean mark)

    - #### getMarkCustomStyles

          public boolean getMarkCustomStyles()

    - #### setSimplify

          public void setSimplify​(boolean simplify)

    - #### getSimplify

          public boolean getSimplify()

    - #### setKeepAllRanges

          public void setKeepAllRanges​(boolean keep)

    - #### getKeepAllRanges

          public boolean getKeepAllRanges()

    - #### setAutomaticIds

          public void setAutomaticIds​(String regex)
                               throws PatternSyntaxException

      Throws:
        `PatternSyntaxException`

    - #### setAutomaticIdsPattern

          public void setAutomaticIdsPattern​(Pattern pattern)

    - #### getAutomaticIdsPattern

          public Pattern getAutomaticIdsPattern()

    - #### translate

          public Document translate​(File docxFile,
                                    File outFile,
                                    ResourceDirectory resourceDir)
                             throws IOException

      Throws:
        `IOException`

    - #### translateToImg

          public Element translateToImg​(Element drawingOrPict)
                                 throws IOException

      Throws:
        `IOException`