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 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.
        true if attributes are to be XFADataValues
      • attributesAreValues

        public void attributesAreValues​(boolean bSetting)
        Set the behavior for interpreting XML attributes.
        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
        parent - the XFA DOM node that will be the XML parent of the new DOM peer.
        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.
        getAllowAdd in class ModelFactory
      • isRootName

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

        public void setOption​(String optionName,
                              String optionValue,
                              boolean bCritical)
        Sets a data loading option.
        setOption in class ModelFactory
        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()