Class RootXmlMapping

java.lang.Object
net.officefloor.plugin.xml.unmarshall.tree.RootXmlMapping
All Implemented Interfaces:
XmlMapping

public class RootXmlMapping extends Object implements XmlMapping
XmlMapping that puts the root object into context.
Author:
Daniel Sagenschneider
  • Field Details

    • rootObjectContext

      protected final XmlContext rootObjectContext
      XmlContext of the root target object.
  • Constructor Details

    • RootXmlMapping

      public RootXmlMapping(XmlContext rootObjectContext)
      Initiate with XmlContext for the root target object.
      Parameters:
      rootObjectContext - XmlContext for the root target object.
  • Method Details

    • startMapping

      public void startMapping(XmlState state, String elementName) throws XmlMarshallException
      Description copied from interface: XmlMapping
      Starts the load of the value/object to the target object based on the current context and state of unmarshalling.
      Specified by:
      startMapping in interface XmlMapping
      Parameters:
      state - Current state of XML unmarshalling.
      elementName - Name of element/attribute being mapped.
      Throws:
      XmlMarshallException - If fail to load XML mapping.
    • endMapping

      public void endMapping(XmlState state, String value) throws XmlMarshallException
      Description copied from interface: XmlMapping
      Ends the load of the value/object to the target object based on the current context and state of unmarshalling.
      Specified by:
      endMapping in interface XmlMapping
      Parameters:
      state - state of XML unmarshalling.
      value - Value of the element/attribute.
      Throws:
      XmlMarshallException - If fail to load XML mapping.