Class GlobalDefMap
- Simple and ComplexType definitions,
- Goup definitions, and
- Global Element and Global Attribute declarations
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.
- Author:
- ostwald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Description of the Methodvoiddestroy()Should release resources and call the finalize method.getDefsOfType(int type) Method to retrieve the list of names used to identify desired values.getNsValues(String nsUri) Retrieves GlobalDefs associated with specified Namespace.Accessor method for retrieving a specific named GlobalDef.booleaninit()Should initialize members as required.static voidsetDebug(boolean d) voidInserts a GlobalDef instance in the GlobalDefMap.
-
Constructor Details
-
GlobalDefMap
public GlobalDefMap()
-
-
Method Details
-
init
public boolean init()Should initialize members as required.- Returns:
- true if intialization successful, false otherwise
-
getNamespaces
-
destroy
public void destroy()Should release resources and call the finalize method. -
containsKey
Description of the Method- Parameters:
key- Description of the Parameter- Returns:
- Description of the Return Value
-
getNsKeys
Method to retrieve the list of names used to identify desired values.- Returns:
- The keys value
-
getValues
-
getNsMap
-
getSimpleTypes
-
getComplexTypes
-
getDefsOfType
-
getNsValues
Retrieves GlobalDefs associated with specified Namespace.- Returns:
- The values value
-
getValue
Accessor method for retrieving a specific named GlobalDef. Namespace prefixes for the default name space (or the targetNameSpace if there is no defaultNamespace defined), are stripped.- Parameters:
name- Description of the Parameter- Returns:
- The value value
-
getValue
-
getValue
-
setValue
Inserts a GlobalDef instance in the GlobalDefMap.- Parameters:
name- The GlobalDef namedef- The globalDef object- Throws:
Exception- if the GlobalDef is already in the map
-
setDebug
public static void setDebug(boolean d)
-