edu.cmu.sphinx.util.props
Class RawPropertyData

java.lang.Object
  extended by edu.cmu.sphinx.util.props.RawPropertyData

public class RawPropertyData
extends java.lang.Object

Holds the raw property data just as it has come in from the properties file.


Constructor Summary
RawPropertyData(java.lang.String name, java.lang.String className)
          Creates a raw property data item
RawPropertyData(java.lang.String name, java.lang.String className, java.util.Map<java.lang.String,java.lang.Object> properties)
           
 
Method Summary
 void add(java.lang.String propName, java.lang.String propValue)
          Adds a new property
 RawPropertyData flatten(ConfigurationManager cm)
          Returns a copy of this property data instance with all ${}-fields resolved.
 java.lang.String getClassName()
           
 java.lang.String getGlobalProperty(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> globalProperties)
          Lookup a global symbol with a given name (and resolves
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawPropertyData

public RawPropertyData(java.lang.String name,
                       java.lang.String className)
Creates a raw property data item

Parameters:
name - the name of the item
className - the class name of the item

RawPropertyData

public RawPropertyData(java.lang.String name,
                       java.lang.String className,
                       java.util.Map<java.lang.String,java.lang.Object> properties)
Method Detail

add

public void add(java.lang.String propName,
                java.lang.String propValue)
Adds a new property

Parameters:
propName - the name of the property
propValue - the value of the property

getClassName

public java.lang.String getClassName()
Returns:
Returns the className.

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Returns:
Returns the properties.

flatten

public RawPropertyData flatten(ConfigurationManager cm)
Returns a copy of this property data instance with all ${}-fields resolved.


getGlobalProperty

public java.lang.String getGlobalProperty(java.lang.String key,
                                          java.util.Map<java.lang.String,java.lang.String> globalProperties)
Lookup a global symbol with a given name (and resolves

Parameters:
key - the name of the property
globalProperties -
Returns:
the property value or null if it doesn't exist.