|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.tools.gui.util.ConfigurableComponent
public class ConfigurableComponent
This class holds information about one configurable class in the Sphinx model Which includes the classname, property list, class description,group name, and the configuration sets that are defined for this class
This class, combined with ConfigurableProperty
construct
the Sphinx model.
RawPropertyData is used to hold the configuration values set for this component
ConfigurableProperty
,
RawPropertyData
Constructor Summary | |
---|---|
ConfigurableComponent(java.lang.String section,
java.lang.Class component,
java.lang.String name,
java.lang.String desc)
Creates a new instance of ConfigurableComponent |
Method Summary | |
---|---|
void |
addConfigurationProp(RawPropertyData rpd)
This function is used to attach a configuration set for this component |
void |
addProperty(ConfigurableProperty cp)
Add a new property for this component |
void |
changeConfigurationPropValue(java.lang.String rpdname,
java.lang.String propname,
java.util.List newvalue)
Change the value of a specific property inside one of the configuration sets |
void |
changeConfigurationPropValue(java.lang.String rpdname,
java.lang.String propname,
java.lang.String newvalue)
Change the value of a specific property inside one of the configuration sets |
boolean |
containsConfigurationSet(java.lang.String name)
check if this component has a RawPropertyData
configuration set with specified name |
boolean |
containsProperty(java.lang.String name)
Check if component has the property |
void |
createNewSet(java.lang.String setname)
This function is used to create a new configuration set for this type of class The property values are set as their default values |
void |
deleteAllConfigurationProp()
Delete all configuration sets from this component |
void |
deleteConfigurationProp(java.lang.String rpdname)
Delete the configuration set with specified name |
void |
deleteOneConfigurationPropFromSet(java.lang.String rpdname,
java.lang.String propname)
Remove a specific property from one of the configuration sets |
java.lang.Class |
getComponentClass()
|
java.util.Map |
getConfigurationPropMap()
|
java.lang.Object |
getConfigurationPropValue(java.lang.String rpdName,
java.lang.String propname)
Get current value of the configuration |
java.lang.String |
getDesc()
|
java.lang.String |
getName()
|
ConfigurableProperty |
getProperty(java.lang.String name)
get the property with specified name |
java.util.Map |
getPropertyMap()
|
java.lang.String |
getSectionName()
|
java.lang.String |
toString()
used to list the information contained in this component mainly for debugging and testing |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfigurableComponent(java.lang.String section, java.lang.Class component, java.lang.String name, java.lang.String desc)
ConfigurableComponent
section
- the group that this class belongs tocomponent
- reference to the class that this object representsname
- class namedesc
- brief description of this configurable componentMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSectionName()
public java.util.Map getPropertyMap()
String, ConfigurableProperty
)public void addProperty(ConfigurableProperty cp)
cp
- ConfigurableProperty
public boolean containsProperty(java.lang.String name)
name
- Name of property
true
if property existspublic ConfigurableProperty getProperty(java.lang.String name)
name
- Name of property
ConfigurableProperty
with the specified name;
returns null if the property does not existpublic java.lang.Class getComponentClass()
Class
that this component refers topublic java.lang.String getName()
public java.lang.String getDesc()
public void addConfigurationProp(RawPropertyData rpd)
rpd
- RawPropertyData
that holds the property valuespublic void deleteAllConfigurationProp()
public void deleteConfigurationProp(java.lang.String rpdname)
rpdname
- name of RawPropertyData
to be deletedpublic void deleteOneConfigurationPropFromSet(java.lang.String rpdname, java.lang.String propname)
rpdname
- Name of RawPropertyData
that stores the
property valuespropname
- Property name to be modifiedpublic void changeConfigurationPropValue(java.lang.String rpdname, java.lang.String propname, java.lang.String newvalue)
rpdname
- Name of RawPropertyData
that stores the
property valuespropname
- Property name to be modifiednewvalue
- New value of the propertypublic void changeConfigurationPropValue(java.lang.String rpdname, java.lang.String propname, java.util.List newvalue)
rpdname
- Name of RawPropertyData
that stores the
property valuespropname
- Property name to be modifiednewvalue
- List of new values of the propertypublic java.lang.Object getConfigurationPropValue(java.lang.String rpdName, java.lang.String propname)
rpdName
- Name of RawPropertyData
that holds the
configuration valuespropname
- Property name
String
or List
that
contains value of the propertypublic java.util.Map getConfigurationPropMap()
Map
of RawPropertyData
that has all the
configuration sets of this component. Each entry consists of
String setname, RawPropertyData setpropertiespublic boolean containsConfigurationSet(java.lang.String name)
RawPropertyData
configuration set with specified name
true
if the configuration with specified name existspublic void createNewSet(java.lang.String setname)
setname
- Name of new configuration set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |