org.apache.fop.hyphenation

## Class Hyphenator

- java.lang.Object
- - org.apache.fop.hyphenation.Hyphenator

    public final class Hyphenator
    extends Object

This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.

This work was authored by Carlos Villegas (cav@uniscope.co.jp).

### Field Summary

Fields
`static String` `HYPTYPE`
`static String` `XMLTYPE`

### Method Summary

All Methods Static Methods Concrete Methods
`static HyphenationTree` `getFopHyphenationTree(String key)` Returns a hyphenation tree.
`static HyphenationTree` `getHyphenationTree(String lang, String country, InternalResourceResolver resourceResolver, Map hyphPatNames, FOUserAgent foUserAgent)`
`static HyphenationTree` `getUserHyphenationTree(String key, InternalResourceResolver resourceResolver)` Load tree from serialized file or xml file using configuration settings
`static Hyphenation` `hyphenate(String lang, String country, InternalResourceResolver resourceResolver, Map hyphPatNames, String word, int leftMin, int rightMin, FOUserAgent foUserAgent)`

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

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

### Field Detail

#### HYPTYPE

    public static final String HYPTYPE

#### XMLTYPE

    public static final String XMLTYPE

### Method Detail

#### getHyphenationTree

    public static HyphenationTree getHyphenationTree(String lang,
                                                     String country,
                                                     InternalResourceResolver resourceResolver,
                                                     Map hyphPatNames,
                                                     FOUserAgent foUserAgent)

#### getFopHyphenationTree

    public static HyphenationTree getFopHyphenationTree(String key)

Returns a hyphenation tree. This method looks in the resources (getResourceStream) for the hyphenation patterns.

Parameters:
  `key` - the language/country key
Returns:
  the hyphenation tree or null if it wasn't found in the resources

#### getUserHyphenationTree

    public static HyphenationTree getUserHyphenationTree(String key,
                                                         InternalResourceResolver resourceResolver)

Load tree from serialized file or xml file using configuration settings

Parameters:
  `key` - language key for the requested hyphenation file
  `resourceResolver` - resource resolver to find the hyphenation files
Returns:
  the requested HypenationTree or null if it is not available

#### hyphenate

    public static Hyphenation hyphenate(String lang,
                                        String country,
                                        InternalResourceResolver resourceResolver,
                                        Map hyphPatNames,
                                        String word,
                                        int leftMin,
                                        int rightMin,
                                        FOUserAgent foUserAgent)