org.springframework.ldap.ldif.parser

## Interface Parser

- All Known Implementing Classes:
    LdifParser

      public interface Parser

  The Parser interface represents the required methods to be implemented by parser utilities. These methods are the base set of methods needed to provide parsing ability.
  Author:
    Keith Barlow

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the resource after parsing.
    `Attributes` | `getRecord()` Parses the next record from the resource.
    `boolean` | `hasMoreRecords()` True if the resource contains more records; false otherwise.
    `boolean` | `isReady()` Indicates whether or not the parser is ready to to return results.
    `void` | `open()` Opens the resource: the resource must be opened prior to parsing.
    `void` | `reset()` Resets the line read parser.
    `void` | `setCaseInsensitive(boolean caseInsensitive)` Sets the control parameter for specifying case sensitivity on creation of the `Attributes` object.
    `void` | `setResource(Resource resource)` Sets the resource to parse.

- - ### Method Detail

    - #### setResource

          void setResource(Resource resource)

      Sets the resource to parse.
      Parameters:
        `resource` - The resource to parse.

    - #### setCaseInsensitive

          void setCaseInsensitive(boolean caseInsensitive)

      Sets the control parameter for specifying case sensitivity on creation of the `Attributes` object.
      Parameters:
        `caseInsensitive` - The resource to parse.

    - #### open

          void open()
             throws IOException

      Opens the resource: the resource must be opened prior to parsing.
      Throws:
        `IOException` - if a problem is encountered while trying to open the resource.

    - #### close

          void close()
              throws IOException

      Closes the resource after parsing.
      Throws:
        `IOException` - if a problem is encountered while trying to close the resource.

    - #### reset

          void reset()
              throws IOException

      Resets the line read parser.
      Throws:
        `IOException` - if a problem is encountered while trying to reset the resource.

    - #### hasMoreRecords

          boolean hasMoreRecords()
                          throws IOException

      True if the resource contains more records; false otherwise.
      Returns:
        boolean indicating whether or not the end of record has been reached.
      Throws:
        `IOException` - if a problem is encountered while trying to validate the resource is ready.

    - #### getRecord

          Attributes getRecord()
                        throws IOException

      Parses the next record from the resource.
      Returns:
        LdapAttributes object representing the record parsed.
      Throws:
        `IOException` - if a problem is encountered while trying to read from the resource.

    - #### isReady

          boolean isReady()
                   throws IOException

      Indicates whether or not the parser is ready to to return results.
      Returns:
        boolean indicator
      Throws:
        `IOException` - if there is a problem with the underlying resource.