Package com.adobe.xfa.data
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 Summary
Constructors Constructor Description DataModelFactory()Instantiates a data model factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanattributesAreValues()Return a boolean indicating whether XML attributes are to be treated as XFADataValues or ignored.voidattributesAreValues(boolean bSetting)Set the behavior for interpreting XML attributes.ModelcreateDOM(Element parent)Create the XML DOM node and the corresponding XFA Model.booleangetAllowAdd()DataModel knows how to merge a duplicate model into an existing one during postLoad processing.booleanisRootName(java.lang.String name)voidreset()voidsetOption(java.lang.String optionName, java.lang.String optionValue, boolean bCritical)Sets a data loading option.-
Methods inherited from class com.adobe.xfa.ModelFactory
rootName
-
-
-
-
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:ModelFactoryCreate 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:
createDOMin classModelFactory- 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:
getAllowAddin classModelFactory
-
isRootName
public boolean isRootName(java.lang.String name)
- Overrides:
isRootNamein classModelFactory- 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:
setOptionin classModelFactory- Parameters:
optionName- the name of the optionoptionValue- the value of the optionbCritical- iftrue, then any future attempts to set this option on thisDataModelFactoryare rejected.
-
reset
public void reset()
-
-