Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.isogen.i18nsupport
Class I18nService

    java.lang.Object
      com.isogen.i18nsupport.I18nService

public class I18nService
extends java.lang.Object

Version:
  $Revision: 1.3 $

Field Summary
`static java.lang.String` | `COMPARATORFACTORYNAMESYSTEMPROPERTY`

Constructor Summary
`I18nService()` The constructor initializes the static database to a null database.

Method Summary
`static ComparatorFactory` | `constructComparatorFactory()`
`ComparatorFactory` | `getComparatorFactory()`
`java.util.Comparator` | `getComparatorForLanguageCode(java.lang.String langCode)`
`java.lang.String` | `getGeneratedTextAfter(org.w3c.dom.Element elemNode)` Returns the text-after associated with the specified element
`java.lang.String` | `getGeneratedTextBefore(org.w3c.dom.Element elemNode, java.lang.String langCode)` Returns the generated text associated with the specified element.
`java.lang.String` | `getGeneratedTextBeforeFirst(org.w3c.dom.Element elemNode, java.lang.String langCode)` Returns the generated text associated with the specified element if the element is the first child of its parent.
`java.lang.String` | `getGeneratedTextForKeyAfter(java.lang.String inKey, org.w3c.dom.Element elemNode)` Returns the generated text for arbitrary entries in the generated text table.
`java.lang.String` | `getGeneratedTextForKeyAfter(java.lang.String inKey, java.lang.String langCode)` Returns the generated text for arbitrary entries in the generated text table.
`java.lang.String` | `getGeneratedTextForKeyBefore(java.lang.String inKey, org.w3c.dom.Element elemNode)` Returns the generated text for arbitrary entries in the generated text table.
`java.lang.String` | `getGeneratedTextForKeyBefore(java.lang.String inKey, java.lang.String langCode)` Returns the generated text for arbitrary entries in the generated text table.
`java.lang.String` | `getParaGeneratedTextAfter(org.w3c.dom.Element elemNode)` Returns the generated text-after associated with the specified element's grandparent.
`java.lang.String` | `getParaGeneratedTextBefore(org.w3c.dom.Element elemNode)` Returns the generated text-before associated with the specified para element's grandparent.
`java.lang.String` | `getParaGeneratedTextBeforeFirst(org.w3c.dom.Element elemNode)` Returns the generated text associated with the specified element's grandparent if the paragraph's container (lang.alts) is the first such element in the grandparent.
`java.lang.String` | `getTranslatedAttValue(org.w3c.dom.Element elemNode, java.lang.String attName)` Returns the translated display text associated with a particular attribute value.
`java.lang.String` | `getTranslatedAttValueForKey(java.lang.String tagname, java.lang.String attName, java.lang.String attval, java.lang.String langCode)`
`static java.lang.String` | `getVersionAndRelease()`
`boolean` | `hasKey(java.lang.String key, java.lang.String langCode)`
`boolean` | `isFirstChild(org.w3c.dom.Element elemNode)` Returns true if the specified element is the first element child of its parent.
`boolean` | `isFirstChildOfType(org.w3c.dom.Element elemNode)` Returns true if the specified element is the first element child of its element type (tagname) within its parent's children.
`boolean` | `isTargetLanguage(org.w3c.dom.Element elemNode, java.lang.String targetLangCode)` Returns True if the specified element's language is equal to the target language.
`void` | `loadStaticTextDatabase(java.lang.String dbDocPath)` Deprecated. Replace this form of the method with the version that uses a URL.
`void` | `loadStaticTextDatabase(java.net.URL dbDocUrl)`
`java.lang.String` | `printStaticTextDatabase()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COMPARATORFACTORYNAMESYSTEMPROPERTY

    public static final java.lang.String COMPARATORFACTORYNAMESYSTEMPROPERTY

See Also:
  Constant Field Values

Constructor Detail

### I18nService

    public I18nService()
                throws java.lang.Throwable

  The constructor initializes the static database to a null database.

Throws:
  `java.lang.Throwable`

Method Detail

### getVersionAndRelease

    public static java.lang.String getVersionAndRelease()

### constructComparatorFactory

    public static ComparatorFactory constructComparatorFactory()
                                                        throws java.lang.Throwable

  Returns:
  Throws:
    `java.lang.Throwable`

### isTargetLanguage

    public boolean isTargetLanguage(org.w3c.dom.Element elemNode,
                                    java.lang.String targetLangCode)
                             throws I18nServiceError

  Returns True if the specified element's language is equal to the target language.

  Parameters:
    `elemNode` - The element to check.
  Throws:
    `I18nServiceError`

### getParaGeneratedTextBefore

    public java.lang.String getParaGeneratedTextBefore(org.w3c.dom.Element elemNode)
                                                throws I18nServiceError

  Returns the generated text-before associated with the specified para element's grandparent.

  Parameters:
    `elemNode` - The element whose grandparent determines the generated text to return.
  Throws:
    `I18nServiceError`

### getParaGeneratedTextAfter

    public java.lang.String getParaGeneratedTextAfter(org.w3c.dom.Element elemNode)
                                               throws I18nServiceError

  Returns the generated text-after associated with the specified element's grandparent.

  Parameters:
    `elemNode` - The element whose grandparent determines the generated text to return.
  Throws:
    `I18nServiceError`

### getParaGeneratedTextBeforeFirst

    public java.lang.String getParaGeneratedTextBeforeFirst(org.w3c.dom.Element elemNode)
                                                     throws I18nServiceError

  Returns the generated text associated with the specified element's grandparent if the paragraph's container (lang.alts) is the first such element in the grandparent.

  Parameters:
    `elemNode` - The element whose grandparent determines the generated text to return.
  Throws:
    `I18nServiceError`

### getGeneratedTextForKeyBefore

    public java.lang.String getGeneratedTextForKeyBefore(java.lang.String inKey,
                                                         org.w3c.dom.Element elemNode)
                                                  throws I18nServiceError

  Returns the generated text for arbitrary entries in the generated text table. The second parameter must be an element that exhibits, or that has an ancestor that exhibits a language attribute from which the target language is determined.

  Throws:
    `I18nServiceError`

### getGeneratedTextForKeyBefore

    public java.lang.String getGeneratedTextForKeyBefore(java.lang.String inKey,
                                                         java.lang.String langCode)
                                                  throws I18nServiceError

  Returns the generated text for arbitrary entries in the generated text table.

  Throws:
    `I18nServiceError`

### getGeneratedTextForKeyAfter

    public java.lang.String getGeneratedTextForKeyAfter(java.lang.String inKey,
                                                        java.lang.String langCode)
                                                 throws I18nServiceError

  Returns the generated text for arbitrary entries in the generated text table.

  Throws:
    `I18nServiceError`

### getGeneratedTextForKeyAfter

    public java.lang.String getGeneratedTextForKeyAfter(java.lang.String inKey,
                                                        org.w3c.dom.Element elemNode)
                                                 throws I18nServiceError

  Returns the generated text for arbitrary entries in the generated text table. The second parameter must be an element that exhibits, or that has an ancestor that exhibits a language attribute.

  Throws:
    `I18nServiceError`

### getGeneratedTextBefore

    public java.lang.String getGeneratedTextBefore(org.w3c.dom.Element elemNode,
                                                   java.lang.String langCode)
                                            throws I18nServiceError

  Returns the generated text associated with the specified element.

  Parameters:
    `elemNode` - The element whose generated text is to be returned.
  Throws:
    `I18nServiceError`

### isFirstChild

    public boolean isFirstChild(org.w3c.dom.Element elemNode)
                         throws I18nServiceError

  Returns true if the specified element is the first element child of its parent.

  Parameters:
    `elemNode` - The element to be checked.
  Throws:
    `I18nServiceError`

### isFirstChildOfType

    public boolean isFirstChildOfType(org.w3c.dom.Element elemNode)
                               throws I18nServiceError

  Returns true if the specified element is the first element child of its element type (tagname) within its parent's children.

  Parameters:
    `elemNode` - The element to be checked.
  Throws:
    `I18nServiceError`

### getGeneratedTextBeforeFirst

    public java.lang.String getGeneratedTextBeforeFirst(org.w3c.dom.Element elemNode,
                                                        java.lang.String langCode)
                                                 throws I18nServiceError

  Returns the generated text associated with the specified element if the element is the first child of its parent.

  Parameters:
    `elemNode` - The element whose the generated text is returned.
  Throws:
    `I18nServiceError`

### getGeneratedTextAfter

    public java.lang.String getGeneratedTextAfter(org.w3c.dom.Element elemNode)
                                           throws I18nServiceError

  Returns the text-after associated with the specified element

  Parameters:
    `elemNode` - The element whose the generated text is returned.
  Throws:
    `I18nServiceError`

### getTranslatedAttValueForKey

    public java.lang.String getTranslatedAttValueForKey(java.lang.String tagname,
                                                        java.lang.String attName,
                                                        java.lang.String attval,
                                                        java.lang.String langCode)
                                                 throws I18nServiceError

  Throws:
    `I18nServiceError`

### getTranslatedAttValue

    public java.lang.String getTranslatedAttValue(org.w3c.dom.Element elemNode,
                                                  java.lang.String attName)
                                           throws I18nServiceError

  Returns the translated display text associated with a particular attribute value.

  Parameters:
    `elemNode` - The element that exhibits or that has an ancestor that exhibits the attribute to get the translation for. For example, if a element is specified for the attibute "measure.type", the number's ancestors will be checked to see if any have a measure.type attribute.
  Throws:
    `I18nServiceError`

### loadStaticTextDatabase

    public void loadStaticTextDatabase(java.lang.String dbDocPath)
                                throws I18nServiceError

  Deprecated. Replace this form of the method with the version that uses a URL.

  Parameters:
    `dbDocPath` -
  Throws:
    `I18nServiceError`

### loadStaticTextDatabase

    public void loadStaticTextDatabase(java.net.URL dbDocUrl)
                                throws I18nServiceError

  Throws:
    `I18nServiceError`

### printStaticTextDatabase

    public java.lang.String printStaticTextDatabase()
                                             throws I18nServiceError

  Throws:
    `I18nServiceError`

### hasKey

    public boolean hasKey(java.lang.String key,
                          java.lang.String langCode)
                   throws I18nServiceError

  Throws:
    `I18nServiceError`

### getComparatorFactory

    public ComparatorFactory getComparatorFactory()
                                           throws I18nServiceError

  Returns:
  Throws:
    `I18nServiceError`

### getComparatorForLanguageCode

    public java.util.Comparator getComparatorForLanguageCode(java.lang.String langCode)
                                                      throws java.lang.Exception

  Parameters:
    `langCode` -
  Returns:
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD