net.sf.okapi.common.resource.simplifier

## Class AbstractResourceSimplifier

- java.lang.Object
- - net.sf.okapi.common.resource.simplifier.AbstractResourceSimplifier

- All Implemented Interfaces:
    IEventConverter, IResourceSimplifier
  Direct Known Subclasses:
    GenericSkeletonSimplifier, ResourceSimplifier

      public abstract class AbstractResourceSimplifier
      extends java.lang.Object
      implements IResourceSimplifier

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractResourceSimplifier()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Event` | `convert(Event event)` Converts a given event into a different event, modifying either its type or attached resource.
    `protected abstract Event` | `convertEvent(Event event)`
    `java.util.List<Event>` | `convertToList(Event event)` Converts a given event into a list of events.
    `IFilterWriter` | `getFilterWriter()`
    `MultiEvent` | `getGroup(java.lang.String groupId)`
    `java.lang.String` | `getOutputEncoding()`
    `IResourceSimplifier` | `getParent()`
    `ISkeletonWriter` | `getSkeletonWriter()`
    `LocaleId` | `getTargetLocale()`
    `boolean` | `isMultilingual()`
    `void` | `setFilterWriter(IFilterWriter filterWriter)`
    `void` | `setGroup(java.lang.String groupId, MultiEvent group)`
    `void` | `setMultilingual(boolean multilingual)`
    `void` | `setOutputEncoding(java.lang.String outputEncoding)`
    `void` | `setParent(IResourceSimplifier parent)`
    `void` | `setSkeletonWriter(ISkeletonWriter skeletonWriter)`
    `void` | `setTargetLocale(LocaleId targetLocale)`

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

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

    - ### Methods inherited from interface net.sf.okapi.common.resource.simplifier.IResourceSimplifier

      `initialize`

- - ### Constructor Detail

    - #### AbstractResourceSimplifier

          public AbstractResourceSimplifier()

  - ### Method Detail

    - #### convertEvent

          protected abstract Event convertEvent(Event event)

    - #### convert

          public Event convert(Event event)

      Description copied from interface: `IEventConverter`
      Converts a given event into a different event, modifying either its type or attached resource.
      Specified by:
        `convert` in interface `IEventConverter`
      Parameters:
        `event` - the given event.
      Returns:
        a modified event. Can be MULTI_EVENT containing a list of events.

    - #### convertToList

          public java.util.List<Event> convertToList(Event event)

      Description copied from interface: `IEventConverter`
      Converts a given event into a list of events.
      Specified by:
        `convertToList` in interface `IEventConverter`
      Parameters:
        `event` - the given event.
      Returns:
        a list of events produced by the event converter. The implementation should ensure that no MULTI_EVENT events are present in the list (MultiEvent resources are "unpacked").

    - #### getParent

          public IResourceSimplifier getParent()

    - #### setParent

          public void setParent(IResourceSimplifier parent)

      Specified by:
        `setParent` in interface `IResourceSimplifier`

    - #### isMultilingual

          public boolean isMultilingual()

    - #### setMultilingual

          public void setMultilingual(boolean multilingual)

      Specified by:
        `setMultilingual` in interface `IResourceSimplifier`

    - #### getTargetLocale

          public LocaleId getTargetLocale()

    - #### setTargetLocale

          public void setTargetLocale(LocaleId targetLocale)

      Specified by:
        `setTargetLocale` in interface `IResourceSimplifier`

    - #### getOutputEncoding

          public java.lang.String getOutputEncoding()

    - #### setOutputEncoding

          public void setOutputEncoding(java.lang.String outputEncoding)

      Specified by:
        `setOutputEncoding` in interface `IResourceSimplifier`

    - #### getFilterWriter

          public IFilterWriter getFilterWriter()

    - #### setFilterWriter

          public void setFilterWriter(IFilterWriter filterWriter)

      Specified by:
        `setFilterWriter` in interface `IResourceSimplifier`

    - #### getSkeletonWriter

          public ISkeletonWriter getSkeletonWriter()

    - #### setSkeletonWriter

          public void setSkeletonWriter(ISkeletonWriter skeletonWriter)

      Specified by:
        `setSkeletonWriter` in interface `IResourceSimplifier`

    - #### setGroup

          public void setGroup(java.lang.String groupId,
                               MultiEvent group)

      Specified by:
        `setGroup` in interface `IResourceSimplifier`

    - #### getGroup

          public MultiEvent getGroup(java.lang.String groupId)

      Specified by:
        `getGroup` in interface `IResourceSimplifier`