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 java.lang.Object
A base class for all model schema definitions. Elements that are common to all models may be defined here.
-
-
Field Summary
Fields Modifier and Type Field Description static int
XFAAVAILABILITY_ALL
Sum of all availability masks.static int
XFAAVAILABILITY_CORE
static int
XFAAVAILABILITY_DEPRECATED
static int
XFAAVAILABILITY_DYNAMIC
static int
XFAAVAILABILITY_PLUGIN
static int
XFAAVAILABILITY_XFADESIGNER
static int
XFAAVAILABILITY_XFAF
static int
XFAAVAILABILITY_XFASUBSET
static int
XFAVERSION_10
XFA version 1.0.static int
XFAVERSION_21
XFA version 2.1.static int
XFAVERSION_22
XFA version 2.2.static int
XFAVERSION_23
XFA version 2.3.static int
XFAVERSION_24
XFA version 2.4.static int
XFAVERSION_25
XFA version 2.5.static int
XFAVERSION_26
XFA version 2.6.static int
XFAVERSION_27
XFA version 2.7.static int
XFAVERSION_28
XFA version 2.8.static int
XFAVERSION_29
XFA version 2.9.static int
XFAVERSION_30
XFA version 3.0.static int
XFAVERSION_31
XFA version 3.1.static int
XFAVERSION_32
XFA version 3.1.static int
XFAVERSION_33
XFA version 3.3.static int
XFAVERSION_34
XFA version 3.4.static int
XFAVERSION_35
XFA version 3.5.static int
XFAVERSION_CONFIGURATIONHEAD
ConfigurationHead XFA version.static int
XFAVERSION_CONNECTIONSETHEAD
ConnectionSetHead XFA version.static int
XFAVERSION_HEAD
Head XFA version.static int
XFAVERSION_LOCALESETHEAD
LocaleSetHead XFA version.static int
XFAVERSION_OBS
Obsolete XFA version.static int
XFAVERSION_SOURCESETHEAD
SourceSetHead XFA version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addForeignSchema(Schema schema)
Attribute
defaultAttribute(int attrName, int eClassTag)
Return a default attribute valuejava.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 XFAint
getAttributeTag(java.lang.String aNS, java.lang.String aAttrName)
Find a schema tag given an atom representing an attribute nameint
getElementTag(java.lang.String aNS, java.lang.String aNodeName)
Find a schema tag given an atom representing an element nameElement
getInstance(int eTag, Model model, Element parent, Node prevSibling, boolean bDoVersionCheck)
Create an instance of a node.NodeSchema
getNodeSchema(int eClassTag)
Get the schema for a node.java.lang.String
getNS()
Get the namespace string for the modelAttribute
newAttribute(int attrName, java.lang.String value, int eClassTag)
Create a new attribute valuestatic NodeSchema
nullSchema()
Return a default (null) schema.void
putForeignElement(int eParent, int eChild, ChildReln relation, Schema foreignSchema, int nVersionIntro, int nAvailability, int nVersionDep)
-
-
-
Field Detail
-
XFAAVAILABILITY_ALL
public static final int XFAAVAILABILITY_ALL
Sum of all availability masks. Same as Dynamic.- See Also:
- Constant Field Values
-
XFAAVAILABILITY_CORE
public static final int XFAAVAILABILITY_CORE
- 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_PLUGIN
public static final int XFAAVAILABILITY_PLUGIN
- See Also:
- Constant Field Values
-
XFAAVAILABILITY_XFAF
public static final int XFAAVAILABILITY_XFAF
- 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_10
public static final int XFAVERSION_10
XFA version 1.0.- See Also:
- Constant Field Values
-
XFAVERSION_21
public static final int XFAVERSION_21
XFA version 2.1.- See Also:
- Constant Field Values
-
XFAVERSION_22
public static final int XFAVERSION_22
XFA version 2.2.- See Also:
- Constant Field Values
-
XFAVERSION_23
public static final int XFAVERSION_23
XFA version 2.3.- See Also:
- Constant Field Values
-
XFAVERSION_24
public static final int XFAVERSION_24
XFA version 2.4.- See Also:
- Constant Field Values
-
XFAVERSION_25
public static final int XFAVERSION_25
XFA version 2.5.- See Also:
- Constant Field Values
-
XFAVERSION_26
public static final int XFAVERSION_26
XFA version 2.6.- See Also:
- Constant Field Values
-
XFAVERSION_27
public static final int XFAVERSION_27
XFA version 2.7.- See Also:
- Constant Field Values
-
XFAVERSION_28
public static final int XFAVERSION_28
XFA version 2.8.- See Also:
- Constant Field Values
-
XFAVERSION_29
public static final int XFAVERSION_29
XFA version 2.9.- See Also:
- Constant Field Values
-
XFAVERSION_30
public static final int XFAVERSION_30
XFA version 3.0.- See Also:
- Constant Field Values
-
XFAVERSION_31
public static final int XFAVERSION_31
XFA version 3.1.- See Also:
- Constant Field Values
-
XFAVERSION_32
public static final int XFAVERSION_32
XFA version 3.1.- See Also:
- Constant Field Values
-
XFAVERSION_33
public static final int XFAVERSION_33
XFA version 3.3.- See Also:
- Constant Field Values
-
XFAVERSION_34
public static final int XFAVERSION_34
XFA version 3.4.- See Also:
- Constant Field Values
-
XFAVERSION_35
public static final int XFAVERSION_35
XFA version 3.5.- 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 XFANamespaceeClassTag
- 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 elementaNodeName
- 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 belongparent
- the parent node to add the new child toprevSibling
- 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 XFANamespacevalue
- the value to assign to the new attributeeClassTag
- Identify which schema element this attribute belongs to- Returns:
- a new Attribute.
-
-