Class DataModelFactory


  • public final class DataModelFactory
    extends ModelFactory
    A class to represent XFA data model factories. A data model factory is used by an application model to create a data model where appropriate, when loading an XML file.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataModelFactory()
      Instantiates a data model factory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean attributesAreValues()
      Return a boolean indicating whether XML attributes are to be treated as XFADataValues or ignored.
      void attributesAreValues​(boolean bSetting)
      Set the behavior for interpreting XML attributes.
      Model createDOM​(Element parent)
      Create the XML DOM node and the corresponding XFA Model.
      boolean getAllowAdd()
      DataModel knows how to merge a duplicate model into an existing one during postLoad processing.
      boolean isRootName​(java.lang.String name)  
      void reset()  
      void setOption​(java.lang.String optionName, java.lang.String optionValue, boolean bCritical)
      Sets a data loading option.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataModelFactory

        public DataModelFactory()
        Instantiates a data model factory.
    • Method Detail

      • attributesAreValues

        public boolean attributesAreValues()
        Return a boolean indicating whether XML attributes are to be treated as XFADataValues or ignored. The default is false.
        Returns:
        true if attributes are to be XFADataValues
      • attributesAreValues

        public void attributesAreValues​(boolean bSetting)
        Set the behavior for interpreting XML attributes.
        Parameters:
        bSetting - if true, non-namespaced attributes are to be interpreted as XFADataValues. If false, attributes are essentially ignored within the context of the XFA-Data DOM. The default is false.
      • createDOM

        public Model createDOM​(Element parent)
        Description copied from class: ModelFactory
        Create the XML DOM node and the corresponding XFA Model. In C++, this only creates the XML DOM node, and a separate step creates the corresponding Model node. In XFA4J, the we don't have the capability of calling AppModel.loadNode to instantiate an XFA Model from the DOM node, so this method is changed to create the XFA model.
        Specified by:
        createDOM in class ModelFactory
        Parameters:
        parent - the XFA DOM node that will be the XML parent of the new DOM peer.
        Returns:
        the XFA Model that was created.
      • getAllowAdd

        public boolean getAllowAdd()
        DataModel knows how to merge a duplicate model into an existing one during postLoad processing.
        Overrides:
        getAllowAdd in class ModelFactory
      • isRootName

        public boolean isRootName​(java.lang.String name)
        Overrides:
        isRootName in class ModelFactory
        Parameters:
        name - the name to be tested. This String must be interned.
      • setOption

        public void setOption​(java.lang.String optionName,
                              java.lang.String optionValue,
                              boolean bCritical)
        Sets a data loading option.
        Overrides:
        setOption in class ModelFactory
        Parameters:
        optionName - the name of the option
        optionValue - the value of the option
        bCritical - if true, then any future attempts to set this option on this DataModelFactory are rejected.
      • reset

        public void reset()