com.adventnet.snmp.mibs
Class ModuleIdentity

java.lang.Object
  |
  +--com.adventnet.snmp.mibs.ModuleIdentity
All Implemented Interfaces:
java.io.Serializable

public class ModuleIdentity
extends java.lang.Object
implements java.io.Serializable

This class contains the details about the MODULE-IDENTITY macro in a MIB module.

The MODULE-IDENTITY construct will look as follows,

 <lowerCaseName>     MODULE-IDENTITY
	LAST-UPDATED    <UTCTime>
	ORGANIZATION    <Text> 
	CONTACT-INFO    <Text> 
	DESCRIPTION     <Text>
	[Revisions]*   -- There can be zero or more occurrences  
 
 Revisions ::= 
	REVISION       <UTCTime>
	DESCRIPTION    <Text>
 
where
<Text> is quoted string
<UTCTime> is the updated UTC time value
<lowerCaseName> is the name starting with lowercase
 The UTC Time Format is 

 YYMMDDHHMMZ or YYYYMMDDHHMMZ

 If the year value is between 1900 and 1999, the first format can be used.
 If the year is other than the above value, the second format is used.

 where: 
	YY - last two digits of year
	MM - month (01 through 12) 
	DD - day of month (01 through 31) 
	HH - hours (00 through 23) 
	MM - minutes (00 through 59) 
	Z - the character "Z" denotes Greenwich Mean Time (GMT).

 

The ModuleIdentity instance can be obtained as follows,

 MibOperations mibOps = new MibOperations();
 mibOps.loadMibModules("mibFile");
 MibModule module = mibOps.getMibModule("moduleName");
 ModuleIdentity modIden = module.getMibModuleIdentity();
 

Since:
AdventNet SNMP API 4
See Also:
Serialized Form

Method Summary
 java.lang.String getContactInfo()
          Gets the value of CONTACT-INFO clause in this MODULE-IDENTITY macro
 java.lang.String getDescription()
          Gets the description for this MODULE-IDENTITY macro.
 java.lang.String getLastUpdated()
          Gets the value of the LAST-UPDATED clause in this MODULE-IDENTITY macro.
 java.lang.String getName()
          Gets the name of this ModuleIdentity object.
 java.lang.String getNumberedOIDString()
          Gets the numbered oid String of this ModuleIdentity.
 java.lang.String getOIDString()
          Gets the named oid String of this ModuleIdentity.
 java.lang.String getOrganization()
          Gets the value of the ORGANIZATION clause in this MODULE-IDENTITY macro.
 java.lang.String getRevisionDescription(java.lang.String revision)
          Gives the description for the given revision.
 java.util.Vector getRevisions()
          Gets the value of REVISION clause in this MODULE-IDENTITY macro.
 java.lang.String toString()
          Gives the name of this ModuleIdentity object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Gets the name of this ModuleIdentity object. Same as the method toString()

Returns:
the name of this MODULE-IDENTITY macro.

getRevisions

public java.util.Vector getRevisions()
Gets the value of REVISION clause in this MODULE-IDENTITY macro.

The REVISIONS clause appear along with the DESCRIPTION clause. They are used to specify the date and time of the creation and each revision of the MIB module.

These clauses are optional and if present, should be defined in the reverse chronological order. i.e. the latest revision should appear first.

NOTE : The elements will be null, if setReadDesc(boolean) is set to false.

Returns:
Vector of the revisions, if present
else return empty Vector.

getRevisionDescription

public java.lang.String getRevisionDescription(java.lang.String revision)
Gives the description for the given revision.

The DESCRIPTION clause which occur along with the REVISION clause is used to describe the creation and revision of the MIB.

NOTE : The elements will be null, if setReadDesc(boolean) is set to false.

Returns:
the revision description string for the given revision. null if an invalid revision is given.

getLastUpdated

public java.lang.String getLastUpdated()
Gets the value of the LAST-UPDATED clause in this MODULE-IDENTITY macro.

The LAST-UPDATED clause specifies the date and time at which the MIB was created or modified last. If the REVISIONS/DESCRIPTION clause is present then the value of the LAST-UPDATED clause must be same as the value of the first REVISIONS clause.

Returns:
the value of the LAST-UPDATED clause as a String.

getOrganization

public java.lang.String getOrganization()
Gets the value of the ORGANIZATION clause in this MODULE-IDENTITY macro.

The ORGANIZATION clause is used to specify the organization which has the command over the MIB module definitions.

Returns:
the value of the ORGANIZATION clause as a String.

getContactInfo

public java.lang.String getContactInfo()
Gets the value of CONTACT-INFO clause in this MODULE-IDENTITY macro

The CONTACT-INFO clause is used to specify the contact points for the technical information regarding this MIB module definitions.

Returns:
the value of the CONTACT-INFO clause as a String.

getDescription

public java.lang.String getDescription()
Gets the description for this MODULE-IDENTITY macro.

The DESCRIPTION clause is used to describe this MIB module. The abbrevations, defined terms used throughout the MIB can be explained in detail in the DESCRIPTION clause.

Returns:
the value of the DESCRIPTION clause as a String.

toString

public java.lang.String toString()
Gives the name of this ModuleIdentity object. Same as getName() method.

Overrides:
toString in class java.lang.Object
See Also:
getName()

getOIDString

public java.lang.String getOIDString()
Gets the named oid String of this ModuleIdentity.

Returns:
the named oid String

getNumberedOIDString

public java.lang.String getNumberedOIDString()
Gets the numbered oid String of this ModuleIdentity.

Returns:
the numbered oid String


Copyright (c)AdventNet Inc., 1996-2006