All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mathbus.Registry

java.lang.Object
   |
   +----mathbus.Registry

public class Registry
extends Object
The registry object is named mathbus.Registry. All member variables are static, so it is effectively a single global data structure.


Variable Index

 o StringIDFlag
The numerical value used in RegistryStoreLocal terms to identify StringID declarations
 o SubtypesFlag
The numerical value used in RegistryStoreLocal terms to identify Subtypes declarations.

Constructor Index

 o Registry()

Method Index

 o HasLocalStringID(int)
Is there a local StringID corresponding to this numeric label?
 o HasLocalStringID(Integer)
Is there a local StringID corresponding to this numeric label?
 o HasNumericLabel(String)
Is there a numeric label corresponding to this StringID?
 o HasStringID(int)
Is there a StringID corresponding to this numeric label?
 o InitializeRegistry()
Initialize the registry from the declarations that are contained in the Java sources.
 o LoadRegistryFile(String)
Initializes the registry with the contents of the specified registry file specified.
 o NewLocalLabel(String)
Allocates a new local label for the string ident.
 o numericLabel(String)
Returns the int corresponding to the symbolic node label ident.
 o numericLabelInteger(String)
Returns the Integer corresponding to the symbolic node label ident.
 o SetLocalSubtypes(String, int)
Set the Subtype field of the previously allocated local StringID to subtypes.
 o SetLocalSubtypes(String, Integer)
Set the Subtype field of the previously allocated local StringID to subtypes.
 o stringID(int)
May return null if there isn't a string ID.
 o stringID(Integer)
Returns the Java string (symbolic label) corresponding to the numeric node label ident.
 o subtermTypes(int)
Returns the subtermTypes of the numeric node label ident.
 o subtermTypes(Integer)
Returns the subtermTypes of the numeric node label ident.
 o subtermTypes(String)
Returns the subtermTypes of the symbolic node label ident.
 o WriteRegistryInitializers(String)
Write Java source files for initializing the registry into the directory directory.

Variables

 o StringIDFlag
 public static final Integer StringIDFlag
The numerical value used in RegistryStoreLocal terms to identify StringID declarations

 o SubtypesFlag
 public static final Integer SubtypesFlag
The numerical value used in RegistryStoreLocal terms to identify Subtypes declarations.

Constructors

 o Registry
 public Registry()

Methods

 o InitializeRegistry
 public static void InitializeRegistry()
Initialize the registry from the declarations that are contained in the Java sources. This should be relatively fast and is the usual way the registry is initialized.

When a new registry distribuation file is received, or when the Java implementation is being bootstrapped, the registry in the Java implementation is initialized using the LoadRegsitryFile method. The source code files that are used by the Java implementation can be generated by the WriteJavaRegistry method.

See Also:
LoadRegistryFile, WriteJavaRegistry
 o LoadRegistryFile
 public static void LoadRegistryFile(String file) throws IOException
Initializes the registry with the contents of the specified registry file specified. This member function is usually only used to bootstrap the Java implementation, but it may be used to load a new registry file for test purposes. The InitializeRegistry member function is generally much prefered.

Throws: IOException
Thrown if the registry file is malformed.
See Also:
RegInitializer, InitializeRegistry
 o WriteRegistryInitializers
 public static void WriteRegistryInitializers(String directory) throws IOException
Write Java source files for initializing the registry into the directory directory. The files written are MBS.java, which contatains symbolic names for each of the entries in the global registry, and RegInitializer which initializes the hash tables of the global regsitry. The current contents of the global registry are used to generate these files.

See Also:
MBS, RegInitializer
 o SetLocalSubtypes
 public static void SetLocalSubtypes(String ident,
                                     int subtypes)
Set the Subtype field of the previously allocated local StringID to subtypes.

Throws: Error
Thrown if the a local StringID has not yet been allocated for this label.
 o SetLocalSubtypes
 public static void SetLocalSubtypes(String ident,
                                     Integer subtypes)
Set the Subtype field of the previously allocated local StringID to subtypes.

Throws: Error
Thrown if the a local StringID has not yet been allocated for this label.
 o HasNumericLabel
 public static boolean HasNumericLabel(String ident)
Is there a numeric label corresponding to this StringID?

 o HasStringID
 public static boolean HasStringID(int ident)
Is there a StringID corresponding to this numeric label?

 o HasLocalStringID
 public static boolean HasLocalStringID(int ident)
Is there a local StringID corresponding to this numeric label?

 o HasLocalStringID
 public static boolean HasLocalStringID(Integer ID)
Is there a local StringID corresponding to this numeric label?

 o stringID
 public static final String stringID(int ident)
May return null if there isn't a string ID.

 o stringID
 public static String stringID(Integer ident)
Returns the Java string (symbolic label) corresponding to the numeric node label ident. Both the local and global registries are searched. If the numeric label has not yet been allocated then null is returned instead.

 o numericLabelInteger
 public static Integer numericLabelInteger(String ident)
Returns the Integer corresponding to the symbolic node label ident. Both the local and global registries are searched. A null is returned if the symbolic node label has not be previously allocated.

 o numericLabel
 public static final int numericLabel(String ident)
Returns the int corresponding to the symbolic node label ident. Both the local and global registries are searched. A null is returned if the symbolic node label has not be previously allocated.

 o subtermTypes
 public static int subtermTypes(Integer ID)
Returns the subtermTypes of the numeric node label ident. Both the local and global registries are searched. -255 is returned if the subtermTypes of the node label has not been defined.

 o subtermTypes
 public static int subtermTypes(int ident)
Returns the subtermTypes of the numeric node label ident. Both the local and global registries are searched. -255 is returned if the subtermTypes of the node label has not been defined.

 o subtermTypes
 public static int subtermTypes(String ident)
Returns the subtermTypes of the symbolic node label ident. Both the local and global registries are searched. -255 is returned if the subtermTypes of the node label has not been defined.

 o NewLocalLabel
 public static int NewLocalLabel(String ident)
Allocates a new local label for the string ident. If a numeric label has already been allocated for this string, then that value is returned. Otherwise a new local label is allocated and returned.


All Packages  Class Hierarchy  This Package  Previous  Next  Index