|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.unimo.dbgroup.momis.tools.TranslationMap
Manage a translation map.
Used in the SIM process:
ODL -< Odbtools (OLCD-<XML) -< Thesaurus
| Field Summary | |
private java.util.HashMap |
_instanceMap
Map indexed over the inserted object. Guarantees that the same object is called ever with the same name. |
private java.util.HashMap |
_instanceMapNames
Name Management. |
private java.util.HashMap |
_nameMap
Map indexed over the name given to the object. Guarantees that the names are uniques. |
private java.util.HashMap |
_nameMapNames
Name management. |
private static int |
TRUNCATESIZE
Map indexed over the name given to the object. Guarantees that the names are uniques. |
| Constructor Summary | |
TranslationMap()
Reads a file and put it in a string. |
|
| Method Summary | |
java.lang.Object |
get(java.lang.String name)
Search for the object related to the given name. |
java.lang.Object |
getName(java.lang.String name)
Name Mapping. |
private java.lang.String |
getUniqueName(java.lang.String suggestedName,
java.util.Map inMap)
Starting from the suggested Name computes an unique name on the map inMap. |
static void |
main(java.lang.String[] args)
Routine used to test the class. |
java.lang.String |
put(java.lang.String suggestedName,
java.lang.Object instance)
Insert an object into 'this' map. |
java.lang.String |
putName(java.lang.String stringToTranslate)
Insert a string into 'this' map. |
java.lang.String |
toStringOld()
String representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int TRUNCATESIZE
private java.util.HashMap _nameMap
private java.util.HashMap _instanceMap
private java.util.HashMap _nameMapNames
private java.util.HashMap _instanceMapNames
| Constructor Detail |
public TranslationMap()
| Method Detail |
public java.lang.String put(java.lang.String suggestedName,
java.lang.Object instance)
suggestedName - suggested name for the instance.instance - the object to insert.
private java.lang.String getUniqueName(java.lang.String suggestedName,
java.util.Map inMap)
public java.lang.Object get(java.lang.String name)
public java.lang.String putName(java.lang.String stringToTranslate)
stringToTranslate - name to be truncated.
public java.lang.Object getName(java.lang.String name)
public java.lang.String toStringOld()
public static void main(java.lang.String[] args)
Tests the tools.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||