Package org.jfree.layouting.layouter.feed

## Class DefaultInputFeed

- java.lang.Object
- - org.jfree.layouting.layouter.feed.DefaultInputFeed

- All Implemented Interfaces:
    `InputFeed`, `StatefullComponent`

      public class DefaultInputFeed
      extends java.lang.Object
      implements InputFeed

  Creation-Date: 05.12.2005, 18:19:03
  Author:
    Thomas Morgner

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DOCUMENT_FINISHED` |
    `static int` | `DOCUMENT_STARTING` |
    `static int` | `ELEMENT_ATTRIBUTES` |
    `static int` | `ELEMENT_CONTENT` |
    `static int` | `ELEMENT_EXPECTED` |
    `static int` | `ELEMENT_STARTED` |
    `static int` | `META_EXPECTED` |
    `static int` | `META_NODE_ATTRIBUTES` |
    `static int` | `META_NODE_START` |
    `static int` | `META_PROCESSING` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `` | `DefaultInputFeed​(LayoutProcess process)` |
    `protected` | `DefaultInputFeed​(LayoutProcess process, boolean init)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addContent​(java.lang.String text)` |
    `void` | `addDocumentAttribute​(java.lang.String name, java.lang.Object attr)` | Adds document attributes.
    `void` | `endDocument​()` |
    `void` | `endElement​()` |
    `void` | `endMetaInfo​()` |
    `void` | `endMetaNode​()` |
    `Normalizer` | `getCurrentNormalizer​()` | Warning; This method is needed internally, mess with it from the outside and you will run into trouble.
    `NamespaceCollection` | `getNamespaceCollection​()` |
    `Normalizer` | `getNormalizer​()` |
    `protected LayoutProcess` | `getProcess​()` |
    `protected int` | `getState​()` |
    `void` | `handlePageBreakEncountered​(CSSValue pageName, PseudoPage[] pseudoPages)` |
    `boolean` | `isPagebreakEncountered​()` |
    `protected void` | `performAddContent​(java.lang.String text)` |
    `protected void` | `performAddDocumentAttribute​(java.lang.String name, java.lang.Object attr)` |
    `protected void` | `performEndDocument​()` |
    `protected void` | `performEndElement​()` |
    `protected void` | `performEndMetaInfo​()` |
    `protected void` | `performEndMetaNode​()` |
    `protected void` | `performSetAttribute​(java.lang.String namespace, java.lang.String name, java.lang.Object attr)` |
    `protected void` | `performSetMetaNodeAttribute​(java.lang.String name, java.lang.Object attr)` |
    `protected void` | `performStartDocument​()` |
    `protected void` | `performStartElement​(java.lang.String namespace, java.lang.String name)` |
    `protected void` | `performStartMetaInfo​()` |
    `protected void` | `performStartMetaNode​()` |
    `void` | `resetPageBreakFlag​()` |
    `State` | `saveState​()` |
    `void` | `setAttribute​(java.lang.String namespace, java.lang.String name, java.lang.Object attr)` |
    `void` | `setMetaNodeAttribute​(java.lang.String name, java.lang.Object attr)` | Defines an attribute for the meta-nodes.
    `void` | `startDocument​()` | Starts the document processing.
    `void` | `startElement​(java.lang.String namespace, java.lang.String name)` |
    `void` | `startMetaInfo​()` | Signals, that meta-data follows.
    `void` | `startMetaNode​()` | Starts a new meta-node structure.

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

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

- - ### Field Detail

    - #### DOCUMENT_STARTING

          public static final int DOCUMENT_STARTING

      See Also:
        Constant Field Values

    - #### META_EXPECTED

          public static final int META_EXPECTED

      See Also:
        Constant Field Values

    - #### META_PROCESSING

          public static final int META_PROCESSING

      See Also:
        Constant Field Values

    - #### META_NODE_START

          public static final int META_NODE_START

      See Also:
        Constant Field Values

    - #### META_NODE_ATTRIBUTES

          public static final int META_NODE_ATTRIBUTES

      See Also:
        Constant Field Values

    - #### ELEMENT_EXPECTED

          public static final int ELEMENT_EXPECTED

      See Also:
        Constant Field Values

    - #### ELEMENT_STARTED

          public static final int ELEMENT_STARTED

      See Also:
        Constant Field Values

    - #### ELEMENT_ATTRIBUTES

          public static final int ELEMENT_ATTRIBUTES

      See Also:
        Constant Field Values

    - #### ELEMENT_CONTENT

          public static final int ELEMENT_CONTENT

      See Also:
        Constant Field Values

    - #### DOCUMENT_FINISHED

          public static final int DOCUMENT_FINISHED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultInputFeed

          public DefaultInputFeed​(LayoutProcess process)

    - #### DefaultInputFeed

          protected DefaultInputFeed​(LayoutProcess process,
                                     boolean init)

  - ### Method Detail

    - #### resetPageBreakFlag

          public void resetPageBreakFlag​()

      Specified by:
        `resetPageBreakFlag` in interface `InputFeed`

    - #### handlePageBreakEncountered

          public void handlePageBreakEncountered​(CSSValue pageName,
                                                 PseudoPage[] pseudoPages)
                                          throws NormalizationException

      Specified by:
        `handlePageBreakEncountered` in interface `InputFeed`
      Throws:
        `NormalizationException`

    - #### isPagebreakEncountered

          public boolean isPagebreakEncountered​()

      Specified by:
        `isPagebreakEncountered` in interface `InputFeed`

    - #### startDocument

          public final void startDocument​()

      Description copied from interface: `InputFeed`
      Starts the document processing. This is the first method to call. After calling this method, the meta-data should be fed into the inputfeed.
      Specified by:
        `startDocument` in interface `InputFeed`

    - #### performStartDocument

          protected void performStartDocument​()

    - #### startMetaInfo

          public final void startMetaInfo​()

      Description copied from interface: `InputFeed`
      Signals, that meta-data follows. Calling this method is only valid directly after startDocument has been called.
      Specified by:
        `startMetaInfo` in interface `InputFeed`

    - #### performStartMetaInfo

          protected void performStartMetaInfo​()

    - #### addDocumentAttribute

          public final void addDocumentAttribute​(java.lang.String name,
                                                 java.lang.Object attr)

      Description copied from interface: `InputFeed`
      Adds document attributes. Document attributes hold object factories and document wide resources which appear only once.
      Specified by:
        `addDocumentAttribute` in interface `InputFeed`

    - #### performAddDocumentAttribute

          protected void performAddDocumentAttribute​(java.lang.String name,
                                                     java.lang.Object attr)

    - #### startMetaNode

          public void startMetaNode​()

      Description copied from interface: `InputFeed`
      Starts a new meta-node structure. Meta-Nodes are used to hold content that can appear more than once (like stylesheet declarations).

      For now, only stylesheet declarations are defined as meta-node content; more content types will surely arise in the future.

      Calling this method is only valid after 'startMetaInfo' has been called.
      Specified by:
        `startMetaNode` in interface `InputFeed`

    - #### performStartMetaNode

          protected void performStartMetaNode​()

    - #### setMetaNodeAttribute

          public final void setMetaNodeAttribute​(java.lang.String name,
                                                 java.lang.Object attr)

      Description copied from interface: `InputFeed`
      Defines an attribute for the meta-nodes. For each meta node, at least the 'type' attribute (namespace: LibLayout) should be defined.
      Specified by:
        `setMetaNodeAttribute` in interface `InputFeed`

    - #### performSetMetaNodeAttribute

          protected void performSetMetaNodeAttribute​(java.lang.String name,
                                                     java.lang.Object attr)

    - #### endMetaNode

          public void endMetaNode​()

      Specified by:
        `endMetaNode` in interface `InputFeed`

    - #### performEndMetaNode

          protected void performEndMetaNode​()

    - #### endMetaInfo

          public final void endMetaInfo​()
                                 throws InputFeedException

      Specified by:
        `endMetaInfo` in interface `InputFeed`
      Throws:
        `InputFeedException`

    - #### getNamespaceCollection

          public NamespaceCollection getNamespaceCollection​()

      Specified by:
        `getNamespaceCollection` in interface `InputFeed`

    - #### performEndMetaInfo

          protected void performEndMetaInfo​()
                                     throws InputFeedException

      Throws:
        `InputFeedException`

    - #### startElement

          public final void startElement​(java.lang.String namespace,
                                         java.lang.String name)
                                  throws InputFeedException

      Specified by:
        `startElement` in interface `InputFeed`
      Throws:
        `InputFeedException`

    - #### performStartElement

          protected void performStartElement​(java.lang.String namespace,
                                             java.lang.String name)

    - #### setAttribute

          public final void setAttribute​(java.lang.String namespace,
                                         java.lang.String name,
                                         java.lang.Object attr)

      Specified by:
        `setAttribute` in interface `InputFeed`

    - #### performSetAttribute

          protected void performSetAttribute​(java.lang.String namespace,
                                             java.lang.String name,
                                             java.lang.Object attr)

    - #### addContent

          public final void addContent​(java.lang.String text)
                                throws InputFeedException

      Specified by:
        `addContent` in interface `InputFeed`
      Throws:
        `InputFeedException`

    - #### performAddContent

          protected void performAddContent​(java.lang.String text)
                                    throws InputFeedException,
                                           java.io.IOException,
                                           NormalizationException

      Throws:
        `InputFeedException`
        `java.io.IOException`
        `NormalizationException`

    - #### endElement

          public final void endElement​()
                                throws InputFeedException

      Specified by:
        `endElement` in interface `InputFeed`
      Throws:
        `InputFeedException`

    - #### performEndElement

          protected void performEndElement​()
                                    throws java.io.IOException,
                                           NormalizationException

      Throws:
        `java.io.IOException`
        `NormalizationException`

    - #### endDocument

          public final void endDocument​()
                                 throws InputFeedException

      Specified by:
        `endDocument` in interface `InputFeed`
      Throws:
        `InputFeedException`

    - #### performEndDocument

          protected void performEndDocument​()
                                     throws java.io.IOException,
                                            NormalizationException

      Throws:
        `java.io.IOException`
        `NormalizationException`

    - #### getProcess

          protected LayoutProcess getProcess​()

    - #### getState

          protected int getState​()

    - #### getNormalizer

          public Normalizer getNormalizer​()

    - #### saveState

          public State saveState​()
                          throws StateException

      Specified by:
        `saveState` in interface `StatefullComponent`
      Throws:
        `StateException`

    - #### getCurrentNormalizer

          public Normalizer getCurrentNormalizer​()

      Warning; This method is needed internally, mess with it from the outside and you will run into trouble. The normalizer is a statefull component and any call to it may mess up the state. From there on, 'Abandon every hope, ye who enter here'.
      Specified by:
        `getCurrentNormalizer` in interface `InputFeed`
      Returns: