+ protected void assignShortName() {\r
+ shortName = name.substring(0, 3).toUpperCase();\r
+ SchemaConverter root = getRoot();\r
+ if (!root.shortNameMap.containsKey(shortName)) {\r
+ root.shortNameMap.add(shortName, this);\r
+ return;\r
+ } else {\r
+ SchemaConverter sc = root.shortNameMap.getValues(shortName).get(0);\r
+ if (sc.schemaNs.equals(schemaNs)) {\r
+ root.shortNameMap.add(shortName, this);\r
+ return;\r
+ }\r
+ }\r
+ int i = 1;\r
+ while (true) {\r
+ String n = shortName+i;\r
+ if (!root.shortNameMap.containsKey(n)) {\r
+ shortName = n;\r
+ root.shortNameMap.add(shortName, this);\r
+ return;\r
+ } else {\r
+ SchemaConverter sc = root.shortNameMap.getValues(n).get(0);\r
+ if (sc.schemaNs.equals(schemaNs)) {\r
+ shortName = n;\r
+ root.shortNameMap.add(shortName, this);\r
+ return;\r
+ }\r
+ }\r
+ i++;\r
+ }\r
+ }\r
+ \r