org.dxc.api.datatypes
Class SystemCatalogXML

Object
  extended by org.dxc.api.datatypes.SystemCatalogXML
All Implemented Interfaces:
SystemCatalog

public class SystemCatalogXML
extends Object
implements SystemCatalog

System catalog parser. Provides a data structure for accessing information contained in a system's XML catalog.


Method Summary
 Set<String> getComponentIDs()
          The set of component IDs the system contains.
 Set<String> getFaultModes(String componentID)
          The set of mode IDs of a given component
static SystemCatalog getInstance(String system)
          Get a system's catalog.
 Set<String> getModes(String componentID)
          The set of mode IDs of a given component
 int getNumFaultModes()
          Returns the number of total component fault modes
 int getNumModes()
          Returns the number of total component modes
 int getNumNoFaultComponents()
          Returns the number of components with no fault modes
 Map<String,Double> getSensorsAndCosts()
          A map of the system's sensors and their probing cost, if any
 String getSystemName()
          The name of the system.
 boolean isComponentValid(String componentID)
          Test the validity of a componentID.
 boolean isFaultModeValid(Fault f)
          Test the validity of a Fault.
 boolean isFaultModeValid(String componentID, String modeID)
          Given a valid component, test the validity of a mode ID.
 boolean isModeValid(String componentID, String modeID)
          Given a valid component, test the validity of a mode ID.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SystemCatalog getInstance(String system)
                                 throws Exception
Get a system's catalog.

Parameters:
system - the system's name System catalogs are searched for in $DXC_HOME/[SYSTEMCAT_DIR] (see DXC.cfg for SYSTEMCAT_DIR).
Throws:
Exception

getSystemName

public String getSystemName()
The name of the system.

Specified by:
getSystemName in interface SystemCatalog

getComponentIDs

public Set<String> getComponentIDs()
The set of component IDs the system contains.

Specified by:
getComponentIDs in interface SystemCatalog

getModes

public Set<String> getModes(String componentID)
Description copied from interface: SystemCatalog
The set of mode IDs of a given component

Specified by:
getModes in interface SystemCatalog
Parameters:
componentID - component's ID

getFaultModes

public Set<String> getFaultModes(String componentID)
The set of mode IDs of a given component

Specified by:
getFaultModes in interface SystemCatalog
Parameters:
componentID - component's ID

isComponentValid

public boolean isComponentValid(String componentID)
Test the validity of a componentID.

Specified by:
isComponentValid in interface SystemCatalog
Parameters:
componentID - component's ID

isModeValid

public boolean isModeValid(String componentID,
                           String modeID)
Description copied from interface: SystemCatalog
Given a valid component, test the validity of a mode ID.

Specified by:
isModeValid in interface SystemCatalog
Parameters:
componentID - component ID
modeID - mode ID

isFaultModeValid

public boolean isFaultModeValid(String componentID,
                                String modeID)
Given a valid component, test the validity of a mode ID.

Specified by:
isFaultModeValid in interface SystemCatalog
Parameters:
componentID - component ID
modeID - mode ID

isFaultModeValid

public boolean isFaultModeValid(Fault f)
Test the validity of a Fault.

Specified by:
isFaultModeValid in interface SystemCatalog

getNumModes

public int getNumModes()
Description copied from interface: SystemCatalog
Returns the number of total component modes

Specified by:
getNumModes in interface SystemCatalog

getNumFaultModes

public int getNumFaultModes()
Description copied from interface: SystemCatalog
Returns the number of total component fault modes

Specified by:
getNumFaultModes in interface SystemCatalog

getNumNoFaultComponents

public int getNumNoFaultComponents()
Description copied from interface: SystemCatalog
Returns the number of components with no fault modes

Specified by:
getNumNoFaultComponents in interface SystemCatalog

getSensorsAndCosts

public Map<String,Double> getSensorsAndCosts()
Description copied from interface: SystemCatalog
A map of the system's sensors and their probing cost, if any

Specified by:
getSensorsAndCosts in interface SystemCatalog