net.sf.okapi.common.resource

## Class Ending

- java.lang.Object
- - net.sf.okapi.common.resource.Ending

- All Implemented Interfaces:
    IResource
  Direct Known Subclasses:
    EndSubfilter

      public class Ending
      extends java.lang.Object
      implements IResource

  Resource associated with the filter events END_DOCUMENT, END_SUBDOCUMENT, and END_GROUP.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Annotations` | `annotations`
    `protected java.lang.String` | `id`
    `protected ISkeleton` | `skeleton`

    - ### Fields inherited from interface net.sf.okapi.common.IResource

      `COPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Ending()`
    `Ending(java.lang.String id)` Creates a new Ending object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<A extends IAnnotation> A` | `getAnnotation(java.lang.Class<A> annotationType)` Gets the annotation object for a given class for this resource.
    `Annotations` | `getAnnotations()` Gets the iterable list of the annotations for this resource.
    `java.lang.String` | `getId()` Gets the identifier of the resource.
    `ISkeleton` | `getSkeleton()` Gets the skeleton object for this resource.
    `void` | `setAnnotation(IAnnotation annotation)` Sets an annotation object for this resource.
    `protected void` | `setAnnotations(Annotations annotations)`
    `void` | `setId(java.lang.String id)` Sets the identifier of this resource.
    `void` | `setSkeleton(ISkeleton skeleton)` Sets the skeleton object for this resource.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### id

          protected java.lang.String id

    - #### skeleton

          protected ISkeleton skeleton

    - #### annotations

          protected Annotations annotations

  - ### Constructor Detail

    - #### Ending

          public Ending()

    - #### Ending

          public Ending(java.lang.String id)

      Creates a new Ending object.
      Parameters:
        `id` - The ID of this resource (It should NOT be the same ID as the one set of the corresponding starting resource: each resource has a ID are unique).

  - ### Method Detail

    - #### getId

          public java.lang.String getId()

      Description copied from interface: `IResource`
      Gets the identifier of the resource. This identifier is unique per extracted document and by type of resource. This value is filter-specific. It and may be different from one extraction of the same document to the next. It can a sequential number or not, incremental or not, and it can be not a number. It has no correspondence in the source document ("IDs" coming from the source document are "names" and not available for all resources).
      Specified by:
        `getId` in interface `IResource`
      Returns:
        the identifier of this resource.

    - #### setId

          public void setId(java.lang.String id)

      Description copied from interface: `IResource`
      Sets the identifier of this resource.
      Specified by:
        `setId` in interface `IResource`
      Parameters:
        `id` - the new identifier value.
      See Also:
        `IResource.getId()`

    - #### getSkeleton

          public ISkeleton getSkeleton()

      Description copied from interface: `IResource`
      Gets the skeleton object for this resource.
      Specified by:
        `getSkeleton` in interface `IResource`
      Returns:
        the skeleton object for this resource or null if there is none.

    - #### setSkeleton

          public void setSkeleton(ISkeleton skeleton)

      Description copied from interface: `IResource`
      Sets the skeleton object for this resource.
      Specified by:
        `setSkeleton` in interface `IResource`
      Parameters:
        `skeleton` - the skeleton object to set.

    - #### getAnnotation

          public <A extends IAnnotation> A getAnnotation(java.lang.Class<A> annotationType)

      Description copied from interface: `IResource`
      Gets the annotation object for a given class for this resource.
      Specified by:
        `getAnnotation` in interface `IResource`
      Parameters:
        `annotationType` - the class of the annotation object to retrieve.
      Returns:
        the annotation for the given class for this resource.

    - #### setAnnotation

          public void setAnnotation(IAnnotation annotation)

      Description copied from interface: `IResource`
      Sets an annotation object for this resource.
      Specified by:
        `setAnnotation` in interface `IResource`
      Parameters:
        `annotation` - the annotation object to set.

    - #### getAnnotations

          public Annotations getAnnotations()

      Description copied from interface: `IResource`
      Gets the iterable list of the annotations for this resource.
      Specified by:
        `getAnnotations` in interface `IResource`
      Returns:
        the iterable list of the annotations for this resource.

    - #### setAnnotations

          protected void setAnnotations(Annotations annotations)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`