XCMS Toolkit

schemajic.schema
Class Module

java.lang.Object
  extended by schemajic.schema.Module
Direct Known Subclasses:
RootModule

public class Module
extends java.lang.Object

Processes the ASN.1 modules that constitute an ASN.1 schema.

Version:
1.00 - 2006/01/22
Author:
support@phillipgriffin.com

Field Summary
protected  java.util.List _importList
           
protected  ModuleName _name
           
protected  Schema _schema
           
protected  java.util.List _typeList
           
protected  java.util.Map _typeMap
           
protected  java.util.List _values
           
static Module ROOT
           
 
Constructor Summary
Module(Schema schema, java.lang.String name)
          Constructor for Module with schema and module name parameters.
 
Method Summary
 void addImport(Import i)
          Adds an import statement item to an import item list.
 void addType(Type t)
          Adds an ASN.1 type to a type list.
 void addValue(NamedValue v)
          Adds a value to a set of values.
 java.util.Iterator getImports()
          Returns a list of ASN.1 module IMPORTS.
 ModuleName getName()
          Returns the current ASN.1 module name.
 java.lang.String getObjectIdentifierName(ASN1ObjectIdentifier oid)
          Look up the ASN.1 identifier for a particular OBJECT IDENTIFIER in this module.
 java.lang.String getPackageName()
          Returns the Java package named for the current schema.
 Schema getSchema()
          Returns the current schema.
 TypeLookup getTypeLookup()
          Returns the current schema.
 java.util.Iterator getTypes()
          Returns a list of types.
 java.util.Iterator getValues()
          Returns one or more values.
 java.lang.String makeAbsoluteName(java.lang.String type)
          Cteates a complete file name given the file name extension.
 java.lang.String makeAbsoluteName(Type type)
          Cteates a complete file name given only the file name.
 void registerObjectIdentifier(java.lang.String name, ASN1ObjectIdentifier oid)
          Puts the named OID in a map.
 java.lang.String toString()
          Returns a formatted string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ROOT

public static final Module ROOT

_schema

protected Schema _schema

_name

protected ModuleName _name

_importList

protected java.util.List _importList

_typeMap

protected java.util.Map _typeMap

_typeList

protected java.util.List _typeList

_values

protected java.util.List _values
Constructor Detail

Module

public Module(Schema schema,
              java.lang.String name)
Constructor for Module with schema and module name parameters.

Parameters:
schema - an ASN.1 schema (one or more ASN.1 modules)
name - an ASN.1 module name
Method Detail

getName

public ModuleName getName()
Returns the current ASN.1 module name.


addImport

public void addImport(Import i)
Adds an import statement item to an import item list.

Parameters:
i - item to import into an ASN.1 module

addType

public void addType(Type t)
Adds an ASN.1 type to a type list.

Parameters:
t - an ASN.1 type

getImports

public java.util.Iterator getImports()
Returns a list of ASN.1 module IMPORTS.


getTypes

public java.util.Iterator getTypes()
Returns a list of types.


addValue

public void addValue(NamedValue v)
Adds a value to a set of values.

Parameters:
v - a value to be added to a set of values

getValues

public java.util.Iterator getValues()
Returns one or more values.


getTypeLookup

public TypeLookup getTypeLookup()
Returns the current schema.


makeAbsoluteName

public java.lang.String makeAbsoluteName(Type type)
Cteates a complete file name given only the file name.

Parameters:
type - file type (extension)
Returns:
complete file name including the file name extension

makeAbsoluteName

public java.lang.String makeAbsoluteName(java.lang.String type)
Cteates a complete file name given the file name extension.

Parameters:
type - file type (extension)
Returns:
complete file name including the file name extension

getPackageName

public java.lang.String getPackageName()
Returns the Java package named for the current schema.


registerObjectIdentifier

public void registerObjectIdentifier(java.lang.String name,
                                     ASN1ObjectIdentifier oid)
Puts the named OID in a map.

Parameters:
name - the name of an ASN.1 information object identifier (OID)
oid - an ASN.1 OID

getObjectIdentifierName

public java.lang.String getObjectIdentifierName(ASN1ObjectIdentifier oid)
Look up the ASN.1 identifier for a particular OBJECT IDENTIFIER in this module.

Parameters:
oid - an ASN.1 information object identifier
Returns:
the name of an OID

toString

public java.lang.String toString()
Returns a formatted string.

Overrides:
toString in class java.lang.Object

getSchema

public Schema getSchema()
Returns the current schema.


XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.