net.sf.okapi.common.encoder

## Class TSEncoder

- java.lang.Object
- - net.sf.okapi.common.encoder.XMLEncoder
  - - net.sf.okapi.common.encoder.TSEncoder

- All Implemented Interfaces:
    IEncoder

      public class TSEncoder
      extends XMLEncoder

  Implements `IEncoder` for TS file format.

- - ### Field Summary

    - ### Fields inherited from class net.sf.okapi.common.encoder.XMLEncoder

      `ESCAPEGT, ESCAPELINEBREAK, ESCAPENBSP, QUOTEMODE, QUOTEMODEDEFINED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TSEncoder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `encode(java.lang.String text, EncoderContext context)` Encodes a given text with this encoder.
    `java.lang.String` | `toNative(java.lang.String propertyName, java.lang.String value)` Converts any property values from its standard representation to the native representation for this encoder.

    - ### Methods inherited from class net.sf.okapi.common.encoder.XMLEncoder

      `encode, encode, getCharsetEncoder, getEncoding, getLineBreak, getParameters, reset, setOptions`

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

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

- - ### Constructor Detail

    - #### TSEncoder

          public TSEncoder()

  - ### Method Detail

    - #### encode

          public java.lang.String encode(java.lang.String text,
                                         EncoderContext context)

      Description copied from interface: `IEncoder`
      Encodes a given text with this encoder.
      Specified by:
        `encode` in interface `IEncoder`
      Overrides:
        `encode` in class `XMLEncoder`
      Parameters:
        `text` - the text to encode.
        `context` - the context of the text: 0=text, 1=skeleton, 2=inline.
      Returns:
        the encoded text.

    - #### toNative

          public java.lang.String toNative(java.lang.String propertyName,
                                           java.lang.String value)

      Description copied from interface: `IEncoder`
      Converts any property values from its standard representation to the native representation for this encoder.
      Specified by:
        `toNative` in interface `IEncoder`
      Overrides:
        `toNative` in class `XMLEncoder`
      Parameters:
        `propertyName` - the name of the property.
        `value` - the standard value to convert.
      Returns:
        the native representation of the given value.