|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.usc.cse.desi.properties.PropertyInitializer
| Field Summary | |
private java.lang.String |
myFileName
|
private java.util.List |
myObjectTypes
|
private java.util.HashMap |
myPropertiesHashMaps
|
| Constructor Summary | |
PropertyInitializer(java.lang.String file_name)
|
|
| Method Summary | |
private void |
addObjectType(java.lang.String obj_type)
This method adds a object type to the myObjectTypes list signifying that the given object type can have properties. |
private void |
addProperty(java.lang.String type_name,
Property prop)
Adds a new property to the given type. |
private java.util.HashMap |
finalizePropertyMappings(java.util.HashMap htable_of_htables)
This method examines the given HashMap, which should be a HashMap of HashMaps, and combines any tables of subclasses for which there are superclasses. |
java.util.List |
getMyObjectTypes()
This method, after the property file has been parsed, will return a list of all the object types that have properties. |
java.util.Map |
getMyProperties(java.lang.String class_name)
This method is to be called by model objects when they need to get mappings of their properties. |
private boolean |
hasProperties(java.lang.String obj_type)
Given an object type, this method will tell you if that type has properties. |
boolean |
parsePropertyFile()
Parses the property file. |
private Property |
propertyLine(java.lang.String line)
Given a line from the property file in the form: property id display name default type it will return a property. |
private java.util.Map |
recursivePropertyFinder(java.lang.String prop_name,
java.util.HashMap htable_of_htables)
This method is a recursive method that navigates up the heirarchy tree, returning the property mappings of all the superclasses of the first class that it is called on. |
void |
setMyFileName(java.lang.String myFileName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.List myObjectTypes
private java.util.HashMap myPropertiesHashMaps
private java.lang.String myFileName
| Constructor Detail |
public PropertyInitializer(java.lang.String file_name)
| Method Detail |
public void setMyFileName(java.lang.String myFileName)
myFileName - The myFileName to set.public java.util.Map getMyProperties(java.lang.String class_name)
class_name - String - The name of the class whose properties you want to get.
public java.util.List getMyObjectTypes()
public boolean parsePropertyFile()
private void addObjectType(java.lang.String obj_type)
obj_type - String - The name of the object that can have a type.
private void addProperty(java.lang.String type_name,
Property prop)
type_name - String - The name of the object that this property should be added to.prop - Property - The property to add.
private Property propertyLine(java.lang.String line)
throws java.util.NoSuchElementException
line - The string line that contains info on one property.
java.util.NoSuchElementException - Thrown if the line has an invalid format.private boolean hasProperties(java.lang.String obj_type)
obj_type - String - The name of the object type.
private java.util.HashMap finalizePropertyMappings(java.util.HashMap htable_of_htables)
htable_of_htables - A HashMap of HashMaps that contains the mappings of all object properties.
private java.util.Map recursivePropertyFinder(java.lang.String prop_name,
java.util.HashMap htable_of_htables)
prop_name - String - The name of a class you know has properties.htable_of_htables - HashMap - The complete hashMap of hashMaps that this method can use to lookup classes.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||