public class GlobalDefMap
extends java.lang.Object
The definitions are stored in a two-level mapping. The first level is by namespaceUri, so there is a map for each namespace. The individual namespace maps store all the GlobalDefs for that namespace. To access a particular globalDefinition, the name of the definition (e.g., the type name) is required, as well as the namespaceUri for the namespace in which the definition is defined.
This class also contains a NamespaceRegistry that stores the namespaces defined at the global level of the schema. NOTE: it is possible that schemafiles define and use namespaces that are not visible at the top-level of the schema. In this case, there will be entries in the GlobalDefMap for these namespaces, but the namespaces themselves will not be registered in the NamespaceRegistry.
Constructor and Description |
---|
GlobalDefMap() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.String key)
Description of the Method
|
void |
destroy()
Should release resources and call the finalize method.
|
java.util.List |
getComplexTypes() |
java.util.List |
getDefsOfType(int type) |
NamespaceRegistry |
getNamespaces() |
java.util.List |
getNsKeys()
Method to retrieve the list of names used to identify desired values.
|
java.util.Map |
getNsMap(java.lang.String nsUri) |
java.util.List |
getNsValues(java.lang.String nsUri)
Retrieves GlobalDefs associated with specified Namespace.
|
java.util.List |
getSimpleTypes() |
GlobalDef |
getValue(java.lang.String name)
Accessor method for retrieving a specific named GlobalDef.
|
GlobalDef |
getValue(java.lang.String name,
org.dom4j.Namespace ns) |
GlobalDef |
getValue(java.lang.String name,
java.lang.String nsUri) |
java.util.List |
getValues() |
boolean |
init()
Should initialize members as required.
|
static void |
setDebug(boolean d) |
void |
setValue(java.lang.String name,
GlobalDef def,
org.dom4j.Namespace ns)
Inserts a GlobalDef instance in the GlobalDefMap.
|
public boolean init()
public NamespaceRegistry getNamespaces()
public void destroy()
public boolean containsKey(java.lang.String key)
key
- Description of the Parameterpublic java.util.List getNsKeys()
public java.util.List getValues()
public java.util.Map getNsMap(java.lang.String nsUri)
public java.util.List getSimpleTypes()
public java.util.List getComplexTypes()
public java.util.List getDefsOfType(int type)
public java.util.List getNsValues(java.lang.String nsUri)
public GlobalDef getValue(java.lang.String name)
name
- Description of the Parameterpublic GlobalDef getValue(java.lang.String name, org.dom4j.Namespace ns)
public GlobalDef getValue(java.lang.String name, java.lang.String nsUri)
public void setValue(java.lang.String name, GlobalDef def, org.dom4j.Namespace ns) throws java.lang.Exception
name
- The GlobalDef namedef
- The globalDef objectjava.lang.Exception
- if the GlobalDef is already in the mappublic static void setDebug(boolean d)