Interface Selector

    • Method Detail

      • matchNext

        Selector matchNext​(MarshallingContext context)
        Finds a parser for marshalling a bean object. If matched by this Selector, the method should set the bean object on the property tree and return itself.
        Parameters:
        context - the MarshallingContext
        Returns:
        the matched Selector for marshalling the bean object
      • close

        Selector close​(ParsingContext context)
        Checks for any unsatisfied components before the stream is closed.
        Parameters:
        context - the ParsingContext
        Returns:
        the first unsatisfied node
      • reset

        void reset​(ParsingContext context)
        Resets the component count of this Selector's children.
        Parameters:
        context - the ParsingContext
      • getCount

        int getCount​(ParsingContext context)
        Returns the number of times this component was matched within the current iteration of its parent component.
        Parameters:
        context - the ParsingContext
        Returns:
        the match count
      • setCount

        void setCount​(ParsingContext context,
                      int count)
        Sets the number of times this component was matched within the current iteration of its parent component.
        Parameters:
        context - the ParsingContext
        count - the new match count
      • isMaxOccursReached

        boolean isMaxOccursReached​(ParsingContext context)
        Returns whether this component has reached its maximum occurrences.
        Parameters:
        context - the ParsingContext
        Returns:
        true if maximum occurrences has been reached
      • getMinOccurs

        int getMinOccurs()
        Returns the minimum number of occurrences of this component (within the context of its parent).
        Returns:
        the minimum occurrences
      • getMaxOccurs

        int getMaxOccurs()
        Returns the maximum number of occurrences of this component (within the context of its parent).
        Returns:
        the maximum occurrences
      • getOrder

        int getOrder()
        Returns the order of this component (within the context of its parent).
        Returns:
        the component order
      • getProperty

        Property getProperty()
        Returns the Property mapped to this component, or null if there is no property mapping.
        Returns:
        the Property mapped to this component
      • isRecordGroup

        boolean isRecordGroup()
        Returns whether this component is a record group.
        Returns:
        true if this component is a record group, false otherwise
      • updateState

        void updateState​(ParsingContext context,
                         java.lang.String namespace,
                         java.util.Map<java.lang.String,​java.lang.Object> state)
        Updates a Map with the current state of the Writer to allow for restoration at a later time.
        Parameters:
        context - the ParsingContext
        namespace - a String to prefix all state keys with
        state - the Map to update with the latest state
      • restoreState

        void restoreState​(ParsingContext context,
                          java.lang.String namespace,
                          java.util.Map<java.lang.String,​java.lang.Object> state)
                   throws java.lang.IllegalStateException
        Restores a Map of previously stored state information.
        Parameters:
        context - the ParsingContext
        namespace - a String to prefix all state keys with
        state - the Map containing the state to restore
        Throws:
        java.lang.IllegalStateException - if the Map is missing any state information