Class DataModelFactory

java.lang.Object
com.adobe.xfa.ModelFactory
com.adobe.xfa.data.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 Details

    • DataModelFactory

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

    • 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(String name)
      Overrides:
      isRootName in class ModelFactory
      Parameters:
      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.
      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()