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)
          Creates a raw property data item, using a given property map.
 
Method Summary
 void add(java.lang.String propName, java.util.List<java.lang.String> propValue)
          Adds a new property with a List<String> value.
 void add(java.lang.String propName, java.lang.String propValue)
          Adds a new property with a String value.
 boolean contains(java.lang.String propName)
          Determines if the map already contains an entry for a property.
 RawPropertyData flatten(ConfigurationManager cm)
          Returns a copy of this property data instance with all ${}-fields resolved.
 java.lang.String getClassName()
          Returns the className.
 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.lang.String getName()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 void remove(java.lang.String propName)
          Removes an existing property.
 java.lang.String toString()
          Provide information stored inside this Object, used mainly for debugging/testing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, 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)
Creates a raw property data item, using a given property map.

Parameters:
name - the name of the item
className - the class name of the item
properties - existing property map to use
Method Detail

add

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

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

add

public void add(java.lang.String propName,
                java.util.List<java.lang.String> propValue)
Adds a new property with a List<String> value.

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

remove

public void remove(java.lang.String propName)
Removes an existing property.

Parameters:
propName - the name of the property

getClassName

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


getName

public java.lang.String getName()
Returns:
Returns the name.

getProperties

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

contains

public boolean contains(java.lang.String propName)
Determines if the map already contains an entry for a property.

Parameters:
propName - the property of interest
Returns:
true if the map already contains this property

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.

toString

public java.lang.String toString()
Provide information stored inside this Object, used mainly for debugging/testing.

Overrides:
toString in class java.lang.Object
Returns:
Description of object