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.)
-
UNKNOWN
- Unknown keyword type
-
xm_NodeTypeRegistry()
-
-
convertToType(String)
- Convert to a type the node type whose name is InputKeywordValue.
-
ensureInitialised()
- Ensure the hashtables of the keywords are initialised with their definitions
(ie.
-
getDefaultCustomizerClassName()
- Get the default name of the class used to customize nodes.
-
getDefaultParserClassName()
- Get the default name of the class used to parse nodes.
-
getDefaultViewClassName()
- Get the default name of the class used to display nodes.
-
getDefn(int)
- Get the node type definition of the node whose type is InputNodeTypeName.
-
getDefn(String)
- Get the node type definition of the node whose name is InputNodeTypeName.
-
getDefn(String, int)
- Get the node type definition of the node whose name is InputNodeTypeName.
-
initialise()
- Initialise the hashtables of the keywords with their definitions.
-
listHashtableToDebug(Hashtable)
- Output a list of all the registered node types in the given hash table to
debug.
-
listToDebug()
- Output a list of all registered node types to debug.
-
register(int, String, String, String, String, String)
- Register a node type - without a node name.
-
register(String, int, String, String, String, String, String)
- Register a node type.
-
register(String, String)
- Register a node name.
-
register(String, String, String)
- Register a node name.
-
register(String, String, String, String, String)
- Register a node name.
-
setDefaultCustomizerClassName(String)
- Set the default name of the class used to customize nodes.
-
setDefaultParserClassName(String)
- Set the default name of the class used to parse nodes.
-
setDefaultViewClassName(String)
- Set the default name of the class used to display nodes.
-
toString(int)
- Convert to a string the node type definition whose type is InputNodeType.
UNKNOWN
public static final int UNKNOWN
- Unknown keyword type
xm_NodeTypeRegistry
public xm_NodeTypeRegistry()
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
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)
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
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
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
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
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
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
getDefaultParserClassName
public static String getDefaultParserClassName()
- Get the default name of the class used to parse nodes.
- Returns:
- Default name of parser class
getDefaultCustomizerClassName
public static String getDefaultCustomizerClassName()
- Get the default name of the class used to customize nodes.
- Returns:
- Default name of customizer class
getDefaultViewClassName
public static String getDefaultViewClassName()
- Get the default name of the class used to display nodes.
- Returns:
- Default name of view class
ensureInitialised
public static void ensureInitialised()
- Ensure the hashtables of the keywords are initialised with their definitions
(ie. if they aren't, then initialise them).
initialise
public static void initialise()
- Initialise the hashtables of the keywords with their definitions.
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
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
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
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
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
listToDebug
public static void listToDebug()
- Output a list of all registered node types to debug.
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