gov.llnl.babel.config
Class Metadata

java.lang.Object
  extended by gov.llnl.babel.config.Metadata

public class Metadata
extends java.lang.Object

The Metadata class contains information from the machine configuration database XML metadata file. It defines the languages supported by the Babel compiler, the configuration options allowed for each language, and the valid parameters for each option. A Metadata object is required to confirm the validity of the configurations read from the machine configuration XML files.


Constructor Summary
Metadata(java.lang.String uri)
          The constructor for the Metadata class initializes the internal data structures and parses the specified XML document.
 
Method Summary
 java.lang.String getOptionDescription(java.lang.String language, java.lang.String option)
          Return a long description of the option for the specified language.
 java.lang.String getOptionSummary(java.lang.String language, java.lang.String option)
          Return a short summary of the option for the specified language.
 java.util.Set getValidLanguages()
          Return the valid language names supported by the Babel compiler as a set of strings.
 java.util.Set getValidOptionParameters(java.lang.String language, java.lang.String option)
          Return the set of valid option parameter string associated with a language and option.
 java.util.Set getValidOptions(java.lang.String language)
          Given a particular language, return the valid configuration option strings supported by that language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Metadata

public Metadata(java.lang.String uri)
         throws java.io.IOException,
                org.xml.sax.SAXException
The constructor for the Metadata class initializes the internal data structures and parses the specified XML document.

Throws:
java.io.IOException
org.xml.sax.SAXException
Method Detail

getValidLanguages

public java.util.Set getValidLanguages()
Return the valid language names supported by the Babel compiler as a set of strings.


getValidOptions

public java.util.Set getValidOptions(java.lang.String language)
Given a particular language, return the valid configuration option strings supported by that language. This routine will return null if the language is not supported or if there are no options associated with the language.


getValidOptionParameters

public java.util.Set getValidOptionParameters(java.lang.String language,
                                              java.lang.String option)
Return the set of valid option parameter string associated with a language and option. This routine will return null if the language or option are invalid.


getOptionSummary

public java.lang.String getOptionSummary(java.lang.String language,
                                         java.lang.String option)
Return a short summary of the option for the specified language. A null will be returned if the language or option are invalid.


getOptionDescription

public java.lang.String getOptionDescription(java.lang.String language,
                                             java.lang.String option)
Return a long description of the option for the specified language. A null will be returned if the language or option are invalid or if a description was not provided.