Package com.adobe.xfa

Class Schema

java.lang.Object
com.adobe.xfa.Schema
Direct Known Subclasses:
AppSchema, ConfigurationSchema, ConnectionSetSchema, DataSchema, LocaleSetSchema, SVGSchema, TemplateSchema

public abstract class Schema extends Object
A base class for all model schema definitions. Elements that are common to all models may be defined here.
  • Field Details

    • XFAAVAILABILITY_ALL

      public static final int XFAAVAILABILITY_ALL
      Sum of all availability masks. Same as Dynamic.
      See Also:
    • XFAAVAILABILITY_CORE

      public static final int XFAAVAILABILITY_CORE
      See Also:
    • XFAAVAILABILITY_DEPRECATED

      public static final int XFAAVAILABILITY_DEPRECATED
      See Also:
    • XFAAVAILABILITY_DYNAMIC

      public static final int XFAAVAILABILITY_DYNAMIC
      See Also:
    • XFAAVAILABILITY_PLUGIN

      public static final int XFAAVAILABILITY_PLUGIN
      See Also:
    • XFAAVAILABILITY_XFAF

      public static final int XFAAVAILABILITY_XFAF
      See Also:
    • XFAAVAILABILITY_XFASUBSET

      public static final int XFAAVAILABILITY_XFASUBSET
      See Also:
    • XFAAVAILABILITY_XFADESIGNER

      public static final int XFAAVAILABILITY_XFADESIGNER
      See Also:
    • XFAVERSION_10

      public static final int XFAVERSION_10
      XFA version 1.0.
      See Also:
    • XFAVERSION_21

      public static final int XFAVERSION_21
      XFA version 2.1.
      See Also:
    • XFAVERSION_22

      public static final int XFAVERSION_22
      XFA version 2.2.
      See Also:
    • XFAVERSION_23

      public static final int XFAVERSION_23
      XFA version 2.3.
      See Also:
    • XFAVERSION_24

      public static final int XFAVERSION_24
      XFA version 2.4.
      See Also:
    • XFAVERSION_25

      public static final int XFAVERSION_25
      XFA version 2.5.
      See Also:
    • XFAVERSION_26

      public static final int XFAVERSION_26
      XFA version 2.6.
      See Also:
    • XFAVERSION_27

      public static final int XFAVERSION_27
      XFA version 2.7.
      See Also:
    • XFAVERSION_28

      public static final int XFAVERSION_28
      XFA version 2.8.
      See Also:
    • XFAVERSION_29

      public static final int XFAVERSION_29
      XFA version 2.9.
      See Also:
    • XFAVERSION_30

      public static final int XFAVERSION_30
      XFA version 3.0.
      See Also:
    • XFAVERSION_31

      public static final int XFAVERSION_31
      XFA version 3.1.
      See Also:
    • XFAVERSION_32

      public static final int XFAVERSION_32
      XFA version 3.1.
      See Also:
    • XFAVERSION_33

      public static final int XFAVERSION_33
      XFA version 3.3.
      See Also:
    • XFAVERSION_34

      public static final int XFAVERSION_34
      XFA version 3.4.
      See Also:
    • XFAVERSION_35

      public static final int XFAVERSION_35
      XFA version 3.5.
      See Also:
    • XFAVERSION_HEAD

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

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

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

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

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

      public static final int XFAVERSION_OBS
      Obsolete XFA version.
      See Also:
  • Method Details

    • 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 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(String aNS, 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(String aNS, 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 String getNS()
      Get the namespace string for the model
      Returns:
      an interned namespace string
    • newAttribute

      public Attribute newAttribute(int attrName, 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)