com.io7m.jstructural.xom

## Class SDocumentSerializer

- java.lang.Object
- - com.io7m.jstructural.xom.SDocumentSerializer

-     public final class SDocumentSerializer
      extends Object

  Serialization functions that use XOM to serialize document elements to XML.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static nu.xom.Element` | `document(SDocument d)` Serialize the given element to XML.
    `static nu.xom.Element` | `documentContents(SDocumentContents s)` Serialize the given element to XML.
    `static nu.xom.Element` | `documentStyle(SDocumentStyle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `documentTitle(SDocumentTitle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `documentWithParts(SDocumentWithParts s)` Serialize the given element to XML.
    `static nu.xom.Element` | `documentWithSections(SDocumentWithSections s)` Serialize the given element to XML.
    `static nu.xom.Element` | `footnote(SFootnote s)` Serialize the given element to XML.
    `static nu.xom.Node` | `footnoteContent(SFootnoteContent c)` Serialize the given element to XML.
    `static nu.xom.Element` | `formalItem(SFormalItem s)` Serialize the given element to XML.
    `static nu.xom.Element` | `formalItemContent(SFormalItemContent s)` Serialize the given element to XML.
    `static nu.xom.Element` | `formalItemList(SFormalItemList s)` Serialize the given element to XML.
    `static nu.xom.Element` | `formalItemTitle(SFormalItemTitle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `image(SImage s)` Serialize the given element to XML.
    `static nu.xom.Element` | `link(SLink s)` Serialize the given element to XML.
    `static nu.xom.Node` | `linkContent(SLinkContent c)` Serialize the given element to XML.
    `static nu.xom.Element` | `linkExternal(SLinkExternal s)` Serialize the given element to XML.
    `static nu.xom.Element` | `listItem(SListItem s)` Serialize the given element to XML.
    `static nu.xom.Node` | `listItemContent(SListItemContent c)` Serialize the given element to XML.
    `static nu.xom.Element` | `listOrdered(SListOrdered s)` Serialize the given element to XML.
    `static nu.xom.Element` | `listUnordered(SListUnordered s)` Serialize the given element to XML.
    `static nu.xom.Element` | `paragraph(SParagraph s)` Serialize the given element to XML.
    `static nu.xom.Node` | `paragraphContent(SParagraphContent c)` Serialize the given element to XML.
    `static nu.xom.Element` | `part(SPart p)` Serialize the given element to XML.
    `static nu.xom.Element` | `partContents(SPartContents s)` Serialize the given element to XML.
    `static nu.xom.Element` | `partTitle(SPartTitle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `section(SSection s)` Serialize the given element to XML.
    `static nu.xom.Element` | `sectionContents(SSectionContents s)` Serialize the given element to XML.
    `static nu.xom.Element` | `sectionTitle(SSectionTitle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `sectionWithParagraphs(SSectionWithParagraphs s)` Serialize the given element to XML.
    `static nu.xom.Element` | `sectionWithSubsections(SSectionWithSubsections s)` Serialize the given element to XML.
    `static nu.xom.Element` | `subsection(SSubsection s)` Serialize the given element to XML.
    `static nu.xom.Element` | `subsectionContent(SSubsectionContent c)` Serialize the given element to XML.
    `static nu.xom.Element` | `subsectionTitle(SSubsectionTitle s)` Serialize the given element to XML.
    `static nu.xom.Element` | `table(STable s)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableBody(STableBody s)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableCell(STableCell c)` Serialize the given element to XML.
    `static nu.xom.Node` | `tableCellContent(STableCellContent cc)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableColumnName(STableColumnName s)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableHead(STableHead s)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableRow(STableRow r)` Serialize the given element to XML.
    `static nu.xom.Element` | `tableSummary(STableSummary s)` Serialize the given element to XML.
    `static nu.xom.Element` | `term(STerm s)` Serialize the given element to XML.
    `static nu.xom.Text` | `text(SText s)` Serialize the given element to XML.
    `static nu.xom.Element` | `verbatim(SVerbatim s)` Serialize the given element to XML.

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

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

- - ### Method Detail

    - #### document

          @Nonnull
          public static nu.xom.Element document(@Nonnull
                                        SDocument d)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `d` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentContents

          @Nonnull
          public static nu.xom.Element documentContents(@Nonnull
                                                SDocumentContents s)
                                                 throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentStyle

          @Nonnull
          public static nu.xom.Element documentStyle(@Nonnull
                                             SDocumentStyle s)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentTitle

          @Nonnull
          public static nu.xom.Element documentTitle(@Nonnull
                                             SDocumentTitle s)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentWithParts

          @Nonnull
          public static nu.xom.Element documentWithParts(@Nonnull
                                                 SDocumentWithParts s)
                                                  throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### documentWithSections

          @Nonnull
          public static nu.xom.Element documentWithSections(@Nonnull
                                                    SDocumentWithSections s)
                                                     throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### footnote

          @Nonnull
          public static nu.xom.Element footnote(@Nonnull
                                        SFootnote s)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### footnoteContent

          @Nonnull
          public static nu.xom.Node footnoteContent(@Nonnull
                                            SFootnoteContent c)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### formalItem

          @Nonnull
          public static nu.xom.Element formalItem(@Nonnull
                                          SFormalItem s)
                                           throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### formalItemContent

          @Nonnull
          public static nu.xom.Element formalItemContent(@Nonnull
                                                 SFormalItemContent s)
                                                  throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### formalItemList

          @Nonnull
          public static nu.xom.Element formalItemList(@Nonnull
                                              SFormalItemList s)
                                               throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### formalItemTitle

          @Nonnull
          public static nu.xom.Element formalItemTitle(@Nonnull
                                               SFormalItemTitle s)
                                                throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### image

          @Nonnull
          public static nu.xom.Element image(@Nonnull
                                     SImage s)
                                      throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### link

          @Nonnull
          public static nu.xom.Element link(@Nonnull
                                    SLink s)
                                     throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### linkContent

          @Nonnull
          public static nu.xom.Node linkContent(@Nonnull
                                        SLinkContent c)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### linkExternal

          @Nonnull
          public static nu.xom.Element linkExternal(@Nonnull
                                            SLinkExternal s)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### listItem

          @Nonnull
          public static nu.xom.Element listItem(@Nonnull
                                        SListItem s)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### listItemContent

          @Nonnull
          public static nu.xom.Node listItemContent(@Nonnull
                                            SListItemContent c)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### listOrdered

          @Nonnull
          public static nu.xom.Element listOrdered(@Nonnull
                                           SListOrdered s)
                                            throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### listUnordered

          @Nonnull
          public static nu.xom.Element listUnordered(@Nonnull
                                             SListUnordered s)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### paragraph

          @Nonnull
          public static nu.xom.Element paragraph(@Nonnull
                                         SParagraph s)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### paragraphContent

          @Nonnull
          public static nu.xom.Node paragraphContent(@Nonnull
                                             SParagraphContent c)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### part

          @Nonnull
          public static nu.xom.Element part(@Nonnull
                                    SPart p)
                                     throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `p` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partContents

          @Nonnull
          public static nu.xom.Element partContents(@Nonnull
                                            SPartContents s)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### partTitle

          @Nonnull
          public static nu.xom.Element partTitle(@Nonnull
                                         SPartTitle s)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### section

          @Nonnull
          public static nu.xom.Element section(@Nonnull
                                       SSection s)
                                        throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### sectionContents

          @Nonnull
          public static nu.xom.Element sectionContents(@Nonnull
                                               SSectionContents s)
                                                throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### sectionTitle

          @Nonnull
          public static nu.xom.Element sectionTitle(@Nonnull
                                            SSectionTitle s)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### sectionWithParagraphs

          @Nonnull
          public static nu.xom.Element sectionWithParagraphs(@Nonnull
                                                     SSectionWithParagraphs s)
                                                      throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### sectionWithSubsections

          @Nonnull
          public static nu.xom.Element sectionWithSubsections(@Nonnull
                                                      SSectionWithSubsections s)
                                                       throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### subsection

          @Nonnull
          public static nu.xom.Element subsection(@Nonnull
                                          SSubsection s)
                                           throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### subsectionContent

          @Nonnull
          public static nu.xom.Element subsectionContent(@Nonnull
                                                 SSubsectionContent c)
                                                  throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### subsectionTitle

          @Nonnull
          public static nu.xom.Element subsectionTitle(@Nonnull
                                               SSubsectionTitle s)
                                                throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### table

          @Nonnull
          public static nu.xom.Element table(@Nonnull
                                     STable s)
                                      throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableBody

          @Nonnull
          public static nu.xom.Element tableBody(@Nonnull
                                         STableBody s)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableCell

          @Nonnull
          public static nu.xom.Element tableCell(@Nonnull
                                         STableCell c)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `c` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableCellContent

          @Nonnull
          public static nu.xom.Node tableCellContent(@Nonnull
                                             STableCellContent cc)
                                              throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `cc` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableColumnName

          @Nonnull
          public static nu.xom.Element tableColumnName(@Nonnull
                                               STableColumnName s)
                                                throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableHead

          @Nonnull
          public static nu.xom.Element tableHead(@Nonnull
                                         STableHead s)
                                          throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableRow

          @Nonnull
          public static nu.xom.Element tableRow(@Nonnull
                                        STableRow r)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `r` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### tableSummary

          @Nonnull
          public static nu.xom.Element tableSummary(@Nonnull
                                            STableSummary s)
                                             throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### term

          @Nonnull
          public static nu.xom.Element term(@Nonnull
                                    STerm s)
                                     throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### text

          @Nonnull
          public static nu.xom.Text text(@Nonnull
                                 SText s)
                                  throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

    - #### verbatim

          @Nonnull
          public static nu.xom.Element verbatim(@Nonnull
                                        SVerbatim s)
                                         throws com.io7m.jaux.Constraints.ConstraintError

      Serialize the given element to XML.
      Parameters:
        `s` - The element
      Returns:
        An XML element
      Throws:
        `com.io7m.jaux.Constraints.ConstraintError` - If any parameter is `null`

Copyright © 2014 <code@io7m.com> http://io7m.com