All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xm.xm_NodeTypeRegistry

java.lang.Object
   |
   +----xm.xm_NodeTypeRegistry

public class xm_NodeTypeRegistry
extends Object
A registry of all known node, parser, customizer and view classes. It can be consulted to find the classes suitable for a particular type of node. The main xg, xe and xc classes for the standard XML types are automatically registered by calling the initialise() method. Non-standard types can be registered by calling the register() method.

It is expected that this class will normally be used statically: that instances will typically not be created. (They are not much use if instantiated anyway: they have no data attributes.)


Variable Index

 o UNKNOWN
Unknown keyword type

Constructor Index

 o xm_NodeTypeRegistry()

Method Index

 o convertToType(String)
Convert to a type the node type whose name is InputKeywordValue.
 o ensureInitialised()
Ensure the hashtables of the keywords are initialised with their definitions (ie.
 o getDefaultCustomizerClassName()
Get the default name of the class used to customize nodes.
 o getDefaultParserClassName()
Get the default name of the class used to parse nodes.
 o getDefaultViewClassName()
Get the default name of the class used to display nodes.
 o getDefn(int)
Get the node type definition of the node whose type is InputNodeTypeName.
 o getDefn(String)
Get the node type definition of the node whose name is InputNodeTypeName.
 o getDefn(String, int)
Get the node type definition of the node whose name is InputNodeTypeName.
 o initialise()
Initialise the hashtables of the keywords with their definitions.
 o listHashtableToDebug(Hashtable)
Output a list of all the registered node types in the given hash table to debug.
 o listToDebug()
Output a list of all registered node types to debug.
 o register(int, String, String, String, String, String)
Register a node type - without a node name.
 o register(String, int, String, String, String, String, String)
Register a node type.
 o register(String, String)
Register a node name.
 o register(String, String, String)
Register a node name.
 o register(String, String, String, String, String)
Register a node name.
 o setDefaultCustomizerClassName(String)
Set the default name of the class used to customize nodes.
 o setDefaultParserClassName(String)
Set the default name of the class used to parse nodes.
 o setDefaultViewClassName(String)
Set the default name of the class used to display nodes.
 o toString(int)
Convert to a string the node type definition whose type is InputNodeType.

Variables

 o UNKNOWN
 public static final int UNKNOWN
Unknown keyword type

Constructors

 o xm_NodeTypeRegistry
 public xm_NodeTypeRegistry()

Methods

 o toString
 public static String toString(int InputNodeType)
Convert to a string the node type definition whose type is InputNodeType.

Parameters:
InputNodeType - The type of node for which we want a string representation
Returns:
String value or null
 o convertToType
 public static int convertToType(String InputNodeTypeName)
Convert to a type the node type whose name is InputKeywordValue.

Parameters:
InputNodeTypeName - Node type name
Returns:
Node type (or -1 if this is an unknown type)
 o setDefaultParserClassName
 public static void setDefaultParserClassName(String InputDefaultParserClassName)
Set the default name of the class used to parse nodes.

Parameters:
InputDefaultParserClassName - Default name of parser class
 o setDefaultCustomizerClassName
 public static void setDefaultCustomizerClassName(String InputDefaultCustomizerClassName)
Set the default name of the class used to customize nodes.

Parameters:
InputDefaultCustomizerClassName - Default name of customizer class
 o setDefaultViewClassName
 public static void setDefaultViewClassName(String InputDefaultViewClassName)
Set the default name of the class used to display nodes.

Parameters:
InputDefaultViewClassName - Default name of view class
 o getDefn
 public static xm_NodeTypeDefn getDefn(String InputNodeName,
                                       int InputNodeType)
Get the node type definition of the node whose name is InputNodeTypeName. If this does not exist, try finding a definition for the InputNodeType.

Parameters:
InputNodeName - Node type name
InputNodeType - Node type code
Returns:
Node type definition
 o getDefn
 public static xm_NodeTypeDefn getDefn(String InputNodeTypeName)
Get the node type definition of the node whose name is InputNodeTypeName.

Parameters:
InputNodeName - Node type name
Returns:
Node type definition
 o getDefn
 public static xm_NodeTypeDefn getDefn(int InputNodeType)
Get the node type definition of the node whose type is InputNodeTypeName.

Parameters:
InputNodeType - Node type code
Returns:
Node type definition
 o getDefaultParserClassName
 public static String getDefaultParserClassName()
Get the default name of the class used to parse nodes.

Returns:
Default name of parser class
 o getDefaultCustomizerClassName
 public static String getDefaultCustomizerClassName()
Get the default name of the class used to customize nodes.

Returns:
Default name of customizer class
 o getDefaultViewClassName
 public static String getDefaultViewClassName()
Get the default name of the class used to display nodes.

Returns:
Default name of view class
 o ensureInitialised
 public static void ensureInitialised()
Ensure the hashtables of the keywords are initialised with their definitions (ie. if they aren't, then initialise them).

 o initialise
 public static void initialise()
Initialise the hashtables of the keywords with their definitions.

 o register
 public static xm_NodeTypeDefn register(String InputNodeName,
                                        String InputEntityClassName)
Register a node name. This is a convenience function, intended to be used when registering special types of nodes, to save having to specify the values commonly used for such nodes.

Parameters:
InputNodeName - The string value of this keyword - also used for type of this keyword
InputNodeTypeString - String representation of keyword type
InputEntityClassName - Name of the class used to represent entities of this type
Returns:
The node type definition registered
 o register
 public static xm_NodeTypeDefn register(String InputNodeName,
                                        String InputEntityClassName,
                                        String InputNodeTypeString)
Register a node name. This is a convenience function, intended to be used when registering special types of nodes, to save having to specify the values commonly used for such nodes.

Parameters:
InputNodeName - The string value of this keyword - also used for type of this keyword
InputEntityClassName - Name of the class used to represent entities of this type
InputNodeTypeString - Description of node type
Returns:
The node type definition registered
 o register
 public static xm_NodeTypeDefn register(String InputNodeName,
                                        String InputEntityClassName,
                                        String InputParserClassName,
                                        String InputCustomizerClassName,
                                        String InputViewClassName)
Register a node name. This is a convenience function, intended to be used when registering special types of nodes, to save having to specify the values commonly used for such nodes.

Parameters:
InputNodeName - The string value of this keyword - also used for type of this keyword
InputNodeTypeString - String representation of keyword type
InputEntityClassName - Name of the class used to represent entities of this type
InputParserClassName - Name of the class used to parse entities of this type
InputCustomizerClassName - Name of the class used to customize entities of this type
InputViewClassName - Name of the class used to display entities of this type
Returns:
The node type definition registered
 o register
 protected static xm_NodeTypeDefn register(int InputNodeType,
                                           String InputNodeTypeString,
                                           String InputEntityClassName,
                                           String InputParserClassName,
                                           String InputCustomizerClassName,
                                           String InputViewClassName)
Register a node type - without a node name.

Parameters:
InputNodeType - Type of this node
InputNodeTypeString - String representation of node type
InputEntityClassName - Name of the class used to represent nodes of this type
InputParserClassName - Name of the class used to parse nodes of this type
InputCustomizerClassName - Name of the class used to customize nodes of this type
InputViewClassName - Name of the class used to display entities of this type
Returns:
The node type definition registered
 o register
 public static xm_NodeTypeDefn register(String InputNodeName,
                                        int InputNodeType,
                                        String InputNodeTypeString,
                                        String InputEntityClassName,
                                        String InputParserClassName,
                                        String InputCustomizerClassName,
                                        String InputViewClassName)
Register a node type.

Parameters:
InputNodeName - The name of this node type
InputNodeType - Type of this node
InputNodeTypeString - String representation of node type
InputEntityClassName - Name of the class used to represent nodes of this type
InputParserClassName - Name of the class used to parse nodes of this type
InputCustomizerClassName - Name of the class used to customize nodes of this type
InputViewClassName - Name of the class used to display entities of this type
Returns:
The node type definition registered
 o listToDebug
 public static void listToDebug()
Output a list of all registered node types to debug.

 o listHashtableToDebug
 protected static void listHashtableToDebug(Hashtable InputHashtable)
Output a list of all the registered node types in the given hash table to debug.

Parameters:
InputHashtable - The hash table whose entries are to be listed

All Packages  Class Hierarchy  This Package  Previous  Next  Index