Class JsmiMibParser
- java.lang.Object
 - 
- org.opennms.features.mibcompiler.services.JsmiMibParser
 
 
- 
- All Implemented Interfaces:
 Serializable,MibParser
public class JsmiMibParser extends Object implements MibParser, Serializable
JSMIParser implementation of the interface MibParser.- Author:
 - Alejandro Galue
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description JsmiMibParser()Instantiates a new JLIBSMI MIB parser. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EventsconvertMibToEvents(org.jsmiparser.smi.SmiModule module, String ueibase)Convert MIB to events.DatacollectionGroupgetDataCollection()Gets the data collection.EventsgetEvents(String ueibase)Gets the event list.StringgetFormattedErrors()Gets the formatted errors.protected GroupgetGroup(DatacollectionGroup data, String groupName, String resourceType)Gets the group.StringgetMibName()Gets the MIB name.List<String>getMissingDependencies()Gets the missing dependencies.List<PrefabGraph>getPrefabGraphs()Gets the prefab graph templates.protected EventgetTrapEvent(org.jsmiparser.smi.Notification trap, String ueibase)Gets the trap event.protected StringgetTrapEventDescr(org.jsmiparser.smi.Notification trap)Gets the trap event description.protected StringgetTrapEventLabel(org.jsmiparser.smi.Notification trap)Gets the trap event label.protected LogmsggetTrapEventLogmsg(org.jsmiparser.smi.Notification trap)Gets the trap event LogMsg.protected StringgetTrapEventUEI(org.jsmiparser.smi.Notification trap, String ueibase)Gets the trap event UEI.protected List<Varbindsdecode>getTrapVarbindsDecode(org.jsmiparser.smi.Notification trap)Gets the trap varbinds decode.booleanparseMib(File mibFile)Parses the MIB.voidsetMibDirectory(File mibDirectory)Sets the MIB directory. 
 - 
 
- 
- 
Method Detail
- 
setMibDirectory
public void setMibDirectory(File mibDirectory)
Description copied from interface:MibParserSets the MIB directory.- Specified by:
 setMibDirectoryin interfaceMibParser- Parameters:
 mibDirectory- the MIB directory
 
- 
parseMib
public boolean parseMib(File mibFile)
Description copied from interface:MibParserParses the MIB. 
- 
getFormattedErrors
public String getFormattedErrors()
Description copied from interface:MibParserGets the formatted errors.- Specified by:
 getFormattedErrorsin interfaceMibParser- Returns:
 - the formatted errors
 
 
- 
getMissingDependencies
public List<String> getMissingDependencies()
Description copied from interface:MibParserGets the missing dependencies.- Specified by:
 getMissingDependenciesin interfaceMibParser- Returns:
 - the missing dependencies
 
 
- 
getMibName
public String getMibName()
Description copied from interface:MibParserGets the MIB name.- Specified by:
 getMibNamein interfaceMibParser- Returns:
 - the MIB name.
 
 
- 
getEvents
public Events getEvents(String ueibase)
Description copied from interface:MibParserGets the event list. 
- 
getDataCollection
public DatacollectionGroup getDataCollection()
Description copied from interface:MibParserGets the data collection.- Specified by:
 getDataCollectionin interfaceMibParser- Returns:
 - the data collection group
 
 
- 
getPrefabGraphs
public List<PrefabGraph> getPrefabGraphs()
Description copied from interface:MibParserGets the prefab graph templates.- Specified by:
 getPrefabGraphsin interfaceMibParser- Returns:
 - the prefab graph templates.
 
 
- 
getGroup
protected Group getGroup(DatacollectionGroup data, String groupName, String resourceType)
Gets the group.- Parameters:
 data- the data collection group objectgroupName- the group nameresourceType- the resource type- Returns:
 - the group
 
 
- 
convertMibToEvents
protected Events convertMibToEvents(org.jsmiparser.smi.SmiModule module, String ueibase)
Convert MIB to events.- Parameters:
 module- the module objectueibase- the UEI base- Returns:
 - the events
 
 
- 
getTrapEvent
protected Event getTrapEvent(org.jsmiparser.smi.Notification trap, String ueibase)
Gets the trap event.- Parameters:
 trap- the trap objectueibase- the UEI base- Returns:
 - the trap event
 
 
- 
getTrapEventUEI
protected String getTrapEventUEI(org.jsmiparser.smi.Notification trap, String ueibase)
Gets the trap event UEI.- Parameters:
 trap- the trap objectueibase- the UEI base- Returns:
 - the trap event UEI
 
 
- 
getTrapEventLabel
protected String getTrapEventLabel(org.jsmiparser.smi.Notification trap)
Gets the trap event label.- Parameters:
 trap- the trap object- Returns:
 - the trap event label
 
 
- 
getTrapEventLogmsg
protected Logmsg getTrapEventLogmsg(org.jsmiparser.smi.Notification trap)
Gets the trap event LogMsg.- Parameters:
 trap- the trap object- Returns:
 - the trap event LogMsg
 
 
- 
getTrapEventDescr
protected String getTrapEventDescr(org.jsmiparser.smi.Notification trap)
Gets the trap event description.- Parameters:
 trap- the trap object- Returns:
 - the trap event description
 
 
- 
getTrapVarbindsDecode
protected List<Varbindsdecode> getTrapVarbindsDecode(org.jsmiparser.smi.Notification trap)
Gets the trap varbinds decode.- Parameters:
 trap- the trap object- Returns:
 - the trap varbinds decode
 
 
 - 
 
 -