net.sf.okapi.common.filters

## Class SubFilterSkeletonWriter

- java.lang.Object
- - net.sf.okapi.common.filters.SubFilterSkeletonWriter

- All Implemented Interfaces:
    ISkeletonWriter

      public class SubFilterSkeletonWriter
      extends java.lang.Object
      implements ISkeletonWriter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Ending` | `GET_OUTPUT`
    `static StartDocument` | `SET_OPTIONS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubFilterSkeletonWriter()`
    `SubFilterSkeletonWriter(StartSubfilter resource)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes this skeleton writer.
    `java.lang.String` | `getEncodedOutput()`
    `protected IEncoder` | `getParentEncoder()`
    `ISkeletonWriter` | `getSkelWriter()`
    `java.lang.String` | `getStartResourceId()`
    `java.lang.String` | `processDocumentPart(DocumentPart resource)` Processes the DOCUMENT_PART event.
    `java.lang.String` | `processEndDocument(Ending resource)` Get output created by this skeleton writer from a sequence of events.
    `java.lang.String` | `processEndGroup(Ending resource)` Processes the END_GROUP event.
    `java.lang.String` | `processEndSubDocument(Ending resource)` Processes the END_SUBDOCUMENT event.
    `java.lang.String` | `processEndSubfilter(EndSubfilter resource)`
    `java.lang.String` | `processStartDocument(LocaleId outputLocale, java.lang.String outputEncoding, ILayerProvider layer, EncoderManager encoderManager, StartDocument resource)` Processes the START_DOCUMENT event.
    `java.lang.String` | `processStartGroup(StartGroup resource)` Processes the START_GROUP event.
    `java.lang.String` | `processStartSubDocument(StartSubDocument resource)` Processes a START_SUBDOCUMENT event.
    `java.lang.String` | `processStartSubfilter(StartSubfilter resource)`
    `java.lang.String` | `processTextUnit(ITextUnit resource)` Processes the TEXT_UNIT event.
    `SubFilterSkeletonWriter` | `setOptions(LocaleId outputLocale, java.lang.String outputEncoding, StartSubfilter startSubfilter, ILayerProvider layer)`
    `protected void` | `setParentEncoder(IEncoder parentEncoder)`
    `protected void` | `setSkelWriter(ISkeletonWriter skelWriter)`

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

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

- - ### Field Detail

    - #### GET_OUTPUT

          public static final Ending GET_OUTPUT

    - #### SET_OPTIONS

          public static final StartDocument SET_OPTIONS

  - ### Constructor Detail

    - #### SubFilterSkeletonWriter

          public SubFilterSkeletonWriter()

    - #### SubFilterSkeletonWriter

          public SubFilterSkeletonWriter(StartSubfilter resource)

  - ### Method Detail

    - #### close

          public void close()

      Description copied from interface: `ISkeletonWriter`
      Closes this skeleton writer.
      Specified by:
        `close` in interface `ISkeletonWriter`

    - #### getStartResourceId

          public java.lang.String getStartResourceId()

    - #### processStartDocument

          public java.lang.String processStartDocument(LocaleId outputLocale,
                                                       java.lang.String outputEncoding,
                                                       ILayerProvider layer,
                                                       EncoderManager encoderManager,
                                                       StartDocument resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the START_DOCUMENT event.
      Specified by:
        `processStartDocument` in interface `ISkeletonWriter`
      Parameters:
        `outputLocale` - the output locale.
        `outputEncoding` - the name of the output charset encoding.
        `layer` - the layer provider to use.
        `encoderManager` - the encoder manager to use.
        `resource` - the StartDocument resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processEndDocument

          public java.lang.String processEndDocument(Ending resource)

      Get output created by this skeleton writer from a sequence of events. This method is useful when only an ISkeletonWriter reference is available.
      Specified by:
        `processEndDocument` in interface `ISkeletonWriter`
      Parameters:
        `resource` - can be the SubFilterSkeletonWriter.GET_OUTPUT token (to return the overall output of this skeleton writer), or any other Ending resource.
      Returns:
        output of this skeleton writer if parameter is the SubFilterSkeletonWriter.GET_OUTPUT token or an empty string otherwise.

    - #### processStartSubDocument

          public java.lang.String processStartSubDocument(StartSubDocument resource)

      Description copied from interface: `ISkeletonWriter`
      Processes a START_SUBDOCUMENT event.
      Specified by:
        `processStartSubDocument` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the StartSubDocument resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processEndSubDocument

          public java.lang.String processEndSubDocument(Ending resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the END_SUBDOCUMENT event.
      Specified by:
        `processEndSubDocument` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the Ending resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processStartGroup

          public java.lang.String processStartGroup(StartGroup resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the START_GROUP event.
      Specified by:
        `processStartGroup` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the StartGroup resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processEndGroup

          public java.lang.String processEndGroup(Ending resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the END_GROUP event.
      Specified by:
        `processEndGroup` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the Ending resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processTextUnit

          public java.lang.String processTextUnit(ITextUnit resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the TEXT_UNIT event.
      Specified by:
        `processTextUnit` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the TextUnit resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processDocumentPart

          public java.lang.String processDocumentPart(DocumentPart resource)

      Description copied from interface: `ISkeletonWriter`
      Processes the DOCUMENT_PART event.
      Specified by:
        `processDocumentPart` in interface `ISkeletonWriter`
      Parameters:
        `resource` - the DocumentPart resource associated with the event.
      Returns:
        the string output corresponding to this event.

    - #### processStartSubfilter

          public java.lang.String processStartSubfilter(StartSubfilter resource)

      Specified by:
        `processStartSubfilter` in interface `ISkeletonWriter`

    - #### processEndSubfilter

          public java.lang.String processEndSubfilter(EndSubfilter resource)

      Specified by:
        `processEndSubfilter` in interface `ISkeletonWriter`

    - #### getEncodedOutput

          public java.lang.String getEncodedOutput()

    - #### setOptions

          public SubFilterSkeletonWriter setOptions(LocaleId outputLocale,
                                                    java.lang.String outputEncoding,
                                                    StartSubfilter startSubfilter,
                                                    ILayerProvider layer)

    - #### getSkelWriter

          public ISkeletonWriter getSkelWriter()

    - #### setSkelWriter

          protected void setSkelWriter(ISkeletonWriter skelWriter)

    - #### getParentEncoder

          protected IEncoder getParentEncoder()

    - #### setParentEncoder

          protected void setParentEncoder(IEncoder parentEncoder)