Package com.io7m.coffeepick.runtime.format.xml

# Interface FormatXMLContentHandlerType<A>

Type Parameters:
  `A` - The type of produced values

All Known Implementing Classes:
  `FormatXML1BrandingHandler`, `FormatXML1BuildHandler`, `FormatXML1HashHandler`, `FormatXML1RepositoryHandler`, `FormatXML1RuntimeHandler`, `FormatXML1RuntimesHandler`, `FormatXML1TagHandler`, `FormatXML1TagsHandler`, `FormatXML1TopLevelHandler`, `FormatXMLAbstractContentHandler`, `FormatXMLMappingHandler`

    public interface FormatXMLContentHandlerType<A>

A content handler that produces values of type `A`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `A` | `get()` |
  `<B> FormatXMLContentHandlerType<B>` | `map​(java.util.function.Function<A,​B> f)` | Apply `f` to the results of this content handler.
  `void` | `onCharacters​(char[] ch, int start, int length)` | Text was received.
  `java.util.Optional<A>` | `onElementFinished​(java.lang.String namespace, java.lang.String name, java.lang.String qname)` | An XML element has finished.
  `void` | `onElementStarted​(java.lang.String namespace, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attributes)` | An XML element has been started.

- ## Method Details

  - ### map

    <B> FormatXMLContentHandlerType<B> map​(java.util.function.Function<A,​B> f)
    Apply `f` to the results of this content handler.
    Type Parameters:
      `B` - The type of returned values
    Parameters:
      `f` - The function
    Returns:
      A content handler that produces values of type `B`

  - ### onElementStarted

    void onElementStarted​(java.lang.String namespace, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
    An XML element has been started.
    Parameters:
      `namespace` - The namespace URI
      `name` - The local element name
      `qname` - The fully qualified name
      `attributes` - The attributes
    Throws:
      `org.xml.sax.SAXException` - On errors

  - ### onElementFinished

    java.util.Optional<A> onElementFinished​(java.lang.String namespace, java.lang.String name, java.lang.String qname) throws org.xml.sax.SAXException
    An XML element has finished.
    Parameters:
      `namespace` - The namespace URI
      `name` - The local element name
      `qname` - The fully qualified name
    Returns:
      A value of `A` if the given element finished the content
    Throws:
      `org.xml.sax.SAXException` - On errors

  - ### onCharacters

    void onCharacters​(char[] ch, int start, int length) throws org.xml.sax.SAXException
    Text was received.
    Parameters:
      `ch` - The character buffer
      `start` - The offset of the start of the data in the buffer
      `length` - The length of the data in the buffer
    Throws:
      `org.xml.sax.SAXException` - On errors

  - ### get

    A get()
    Returns:
      The completed value