Package com.adobe.xfa

Class Schema

    • Field Detail

      • XFAAVAILABILITY_ALL

        public static final int XFAAVAILABILITY_ALL
        Sum of all availability masks. Same as Dynamic.
        See Also:
        Constant Field Values
      • XFAAVAILABILITY_DEPRECATED

        public static final int XFAAVAILABILITY_DEPRECATED
        See Also:
        Constant Field Values
      • XFAAVAILABILITY_DYNAMIC

        public static final int XFAAVAILABILITY_DYNAMIC
        See Also:
        Constant Field Values
      • XFAAVAILABILITY_XFASUBSET

        public static final int XFAAVAILABILITY_XFASUBSET
        See Also:
        Constant Field Values
      • XFAAVAILABILITY_XFADESIGNER

        public static final int XFAAVAILABILITY_XFADESIGNER
        See Also:
        Constant Field Values
      • XFAVERSION_HEAD

        public static final int XFAVERSION_HEAD
        Head XFA version.
        See Also:
        Constant Field Values
      • XFAVERSION_LOCALESETHEAD

        public static final int XFAVERSION_LOCALESETHEAD
        LocaleSetHead XFA version.
        See Also:
        Constant Field Values
      • XFAVERSION_SOURCESETHEAD

        public static final int XFAVERSION_SOURCESETHEAD
        SourceSetHead XFA version.
        See Also:
        Constant Field Values
      • XFAVERSION_CONNECTIONSETHEAD

        public static final int XFAVERSION_CONNECTIONSETHEAD
        ConnectionSetHead XFA version.
        See Also:
        Constant Field Values
      • XFAVERSION_CONFIGURATIONHEAD

        public static final int XFAVERSION_CONFIGURATIONHEAD
        ConfigurationHead XFA version.
        See Also:
        Constant Field Values
      • XFAVERSION_OBS

        public static final int XFAVERSION_OBS
        Obsolete XFA version.
        See Also:
        Constant Field Values
    • Method Detail

      • nullSchema

        public static final NodeSchema nullSchema()
        Return a default (null) schema.
      • addForeignSchema

        public void addForeignSchema​(Schema schema)
      • defaultAttribute

        public Attribute defaultAttribute​(int attrName,
                                          int eClassTag)
        Return a default attribute value
        Parameters:
        attrName - the name of the attribute. For efficiency, this name should come from XFANamespace
        eClassTag - Identify which schema element this attribute belongs to
        Returns:
        The default value for this attribute.
      • getAtom

        public java.lang.String getAtom​(int classTag)
        Get the Atom corresponding to this class tag Note that this is a schema-specific look-up! We no longer assume all class Tags are defined in XFA
        Parameters:
        classTag - the class tag to look up
        Returns:
        the corresponding Atom
      • getAttributeTag

        public int getAttributeTag​(java.lang.String aNS,
                                   java.lang.String aAttrName)
        Find a schema tag given an atom representing an attribute name
        Parameters:
        aNS - the namespace for this attribute. This String must be interned.
        aAttrName - the input attribute name to search for. This String must be interned.
        Returns:
        integer value of the tag. -1 if not found.
      • getElementTag

        public int getElementTag​(java.lang.String aNS,
                                 java.lang.String aNodeName)
        Find a schema tag given an atom representing an element name
        Parameters:
        aNS - the namespace for this element
        aNodeName - the input element name to search for
        Returns:
        tag number. -1 if not found.
      • getInstance

        public final Element getInstance​(int eTag,
                                         Model model,
                                         Element parent,
                                         Node prevSibling,
                                         boolean bDoVersionCheck)
        Create an instance of a node.
        Parameters:
        eTag - The class tag of the XFA node to create.
        model - the model where this node will belong
        parent - the parent node to add the new child to
        prevSibling - the previous sibling -- specifying this makes adding a child more efficient
        Returns:
        a new node
      • getNodeSchema

        public final NodeSchema getNodeSchema​(int eClassTag)
        Get the schema for a node.
        Parameters:
        eClassTag - The name of the schema element to query. This method gets best performance if the provided name is from XFANamespace
        Returns:
        An NodeSchema.
      • getNS

        public java.lang.String getNS()
        Get the namespace string for the model
        Returns:
        an interned namespace string
      • newAttribute

        public Attribute newAttribute​(int attrName,
                                      java.lang.String value,
                                      int eClassTag)
        Create a new attribute value
        Parameters:
        attrName - The name of the attribute to create. For efficiency, this name should come from XFANamespace
        value - the value to assign to the new attribute
        eClassTag - Identify which schema element this attribute belongs to
        Returns:
        a new Attribute.
      • putForeignElement

        public void putForeignElement​(int eParent,
                                      int eChild,
                                      ChildReln relation,
                                      Schema foreignSchema,
                                      int nVersionIntro,
                                      int nAvailability,
                                      int nVersionDep)