edu.northwestern.at.morphadorner.corpuslinguistics.inputter

## Class FirstTokenURLTextInputter

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.inputter.URLTextInputter
    - - edu.northwestern.at.morphadorner.corpuslinguistics.inputter.FirstTokenURLTextInputter

- All Implemented Interfaces:
    TextInputter

      public class FirstTokenURLTextInputter
      extends URLTextInputter
      implements TextInputter

  Text inputter which reads only the first token in each line from a URL.

- - ### Field Summary

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.inputter.URLTextInputter

      `loadedText`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FirstTokenURLTextInputter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `loadText(java.lang.String str)` Loads text from a string, keeping only first token on each line.
    `void` | `loadText(java.net.URL url, java.lang.String encoding)` Loads text from a URL, keeping only first token on each line.

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.inputter.URLTextInputter

      `enableGapFixer, enableOrigFixer, enableSplitWordsFixer, getSegmentCount, getSegmentName, getSegmentText, getSegmentText, loadText, loadText, setSegmentText, setSegmentText, setSegmentText, setSegmentText, usesSegmentFiles`

    - ### Methods inherited from class edu.northwestern.at.utils.IsCloseableObject

      `close`

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

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

    - ### Methods inherited from interface edu.northwestern.at.morphadorner.corpuslinguistics.inputter.TextInputter

      `enableGapFixer, enableOrigFixer, enableSplitWordsFixer, getSegmentCount, getSegmentName, getSegmentText, getSegmentText, loadText, loadText, setSegmentText, setSegmentText, setSegmentText, setSegmentText, usesSegmentFiles`

- - ### Constructor Detail

    - #### FirstTokenURLTextInputter

          public FirstTokenURLTextInputter()

  - ### Method Detail

    - #### loadText

          public void loadText(java.net.URL url,
                      java.lang.String encoding)
                        throws java.io.IOException

      Loads text from a URL, keeping only first token on each line.
      Specified by:
        `loadText` in interface `TextInputter`
      Overrides:
        `loadText` in class `URLTextInputter`
      Parameters:
        `url` - URL from which to read text.
        `encoding` - Text encoding.
      Throws:
        `java.io.IOException` - If an output error occurs.

    - #### loadText

          public void loadText(java.lang.String str)
                        throws java.lang.Exception

      Loads text from a string, keeping only first token on each line.
      Specified by:
        `loadText` in interface `TextInputter`
      Overrides:
        `loadText` in class `URLTextInputter`
      Parameters:
        `str` - String from which to read text.
      Throws:
        `java.io.IOException` - If an error occurs.
        `java.lang.Exception`