]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Handling elements that inherit AtomicTypes
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 19 Jan 2017 11:11:27 +0000 (11:11 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 12:01:35 +0000 (14:01 +0200)
Handling Base64 encoded data as ByteArray

refs #6985

git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@33432 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.xml.sax/src/org/simantics/xml/sax/ImporterGenerator.java
org.simantics.xml.sax/src/org/simantics/xml/sax/OntologyGenerator.java
org.simantics.xml.sax/src/org/simantics/xml/sax/SchemaConversionBase.java

index f3279e25ad4ffea031c61057cd38be0b10c00d1e..d192ad77000aa3f60e4fe25bdf9209364b93b1c0 100644 (file)
@@ -12,7 +12,6 @@ import java.util.Map;
 import javax.xml.namespace.QName;\r
 \r
 import org.simantics.utils.datastructures.BijectionMap;\r
-import org.simantics.utils.datastructures.Pair;\r
 import org.simantics.xml.sax.configuration.AttributeComposition;\r
 import org.simantics.xml.sax.configuration.Configuration;\r
 import org.simantics.xml.sax.configuration.IDProvider;\r
@@ -143,9 +142,15 @@ public class ImporterGenerator extends SchemaConversionBase{
 //                     return "Float.parseFloat(value)";\r
 //             return "value";\r
 //     }\r
-       protected String getValueGetter(TypeEntry binding,String name) {\r
+       protected String getValueGetterMethod(TypeEntry binding,String name) {\r
                if (binding == null)\r
                        return name+".getValue()";\r
+               return binding.getValueGetterMethod(name);\r
+       }\r
+       \r
+       protected String getValueGetter(TypeEntry binding,String name) {\r
+               if (binding == null)\r
+                       return name;\r
                return binding.getValueGetter(name);\r
        }\r
        protected String getValueGetter(TypeEntry binding) {\r
@@ -208,7 +213,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                        intrerfaces.add("org.simantics.xml.sax.base.UnrecognizedElementParser");\r
                \r
                createClassHeader(fw.writer, isList);\r
-               writeClass(fw.writer,true, null, className, baseClass, intrerfaces);\r
+               writeClass(fw.writer,false, null, className, baseClass, intrerfaces);\r
                        \r
                writeIDProvider(fw.writer);\r
        \r
@@ -532,15 +537,21 @@ public class ImporterGenerator extends SchemaConversionBase{
                    }\r
                } \r
                if (simpleType != null) {\r
-                       Restriction restriction = simpleType.getRestriction();\r
-                       if (restriction == null)\r
-                               throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart()+ ", SimpleType restriction is unset");\r
-                       QName base = restriction.getBase();\r
-                       \r
-                       \r
-                       //String binding = getBindingFromPrimitiveType(base);\r
-                       TypeEntry binding = getTypeEntry(base);\r
-                       writeAttribute(fw, attrName, relationName, binding, isReference);\r
+                       org.w3._2001.xmlschema.List list = simpleType.getList();\r
+                       if (list != null) {\r
+                               TypeEntry binding = getTypeEntry(new QName(SCHEMA_NS, "string"));\r
+                               writeAttribute(fw, attrName, relationName, binding, isReference);\r
+                       } else {\r
+                               Restriction restriction = simpleType.getRestriction();\r
+                               if (restriction == null)\r
+                                       throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart()+ ", SimpleType restriction is unset");\r
+                               QName base = restriction.getBase();\r
+                               \r
+                               \r
+                               //String binding = getBindingFromPrimitiveType(base);\r
+                               TypeEntry binding = getTypeEntry(base);\r
+                               writeAttribute(fw, attrName, relationName, binding, isReference);\r
+                       }\r
                } else {\r
                        // TODO : using default String attribute should be configured with rules.\r
                        //throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart());\r
@@ -555,7 +566,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                fw.writer.println("      {");\r
                fw.writer.println("         Attribute a = element.getAttribute(\"" +attrName+"\");");\r
                fw.writer.println("         if (a != null) {");\r
-               fw.writer.println("            graph.claimLiteral(element.getData(),"+relationName+","+getValueGetter(binding,"a")+", "+binding.binding+");");\r
+               fw.writer.println("            graph.claimLiteral(element.getData(),"+relationName+","+getValueGetterMethod(binding,"a")+", "+binding.binding+");");\r
                if (isReference)\r
                fw.writer.println("            idProviderValue = a.getValue();");       \r
                fw.writer.println("         }");\r
@@ -642,9 +653,9 @@ public class ImporterGenerator extends SchemaConversionBase{
                        if (i > 0)\r
                                fw.writer.print(",");\r
                        if (defaultValue != null)\r
-                               fw.writer.print("a"+(i)+"!= null ? "+ getValueGetter(binding,"a"+(i++)) + " : " +defaultValue);\r
+                               fw.writer.print("a"+(i)+"!= null ? "+ getValueGetterMethod(binding,"a"+(i++)) + " : " +defaultValue);\r
                        else\r
-                               fw.writer.print(getValueGetter(binding,"a"+(i++)));\r
+                               fw.writer.print(getValueGetterMethod(binding,"a"+(i++)));\r
                }\r
                fw.writer.println("};");\r
                fw.writer.println("         graph.claimLiteral(element.getData(),"+relationName+", value, "+arrayBinding+");");\r
@@ -687,10 +698,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                writers.put(elementObj, fw);\r
                boolean isList = false;\r
                \r
-               Pair<String, Boolean> inhertiance = getElementInheritance(elementObj);\r
-               boolean inherited = inhertiance.second;\r
-               String baseClass = inhertiance.first;//"org.simantics.xml.sax.base.XMLElementParserBase";\r
-               \r
+               Inheritance inhertiance = getElementInheritance(elementObj);    \r
                \r
                provider = getIDProvider(element);\r
                List<IDReference> references = getIDReferences(element);\r
@@ -703,7 +711,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                        intrerfaces.add("org.simantics.xml.sax.base.UnrecognizedElementParser");\r
 \r
                createClassHeader(fw.writer, isList);\r
-               writeClass(fw.writer,false, element.getName(), className, baseClass, intrerfaces);\r
+               writeClass(fw.writer,false, element.getName(), className, inhertiance.baseClass, intrerfaces);\r
                writeIDProvider(fw.writer);\r
                fw.writer.println("   @Override");\r
                fw.writer.println("   public Resource create(WriteGraph graph, Element element) throws DatabaseException{");\r
@@ -729,7 +737,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                \r
                fw.writer.println("   @Override");\r
                fw.writer.println("   public void configure(WriteGraph graph, Deque<Element> parents, Element element) throws DatabaseException {");\r
-               if (inherited) {\r
+               if (inhertiance.type == InheritanceType.ComplexType) {\r
                fw.writer.println("             super.configure(graph,parents,element);");\r
                }\r
                fw.writer.println("        "+getOntologyImport());\r
@@ -743,6 +751,13 @@ public class ImporterGenerator extends SchemaConversionBase{
                } \r
                fw.writer.println("   }");\r
                \r
+               if (inhertiance.type == InheritanceType.AtomicType) {\r
+               fw.writer.println();\r
+               fw.writer.println("   @Override");\r
+               fw.writer.println("   public void configure(WriteGraph graph, Element element, java.lang.String string) throws DatabaseException {");\r
+               fw.writer.println("      graph.claimValue(element.getData(), "+getValueGetter(inhertiance.atomicType,"string")+", "+inhertiance.atomicType.binding+");");\r
+               fw.writer.println("   }");\r
+               }\r
                if (simpleType != null) {\r
                        SchemaObject obj = simpleTypes.get(simpleType);\r
                        handleElementSimpleTypeAttributes(obj);\r
@@ -773,7 +788,7 @@ public class ImporterGenerator extends SchemaConversionBase{
                if (stringWriter.getBuffer().length() > 0) {\r
                        fw.writer.write(stringWriter.toString());\r
                }\r
-               if (inherited) {\r
+               if (inhertiance.type == InheritanceType.ComplexType) {\r
                fw.writer.println("      return super.connectChild(graph,element,child);");     \r
                } else {\r
                fw.writer.println("      return false;");\r
@@ -806,40 +821,76 @@ public class ImporterGenerator extends SchemaConversionBase{
                ruleClassNames.add(converter.getPluginName()+"."+elementPackageName+"."+name);\r
        }\r
        \r
-       private Pair<String,Boolean> getElementInheritance(SchemaObject topLevelElementObj) {\r
+       private enum InheritanceType{ComplexType,AtomicType,None};\r
+       \r
+       private class Inheritance {\r
+               public String baseClass;\r
+               public InheritanceType type;\r
+               public TypeEntry atomicType;\r
+               \r
+               public Inheritance() {\r
+                       baseClass = "org.simantics.xml.sax.base.XMLElementNamedChildParserBase";\r
+                       type = InheritanceType.None;\r
+               }\r
+       }\r
+       \r
+       private Inheritance getElementInheritance(SchemaObject topLevelElementObj) {\r
+               if (topLevelElementObj.getElement() != null && topLevelElementObj.getElement().getName().equals("ByteString"))\r
+                       System.out.println();\r
                Element topLevelElement = topLevelElementObj.getElement();\r
-               String baseClass = "org.simantics.xml.sax.base.XMLElementNamedChildParserBase";\r
-               boolean inherited = false;\r
+               Inheritance inheritance = new Inheritance();\r
                if (topLevelElement.getType() != null) {\r
                        QName type = topLevelElement.getType();\r
                        if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
                                SchemaObject obj = complexTypeName.get(type.getLocalPart());\r
-                               baseClass = getName(obj);\r
-                               inherited = true;\r
-                       }       \r
+//                             if (obj == null)\r
+//                                     obj = simpleTypeName.get(type.getLocalPart());\r
+                               if (obj != null) {\r
+                                       inheritance.baseClass = getName(obj);\r
+                                       inheritance.type = InheritanceType.ComplexType;\r
+                               }\r
+                       } else {\r
+                               TypeEntry entry = getTypeEntry(type);\r
+                               if (entry != null) {\r
+                                       inheritance.type = InheritanceType.AtomicType;\r
+                                       inheritance.atomicType = entry;\r
+                               }\r
+                       }\r
                }\r
-               if (!inherited) {\r
+               if (inheritance.type == InheritanceType.None) {\r
                        QName type = getElementBase(topLevelElement);\r
                        if (type != null) {\r
                                if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
                                        SchemaObject obj = getWithName(topLevelElementObj, type.getLocalPart());\r
-                                       baseClass = getName(obj);\r
-                                       inherited = true;\r
-                               }       \r
+                                       inheritance.baseClass = getName(obj);\r
+                                       inheritance.type = InheritanceType.ComplexType;\r
+                               } else {\r
+                                       TypeEntry entry = getTypeEntry(type);\r
+                                       if (entry != null) {\r
+                                               inheritance.type = InheritanceType.AtomicType;\r
+                                               inheritance.atomicType = entry;\r
+                                       }\r
+                               }\r
                        }\r
                }\r
-               if (!inherited) {\r
+               if (inheritance.type == InheritanceType.None) {\r
                        QName type = topLevelElement.getSubstitutionGroup();\r
                        if (type != null) {\r
                                if (!type.getNamespaceURI().equals(SCHEMA_NS)) {\r
                                        SchemaObject obj = getWithName(topLevelElementObj, type.getLocalPart());\r
-                                       baseClass = getName(obj);\r
-                                       inherited = true;\r
-                               }       \r
+                                       inheritance.baseClass = getName(obj);\r
+                                       inheritance.type = InheritanceType.ComplexType;\r
+                               } else {\r
+                                       TypeEntry entry = getTypeEntry(type);\r
+                                       if (entry != null) {\r
+                                               inheritance.type = InheritanceType.AtomicType;\r
+                                               inheritance.atomicType = entry;\r
+                                       }\r
+                               }\r
                        }\r
                }\r
                \r
-               return new Pair<String, Boolean>(baseClass, inherited);\r
+               return inheritance;\r
        }\r
        \r
        private void writeClass(PrintWriter writer,boolean abst, String name, String className, String baseClass, List<String> interfaces) {\r
index 5ecb02e0e948b8555aeae87b7aaae6876893f074..095de9d2c20049a9f543fdae21459ebc8ef1dc91 100644 (file)
@@ -403,19 +403,32 @@ public class OntologyGenerator extends SchemaConversionBase {
        protected void handleSimpleType(SchemaObject parent, SchemaObject simpleTypeObj) {\r
                SimpleType simpleType = simpleTypeObj.getSimpleType();\r
                String name = simpleType.getName();\r
-               Restriction restriction = simpleType.getRestriction();\r
-               if (restriction == null || simpleType.getUnion() != null || simpleType.getId() != null)\r
-                       throw new RuntimeException();\r
-               QName base = restriction.getBase();\r
-               \r
-               String relationName = ontRoot+"has"+name;\r
-               if (parent != null)\r
-                       relationName = ontRoot+getName(parent)+".has"+name;\r
-               \r
-               writer.println(relationName+ " <R XML.hasAttribute : L0.FunctionalRelation");\r
                \r
-               String ontType = getL0Type(base);\r
-               writer.println("   --> " + ontType);\r
+               org.w3._2001.xmlschema.List list = simpleType.getList();\r
+               if (list != null) {\r
+                       // TODO : process restriction in lists\r
+                       String relationName = ontRoot+"has"+name;\r
+                       if (parent != null)\r
+                               relationName = ontRoot+getName(parent)+".has"+name;\r
+                       writer.println(relationName+ " <R XML.hasAttribute : L0.FunctionalRelation");\r
+                       \r
+                       String ontType = getL0Type(new QName(SCHEMA_NS, "string"));\r
+                       writer.println("   --> " + ontType);\r
+               } else {\r
+                       Restriction restriction = simpleType.getRestriction();\r
+                       if (restriction == null || simpleType.getUnion() != null || simpleType.getId() != null)\r
+                               throw new RuntimeException(simpleType.getName() + " restriction error");\r
+                       QName base = restriction.getBase();\r
+                       \r
+                       String relationName = ontRoot+"has"+name;\r
+                       if (parent != null)\r
+                               relationName = ontRoot+getName(parent)+".has"+name;\r
+                       \r
+                       writer.println(relationName+ " <R XML.hasAttribute : L0.FunctionalRelation");\r
+                       \r
+                       String ontType = getL0Type(base);\r
+                       writer.println("   --> " + ontType);\r
+               }\r
        }\r
        \r
        @Override\r
index e04b0931fb115fb9f96d9ce5427b4105a6732498..38c934aafa060043725306a06d06b80dc9ccfbb2 100644 (file)
@@ -2,6 +2,7 @@ package org.simantics.xml.sax;
 \r
 import java.util.ArrayDeque;\r
 import java.util.ArrayList;\r
+import java.util.Base64;\r
 import java.util.Deque;\r
 import java.util.HashMap;\r
 import java.util.HashSet;\r
@@ -62,32 +63,33 @@ public abstract class SchemaConversionBase {
                Map<String,TypeEntry> l0Types = new HashMap<String, SchemaConversionBase.TypeEntry>();\r
                typeMap.put(CONVERSION_NS, l0Types);\r
                \r
-               schemaTypes.put("string",               new TypeEntry("L0.String",                      "Bindings.STRING", "String", "","",""));\r
-               schemaTypes.put("NMTOKEN",              new TypeEntry("L0.String",                      "Bindings.STRING", "String", "","",""));\r
-               schemaTypes.put("token",                new TypeEntry("L0.String",                      "Bindings.STRING", "String", "","",""));\r
-               schemaTypes.put("ID",                   new TypeEntry("L0.String",                      "Bindings.STRING", "String", "","","",true));\r
-               schemaTypes.put("IDREF",                new TypeEntry("L0.String",                      "Bindings.STRING", "String", "","",""));\r
+               schemaTypes.put("string",               new TypeEntry("L0.String",                      "Bindings.STRING", "java.lang.String", "","",""));\r
+               schemaTypes.put("NMTOKEN",              new TypeEntry("L0.String",                      "Bindings.STRING", "java.lang.String", "","",""));\r
+               schemaTypes.put("token",                new TypeEntry("L0.String",                      "Bindings.STRING", "java.lang.String", "","",""));\r
+               schemaTypes.put("ID",                   new TypeEntry("L0.String",                      "Bindings.STRING", "java.lang.String", "","","",true));\r
+               schemaTypes.put("IDREF",                new TypeEntry("L0.String",                      "Bindings.STRING", "java.lang.String", "","",""));\r
                schemaTypes.put("date",                 new TypeEntry("XML.Date",                       "org.simantics.xml.sax.base.datatypes.literal.Date.BINDING", "org.simantics.xml.sax.base.datatypes.literal.Date", "","org.simantics.xml.sax.base.datatypes.literal.Date.parseDate(",")"));\r
                schemaTypes.put("time",                 new TypeEntry("XML.Time",                       "org.simantics.xml.sax.base.datatypes.literal.Time.BINDING", "org.simantics.xml.sax.base.datatypes.literal.Time", "","org.simantics.xml.sax.base.datatypes.literal.Time.parseTime(",")"));\r
                schemaTypes.put("dateTime",             new TypeEntry("XML.DateTime",           "org.simantics.xml.sax.base.datatypes.literal.DateTime.BINDING", "org.simantics.xml.sax.base.datatypes.literal.DateTime", "","org.simantics.xml.sax.base.datatypes.literal.DateTime.parseDateTime(",")"));\r
-               schemaTypes.put("anyURI",               new TypeEntry("L0.URI",                         "Bindings.STRING", "String", "","",""));\r
-               schemaTypes.put("double",               new TypeEntry("L0.Double",                      "Bindings.DOUBLE", "double", "Double.NaN","Double.parseDouble(",")"));\r
-               schemaTypes.put("float",                new TypeEntry("L0.Float",                       "Bindings.FLOAT",  "float",  "Float.NaN","Float.parseFloat(",")"));\r
-               schemaTypes.put("decimal",              new TypeEntry("L0.Double",                      "Bindings.DOUBLE", "double", "Double.NaN","Double.parseDouble(",")"));\r
-               schemaTypes.put("boolean",              new TypeEntry("L0.Boolean",                     "Bindings.BOOLEAN", "boolean", "false","Boolean.parseBoolean(",")"));\r
-               schemaTypes.put("integer",              new TypeEntry("L0.Integer",             "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("positiveInteger", new TypeEntry("L0.Integer",          "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("nonPositiveInteger", new TypeEntry("L0.Integer",       "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("nonNegativeInteger", new TypeEntry("L0.Integer",       "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("negativeInteger", new TypeEntry("L0.Integer",          "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("unsignedInt",  new TypeEntry("L0.Integer",             "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("int",                  new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("short",                new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("unsignedShort",new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","Integer.parseInt(",")"));\r
-               schemaTypes.put("byte",                 new TypeEntry("L0.Byte",                        "Bindings.BYTE", "byte", "0","Byte.parseByte(",")"));\r
-               schemaTypes.put("unsignedByte", new TypeEntry("L0.Byte",                        "Bindings.BYTE", "byte", "0","Byte.parseByte(",")"));\r
-               schemaTypes.put("long",                 new TypeEntry("L0.Long",                        "Bindings.LONG", "long", "0","Long.parseLong(",")"));\r
-               schemaTypes.put("unsignedLong", new TypeEntry("L0.Long",                        "Bindings.LONG", "long", "0","Long.parseLong(",")"));\r
+               schemaTypes.put("anyURI",               new TypeEntry("L0.URI",                         "Bindings.STRING", "java.lang.String", "","",""));\r
+               schemaTypes.put("double",               new TypeEntry("L0.Double",                      "Bindings.DOUBLE", "double", "java.lang.Double.NaN","java.lang.Double.parseDouble(",")"));\r
+               schemaTypes.put("float",                new TypeEntry("L0.Float",                       "Bindings.FLOAT",  "float",  "java.lang.Float.NaN","java.lang.Float.parseFloat(",")"));\r
+               schemaTypes.put("decimal",              new TypeEntry("L0.Double",                      "Bindings.DOUBLE", "double", "java.lang.Double.NaN","java.lang.Double.parseDouble(",")"));\r
+               schemaTypes.put("boolean",              new TypeEntry("L0.Boolean",                     "Bindings.BOOLEAN", "boolean", "false","java.lang.Boolean.parseBoolean(",")"));\r
+               schemaTypes.put("integer",              new TypeEntry("L0.Integer",             "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("positiveInteger", new TypeEntry("L0.Integer",          "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("nonPositiveInteger", new TypeEntry("L0.Integer",       "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("nonNegativeInteger", new TypeEntry("L0.Integer",       "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("negativeInteger", new TypeEntry("L0.Integer",          "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("unsignedInt",  new TypeEntry("L0.Integer",             "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("int",                  new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("short",                new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("unsignedShort",new TypeEntry("L0.Integer",                     "Bindings.INTEGER", "int", "0","java.lang.Integer.parseInt(",")"));\r
+               schemaTypes.put("byte",                 new TypeEntry("L0.Byte",                        "Bindings.BYTE", "byte", "0","java.lang.Byte.parseByte(",")"));\r
+               schemaTypes.put("unsignedByte", new TypeEntry("L0.Byte",                        "Bindings.BYTE", "byte", "0","java.lang.Byte.parseByte(",")"));\r
+               schemaTypes.put("long",                 new TypeEntry("L0.Long",                        "Bindings.LONG", "long", "0","java.lang.Long.parseLong(",")"));\r
+               schemaTypes.put("unsignedLong", new TypeEntry("L0.Long",                        "Bindings.LONG", "long", "0","java.lang.Long.parseLong(",")"));\r
+               schemaTypes.put("base64Binary", new TypeEntry("L0.ByteArray",           "Bindings.BYTE_ARRAY", "byte[]", "new byte[0]","java.util.Base64.getDecoder().decode(",")"));\r
                \r
                \r
                \r
@@ -963,11 +965,15 @@ public abstract class SchemaConversionBase {
                        this.getterPostfix = getterPostfix;\r
                }\r
                \r
-               public String getValueGetter(String name) {\r
+               public String getValueGetterMethod(String name) {\r
                        return getterPrefix + name + ".getValue()"+getterPostfix;\r
                }\r
-               public String getValueGetter() {\r
-                       return getterPrefix + "value"+getterPostfix;\r
+               public String getValueGetter(String name) {\r
+                       return getterPrefix + name+getterPostfix;\r
+               }\r
+               public String getValueGetter()\r
+               {\r
+                       return getValueGetter("value");\r
                }\r
                \r
        }\r