Class LocaleSetModel

  • All Implemented Interfaces:
    Element.DualDomNode, Peer

    public final class LocaleSetModel
    extends Model
    A class to model the collection of all XFA nodes that make up form locale set.
    • Constructor Detail

      • LocaleSetModel

        public LocaleSetModel​(Element parent,
                              Node prevSibling)
        Default Constructor.
    • Method Detail

      • createNode

        public Node createNode​(int eTag,
                               Element parent,
                               java.lang.String aName,
                               java.lang.String aNS,
                               boolean bDoVersionCheck)
        Description copied from class: Model
        Create an element with the given tag, parent, name and uri.
        Specified by:
        createNode in class Model
        Parameters:
        eTag - the element's tag.
        parent - the element's parent.
        aName - the element's name.
        aNS - the element's namespace.
        bDoVersionCheck - check the element's version.
        Returns:
        a new element.
        See Also:
        Model.createNode(int, Element, String, String, boolean)
      • getHeadNS

        public java.lang.String getHeadNS()
        Specified by:
        getHeadNS in class Model
      • getLocaleSetModel

        public static LocaleSetModel getLocaleSetModel​(AppModel appModel,
                                                       boolean bCreateIfNotFound)
        Gets the locale set model held within an XFA DOM hierarchy.
        Parameters:
        appModel - the application model.
        bCreateIfNotFound - when set, create a model if necessary.
        Returns:
        the locale set model or null if none found.
      • localeSetNS

        public static java.lang.String localeSetNS()
        Namespace
        Returns:
        The localeSet namespace URI string.
      • setLocaleSetModel

        public static boolean setLocaleSetModel​(AppModel oAppModel,
                                                Element oNode)
        Convenience method to update the LocaleSetModel held within the DOM hierarchy. Search the given root node for the locale attribute off subform and field nodes. Augment the locale set model with the data of all new locales found from this search.
        Parameters:
        oAppModel - - the application model.
        oNode - - the root node of the template model.
        Returns:
        boolean true upon success and false otherwise.
      • refreshLocales

        public void refreshLocales()
        Refresh the XFA API's runtime locale data from this model's localeSet. Typically the localeSet will contain locales and/or locale data that is different from LcData's static store.
      • loadLocalesFromConfig

        public static void loadLocalesFromConfig​(Node oContext)
      • getNS

        public java.lang.String getNS()
        Description copied from class: Element
        Gets this element's namespace.
        Overrides:
        getNS in class Model
        Returns:
        the namespace URI.
        See Also:
        Element.getNS()
      • isVersionCompatible

        public boolean isVersionCompatible​(int nVersion,
                                           int nTargetVersion)
        Overrides:
        isVersionCompatible in class Model