tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuh...@apache.org
Subject svn commit: r573320 - in /incubator/tuscany/java/sdo: tools/src/main/java/org/apache/tuscany/sdo/generate/ tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/ tools/templates/models/ toolsTest/ toolsTest/src/main/resources/
Date Thu, 06 Sep 2007 16:36:12 GMT
Author: fuhwei
Date: Thu Sep  6 09:36:11 2007
New Revision: 573320

URL: http://svn.apache.org/viewvc?rev=573320&view=rev
Log:
Fixed for T-1645

Added:
    incubator/tuscany/java/sdo/toolsTest/src/main/resources/simpleNoTns.xsd
Modified:
    incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
    incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
    incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
    incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet
    incubator/tuscany/java/sdo/toolsTest/pom.xml

Modified: incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java?rev=573320&r1=573319&r2=573320&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java (original)
+++ incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java Thu Sep  6 09:36:11 2007
@@ -492,6 +492,10 @@
   {
     Resource resource = genModel.eResource();
 
+    // Return if nothing is found 
+    if( resource == null )
+        return;
+    
     if (targetDirectory != null)
     {
       resource.getResourceSet().getURIConverter().getURIMap().put(

Modified: incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java?rev=573320&r1=573319&r2=573320&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java (original)
+++ incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java Thu Sep  6 09:36:11 2007
@@ -236,7 +236,12 @@
     File inputFile = new File(xsdFileName).getAbsoluteFile();
     Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true);
     XSDSchema schema = (XSDSchema)model.getContents().get(0);
-    return schema.getTargetNamespace();
+    String targetNS = schema.getTargetNamespace();
+    if (targetNS == null) {
+    	targetNS = schema.getSchemaLocation();
+    }
+    
+    return targetNS;
   }
 
   protected static void printUsage()
@@ -320,7 +325,7 @@
     {
         if( schemaNamespace != null )
             packageInfoTable.put(schemaNamespace, new PackageInfo(javaPackage, prefix, schemaNamespace, null ));
-        else
+        else if( packageURI != null )
             packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, null, null ));
     }    
     return packageInfoTable;

Modified: incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java?rev=573320&r1=573319&r2=573320&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java (original)
+++ incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java Thu Sep  6 09:36:11 2007
@@ -233,129 +233,130 @@
   protected final String TEXT_193 = NL + "\t\taddXSDMapping" + NL + "\t\t  (new String[]" + NL + "\t\t\t {";
   protected final String TEXT_194 = NL + "\t\t\t ";
   protected final String TEXT_195 = ", ";
-  protected final String TEXT_196 = NL + "\t\t\t });" + NL;
-  protected final String TEXT_197 = NL;
-  protected final String TEXT_198 = NL + "\t\taddXSDMapping" + NL + "\t\t  (";
-  protected final String TEXT_199 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
-  protected final String TEXT_200 = NL + "\t\t\t ";
-  protected final String TEXT_201 = ", ";
-  protected final String TEXT_202 = NL + "\t\t\t });" + NL;
-  protected final String TEXT_203 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t  (\"";
-  protected final String TEXT_204 = "\"," + NL + "\t\t  ";
-  protected final String TEXT_205 = ".get";
-  protected final String TEXT_206 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
-  protected final String TEXT_207 = NL + "\t\t\t ";
-  protected final String TEXT_208 = ", ";
-  protected final String TEXT_209 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
-  protected final String TEXT_210 = NL + "\t\t\t });";
-  protected final String TEXT_211 = NL + "              ";
-  protected final String TEXT_212 = NL + "\t\tsetInstanceProperty" + NL + "\t\t  (property," + NL + "\t\t\t \"";
-  protected final String TEXT_213 = "\"," + NL + "\t\t\t ";
-  protected final String TEXT_214 = ", ";
-  protected final String TEXT_215 = ");";
-  protected final String TEXT_216 = NL + "                  ";
-  protected final String TEXT_217 = "  ";
-  protected final String TEXT_218 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getProperty(";
-  protected final String TEXT_219 = "Type, ";
-  protected final String TEXT_220 = ".INTERNAL_";
-  protected final String TEXT_221 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
-  protected final String TEXT_222 = NL + "\t\t\t ";
-  protected final String TEXT_223 = ", ";
-  protected final String TEXT_224 = NL + "\t\t\t });" + NL;
-  protected final String TEXT_225 = NL + "  }" + NL + "    ";
-  protected final String TEXT_226 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
-  protected final String TEXT_227 = " create";
-  protected final String TEXT_228 = "FromString(String initialValue)" + NL + "\t{";
-  protected final String TEXT_229 = NL + "\t\t";
-  protected final String TEXT_230 = " result = ";
-  protected final String TEXT_231 = ".get(initialValue);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + type.getName() + \"'\");";
-  protected final String TEXT_232 = NL + "\t\treturn result;";
-  protected final String TEXT_233 = NL + "\t\treturn (";
-  protected final String TEXT_234 = ")create";
-  protected final String TEXT_235 = "FromString(initialValue);";
-  protected final String TEXT_236 = NL + "\t\treturn (";
-  protected final String TEXT_237 = ")";
-  protected final String TEXT_238 = ".create";
-  protected final String TEXT_239 = "FromString(initialValue);";
-  protected final String TEXT_240 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
-  protected final String TEXT_241 = " result = new ";
-  protected final String TEXT_242 = "();" + NL + "\t\tfor (";
-  protected final String TEXT_243 = " stringTokenizer = new ";
-  protected final String TEXT_244 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
-  protected final String TEXT_245 = NL + "\t\t\tresult.add(create";
-  protected final String TEXT_246 = "FromString(item));";
-  protected final String TEXT_247 = NL + "\t\t\tresult.add(";
-  protected final String TEXT_248 = ".create";
-  protected final String TEXT_249 = "FromString(item));";
-  protected final String TEXT_250 = NL + "\t\t}" + NL + "\t\treturn result;";
-  protected final String TEXT_251 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
-  protected final String TEXT_252 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
-  protected final String TEXT_253 = NL + "\t\ttry" + NL + "\t\t{";
-  protected final String TEXT_254 = NL + "\t\t\tresult = (";
-  protected final String TEXT_255 = ")create";
-  protected final String TEXT_256 = "FromString(initialValue);";
-  protected final String TEXT_257 = NL + "\t\t\tresult = (";
-  protected final String TEXT_258 = ")";
-  protected final String TEXT_259 = ".create";
-  protected final String TEXT_260 = "FromString(initialValue);";
-  protected final String TEXT_261 = NL + "\t\t\tif (result != null/* && Diagnostician.INSTANCE.validate(type, result, null, null)*/)" + NL + "\t\t\t{" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (RuntimeException e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t}";
-  protected final String TEXT_262 = NL + "\t\tif (result != null || exception == null) return result;" + NL + "    " + NL + "\t\tthrow exception;";
-  protected final String TEXT_263 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
-  protected final String TEXT_264 = "();";
-  protected final String TEXT_265 = NL + "\t\treturn (";
-  protected final String TEXT_266 = ")super.createFromString(";
-  protected final String TEXT_267 = ", initialValue);";
-  protected final String TEXT_268 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert";
-  protected final String TEXT_269 = "ToString(Object instanceValue)" + NL + "\t{";
-  protected final String TEXT_270 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
-  protected final String TEXT_271 = NL + "\t\treturn convert";
-  protected final String TEXT_272 = "ToString(instanceValue);";
-  protected final String TEXT_273 = NL + "\t\treturn ";
-  protected final String TEXT_274 = ".convert";
-  protected final String TEXT_275 = "ToString(instanceValue);";
-  protected final String TEXT_276 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
-  protected final String TEXT_277 = " list = (";
-  protected final String TEXT_278 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
-  protected final String TEXT_279 = " result = new ";
-  protected final String TEXT_280 = "();" + NL + "\t\tfor (";
-  protected final String TEXT_281 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
-  protected final String TEXT_282 = NL + "\t\t\tresult.append(convert";
-  protected final String TEXT_283 = "ToString(i.next()));";
-  protected final String TEXT_284 = NL + "\t\t\tresult.append(";
-  protected final String TEXT_285 = ".convert";
-  protected final String TEXT_286 = "ToString(i.next()));";
-  protected final String TEXT_287 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
-  protected final String TEXT_288 = NL + "\t\tif (instanceValue == null) return null;";
-  protected final String TEXT_289 = NL + "\t\tif (";
-  protected final String TEXT_290 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
-  protected final String TEXT_291 = NL + "\t\t\t\tString value = convert";
-  protected final String TEXT_292 = "ToString(instanceValue);";
-  protected final String TEXT_293 = NL + "\t\t\t\tString value = ";
-  protected final String TEXT_294 = ".convert";
-  protected final String TEXT_295 = "ToString(instanceValue);";
-  protected final String TEXT_296 = NL + "\t\t\t\tif (value != null) return value;" + NL + "\t\t\t}" + NL + "\t\t\tcatch (Exception e)" + NL + "\t\t\t{" + NL + "\t\t\t}" + NL + "\t\t}";
-  protected final String TEXT_297 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
-  protected final String TEXT_298 = "\");";
-  protected final String TEXT_299 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
-  protected final String TEXT_300 = "();";
-  protected final String TEXT_301 = NL + "\t\treturn super.convertToString(";
-  protected final String TEXT_302 = ", instanceValue);";
-  protected final String TEXT_303 = NL + "\t}" + NL;
-  protected final String TEXT_304 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
-  protected final String TEXT_305 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
-  protected final String TEXT_306 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
-  protected final String TEXT_307 = " create";
-  protected final String TEXT_308 = "();" + NL;
-  protected final String TEXT_309 = NL + "  /**" + NL + "   * Registers the types supported by this Factory within the supplied scope.argument" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param scope an instance of HelperContext used to manage the scoping of types." + NL + "\t * @generated" + NL + "   */" + NL + "  public void register(HelperContext scope);" + NL + "   ";
-  protected final String TEXT_310 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
-  protected final String TEXT_311 = "</em>' corresponding the given literal." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param literal a literal of the data type." + NL + "\t * @return a new instance value of the data type." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
-  protected final String TEXT_312 = " create";
-  protected final String TEXT_313 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
-  protected final String TEXT_314 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param instanceValue an instance value of the data type." + NL + "\t * @return a literal representation of the instance value." + NL + "\t * @generated" + NL + "\t */" + NL + "\tString convert";
-  protected final String TEXT_315 = "(";
-  protected final String TEXT_316 = " instanceValue);" + NL;
-  protected final String TEXT_317 = NL + "} //";
-  protected final String TEXT_318 = NL;
+  protected final String TEXT_196 = NL + "\t\t\t }," + NL + "\t\t\t \"";
+  protected final String TEXT_197 = "\");" + NL;
+  protected final String TEXT_198 = NL;
+  protected final String TEXT_199 = NL + "\t\taddXSDMapping" + NL + "\t\t  (";
+  protected final String TEXT_200 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
+  protected final String TEXT_201 = NL + "\t\t\t ";
+  protected final String TEXT_202 = ", ";
+  protected final String TEXT_203 = NL + "\t\t\t });" + NL;
+  protected final String TEXT_204 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t  (\"";
+  protected final String TEXT_205 = "\"," + NL + "\t\t  ";
+  protected final String TEXT_206 = ".get";
+  protected final String TEXT_207 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+  protected final String TEXT_208 = NL + "\t\t\t ";
+  protected final String TEXT_209 = ", ";
+  protected final String TEXT_210 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
+  protected final String TEXT_211 = NL + "\t\t\t });";
+  protected final String TEXT_212 = NL + "              ";
+  protected final String TEXT_213 = NL + "\t\tsetInstanceProperty" + NL + "\t\t  (property," + NL + "\t\t\t \"";
+  protected final String TEXT_214 = "\"," + NL + "\t\t\t ";
+  protected final String TEXT_215 = ", ";
+  protected final String TEXT_216 = ");";
+  protected final String TEXT_217 = NL + "                  ";
+  protected final String TEXT_218 = "  ";
+  protected final String TEXT_219 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getProperty(";
+  protected final String TEXT_220 = "Type, ";
+  protected final String TEXT_221 = ".INTERNAL_";
+  protected final String TEXT_222 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+  protected final String TEXT_223 = NL + "\t\t\t ";
+  protected final String TEXT_224 = ", ";
+  protected final String TEXT_225 = NL + "\t\t\t });" + NL;
+  protected final String TEXT_226 = NL + "  }" + NL + "    ";
+  protected final String TEXT_227 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+  protected final String TEXT_228 = " create";
+  protected final String TEXT_229 = "FromString(String initialValue)" + NL + "\t{";
+  protected final String TEXT_230 = NL + "\t\t";
+  protected final String TEXT_231 = " result = ";
+  protected final String TEXT_232 = ".get(initialValue);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + type.getName() + \"'\");";
+  protected final String TEXT_233 = NL + "\t\treturn result;";
+  protected final String TEXT_234 = NL + "\t\treturn (";
+  protected final String TEXT_235 = ")create";
+  protected final String TEXT_236 = "FromString(initialValue);";
+  protected final String TEXT_237 = NL + "\t\treturn (";
+  protected final String TEXT_238 = ")";
+  protected final String TEXT_239 = ".create";
+  protected final String TEXT_240 = "FromString(initialValue);";
+  protected final String TEXT_241 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+  protected final String TEXT_242 = " result = new ";
+  protected final String TEXT_243 = "();" + NL + "\t\tfor (";
+  protected final String TEXT_244 = " stringTokenizer = new ";
+  protected final String TEXT_245 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
+  protected final String TEXT_246 = NL + "\t\t\tresult.add(create";
+  protected final String TEXT_247 = "FromString(item));";
+  protected final String TEXT_248 = NL + "\t\t\tresult.add(";
+  protected final String TEXT_249 = ".create";
+  protected final String TEXT_250 = "FromString(item));";
+  protected final String TEXT_251 = NL + "\t\t}" + NL + "\t\treturn result;";
+  protected final String TEXT_252 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+  protected final String TEXT_253 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
+  protected final String TEXT_254 = NL + "\t\ttry" + NL + "\t\t{";
+  protected final String TEXT_255 = NL + "\t\t\tresult = (";
+  protected final String TEXT_256 = ")create";
+  protected final String TEXT_257 = "FromString(initialValue);";
+  protected final String TEXT_258 = NL + "\t\t\tresult = (";
+  protected final String TEXT_259 = ")";
+  protected final String TEXT_260 = ".create";
+  protected final String TEXT_261 = "FromString(initialValue);";
+  protected final String TEXT_262 = NL + "\t\t\tif (result != null/* && Diagnostician.INSTANCE.validate(type, result, null, null)*/)" + NL + "\t\t\t{" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (RuntimeException e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t}";
+  protected final String TEXT_263 = NL + "\t\tif (result != null || exception == null) return result;" + NL + "    " + NL + "\t\tthrow exception;";
+  protected final String TEXT_264 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
+  protected final String TEXT_265 = "();";
+  protected final String TEXT_266 = NL + "\t\treturn (";
+  protected final String TEXT_267 = ")super.createFromString(";
+  protected final String TEXT_268 = ", initialValue);";
+  protected final String TEXT_269 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert";
+  protected final String TEXT_270 = "ToString(Object instanceValue)" + NL + "\t{";
+  protected final String TEXT_271 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
+  protected final String TEXT_272 = NL + "\t\treturn convert";
+  protected final String TEXT_273 = "ToString(instanceValue);";
+  protected final String TEXT_274 = NL + "\t\treturn ";
+  protected final String TEXT_275 = ".convert";
+  protected final String TEXT_276 = "ToString(instanceValue);";
+  protected final String TEXT_277 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
+  protected final String TEXT_278 = " list = (";
+  protected final String TEXT_279 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
+  protected final String TEXT_280 = " result = new ";
+  protected final String TEXT_281 = "();" + NL + "\t\tfor (";
+  protected final String TEXT_282 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
+  protected final String TEXT_283 = NL + "\t\t\tresult.append(convert";
+  protected final String TEXT_284 = "ToString(i.next()));";
+  protected final String TEXT_285 = NL + "\t\t\tresult.append(";
+  protected final String TEXT_286 = ".convert";
+  protected final String TEXT_287 = "ToString(i.next()));";
+  protected final String TEXT_288 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
+  protected final String TEXT_289 = NL + "\t\tif (instanceValue == null) return null;";
+  protected final String TEXT_290 = NL + "\t\tif (";
+  protected final String TEXT_291 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
+  protected final String TEXT_292 = NL + "\t\t\t\tString value = convert";
+  protected final String TEXT_293 = "ToString(instanceValue);";
+  protected final String TEXT_294 = NL + "\t\t\t\tString value = ";
+  protected final String TEXT_295 = ".convert";
+  protected final String TEXT_296 = "ToString(instanceValue);";
+  protected final String TEXT_297 = NL + "\t\t\t\tif (value != null) return value;" + NL + "\t\t\t}" + NL + "\t\t\tcatch (Exception e)" + NL + "\t\t\t{" + NL + "\t\t\t}" + NL + "\t\t}";
+  protected final String TEXT_298 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
+  protected final String TEXT_299 = "\");";
+  protected final String TEXT_300 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
+  protected final String TEXT_301 = "();";
+  protected final String TEXT_302 = NL + "\t\treturn super.convertToString(";
+  protected final String TEXT_303 = ", instanceValue);";
+  protected final String TEXT_304 = NL + "\t}" + NL;
+  protected final String TEXT_305 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
+  protected final String TEXT_306 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
+  protected final String TEXT_307 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+  protected final String TEXT_308 = " create";
+  protected final String TEXT_309 = "();" + NL;
+  protected final String TEXT_310 = NL + "  /**" + NL + "   * Registers the types supported by this Factory within the supplied scope.argument" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param scope an instance of HelperContext used to manage the scoping of types." + NL + "\t * @generated" + NL + "   */" + NL + "  public void register(HelperContext scope);" + NL + "   ";
+  protected final String TEXT_311 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
+  protected final String TEXT_312 = "</em>' corresponding the given literal." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param literal a literal of the data type." + NL + "\t * @return a new instance value of the data type." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+  protected final String TEXT_313 = " create";
+  protected final String TEXT_314 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
+  protected final String TEXT_315 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param instanceValue an instance value of the data type." + NL + "\t * @return a literal representation of the instance value." + NL + "\t * @generated" + NL + "\t */" + NL + "\tString convert";
+  protected final String TEXT_316 = "(";
+  protected final String TEXT_317 = " instanceValue);" + NL;
+  protected final String TEXT_318 = NL + "} //";
+  protected final String TEXT_319 = NL;
 
    public String generate(Object argument)
   {
@@ -853,295 +854,297 @@
     stringBuffer.append(genModel.getNonNLS(key + value));
     }
     stringBuffer.append(TEXT_196);
-    }
+    stringBuffer.append(packageAnnotation.getSource());
     stringBuffer.append(TEXT_197);
+    }
+    stringBuffer.append(TEXT_198);
     for (Iterator i=genPackage.getGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next(); EAnnotation classAnnotation = genClassifier.getEcoreClassifier().getEAnnotation(extendedMetaDataSource);
     if (classAnnotation != null && !genClassifier.getName().equals("DocumentRoot")) {
-    stringBuffer.append(TEXT_198);
-    stringBuffer.append(genClassifier.getSafeUncapName());
     stringBuffer.append(TEXT_199);
-    for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+    stringBuffer.append(genClassifier.getSafeUncapName());
     stringBuffer.append(TEXT_200);
-    stringBuffer.append(key);
+    for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
     stringBuffer.append(TEXT_201);
+    stringBuffer.append(key);
+    stringBuffer.append(TEXT_202);
     stringBuffer.append(value);
     stringBuffer.append(k.hasNext() ? "," : "");
     stringBuffer.append(genModel.getNonNLS(key + value));
     }
-    stringBuffer.append(TEXT_202);
+    stringBuffer.append(TEXT_203);
     }
     if (genClassifier instanceof GenClass) { GenClass genClass = (GenClass) genClassifier;
     for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next(); 
     EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(extendedMetaDataSource);
     if (genClass.getName().equals("DocumentRoot")) { 
     if (!(genFeature.getName().equals("mixed") || genFeature.getName().equals("xMLNSPrefixMap") || genFeature.getName().equals("xSISchemaLocation"))) { 
-    stringBuffer.append(TEXT_203);
-    stringBuffer.append(genFeature.getName());
     stringBuffer.append(TEXT_204);
-    stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
+    stringBuffer.append(genFeature.getName());
     stringBuffer.append(TEXT_205);
-    stringBuffer.append(genFeature.getTypeClassifierAccessorName());
+    stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
     stringBuffer.append(TEXT_206);
-    for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+    stringBuffer.append(genFeature.getTypeClassifierAccessorName());
     stringBuffer.append(TEXT_207);
-    stringBuffer.append(key);
+    for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
     stringBuffer.append(TEXT_208);
+    stringBuffer.append(key);
+    stringBuffer.append(TEXT_209);
     stringBuffer.append(value);
     stringBuffer.append(k.hasNext() ? "," : "");
     stringBuffer.append(genModel.getNonNLS(key + value));
     }
     if (!genFeature.isReferenceType()) {
-    stringBuffer.append(TEXT_209);
-    } else {
     stringBuffer.append(TEXT_210);
-    }
+    } else {
     stringBuffer.append(TEXT_211);
+    }
+    stringBuffer.append(TEXT_212);
     for (Iterator sources = genPackage.getAnnotationSources().iterator(); sources.hasNext();) { String annotationSource = (String)sources.next(); 
     if (!annotationSource.equals(extendedMetaDataSource)) {
     EAnnotation globalAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
     if (globalAnnotation != null) {
     for (Iterator k = globalAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
-    stringBuffer.append(TEXT_212);
-    stringBuffer.append(annotationSource);
     stringBuffer.append(TEXT_213);
-    stringBuffer.append(key);
+    stringBuffer.append(annotationSource);
     stringBuffer.append(TEXT_214);
+    stringBuffer.append(key);
+    stringBuffer.append(TEXT_215);
     stringBuffer.append(value);
     stringBuffer.append(genModel.getNonNLS(key + value));
-    stringBuffer.append(TEXT_215);
-    }
     stringBuffer.append(TEXT_216);
     }
-    }
     stringBuffer.append(TEXT_217);
     }
     }
-    } else {
     stringBuffer.append(TEXT_218);
-    stringBuffer.append(genClassifier.getSafeUncapName());
+    }
+    }
+    } else {
     stringBuffer.append(TEXT_219);
-    stringBuffer.append(genClass.getClassName());
+    stringBuffer.append(genClassifier.getSafeUncapName());
     stringBuffer.append(TEXT_220);
-    stringBuffer.append(genFeature.getUpperName());
+    stringBuffer.append(genClass.getClassName());
     stringBuffer.append(TEXT_221);
-    for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+    stringBuffer.append(genFeature.getUpperName());
     stringBuffer.append(TEXT_222);
-    stringBuffer.append(key);
+    for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
     stringBuffer.append(TEXT_223);
+    stringBuffer.append(key);
+    stringBuffer.append(TEXT_224);
     stringBuffer.append(value);
     stringBuffer.append(k.hasNext() ? "," : "");
     stringBuffer.append(genModel.getNonNLS(key + value));
     }
-    stringBuffer.append(TEXT_224);
+    stringBuffer.append(TEXT_225);
     }
     }
     }
     }
-    stringBuffer.append(TEXT_225);
+    stringBuffer.append(TEXT_226);
     for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
     if (genDataType.isSerializable()) {
-    stringBuffer.append(TEXT_226);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_227);
-    stringBuffer.append(genDataType.getName());
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_228);
-    if (genDataType instanceof GenEnum) {
+    stringBuffer.append(genDataType.getName());
     stringBuffer.append(TEXT_229);
-    stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
+    if (genDataType instanceof GenEnum) {
     stringBuffer.append(TEXT_230);
     stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
     stringBuffer.append(TEXT_231);
+    stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
+    stringBuffer.append(TEXT_232);
     stringBuffer.append(genModel.getNonNLS());
     stringBuffer.append(genModel.getNonNLS(2));
     stringBuffer.append(genModel.getNonNLS(3));
-    stringBuffer.append(TEXT_232);
+    stringBuffer.append(TEXT_233);
     } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); 
     if (genBaseType.getGenPackage() == genPackage) {
-    stringBuffer.append(TEXT_233);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_234);
-    stringBuffer.append(genBaseType.getName());
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_235);
-    } else {
+    stringBuffer.append(genBaseType.getName());
     stringBuffer.append(TEXT_236);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
+    } else {
     stringBuffer.append(TEXT_237);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_238);
-    stringBuffer.append(genBaseType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
     stringBuffer.append(TEXT_239);
+    stringBuffer.append(genBaseType.getName());
+    stringBuffer.append(TEXT_240);
     }
     } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); 
-    stringBuffer.append(TEXT_240);
-    stringBuffer.append(genModel.getImportedName("java.util.List"));
     stringBuffer.append(TEXT_241);
-    stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
+    stringBuffer.append(genModel.getImportedName("java.util.List"));
     stringBuffer.append(TEXT_242);
-    stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
+    stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
     stringBuffer.append(TEXT_243);
     stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
     stringBuffer.append(TEXT_244);
-    if (genItemType.getGenPackage() == genPackage) {
+    stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
     stringBuffer.append(TEXT_245);
-    stringBuffer.append(genItemType.getName());
+    if (genItemType.getGenPackage() == genPackage) {
     stringBuffer.append(TEXT_246);
-    } else {
+    stringBuffer.append(genItemType.getName());
     stringBuffer.append(TEXT_247);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
+    } else {
     stringBuffer.append(TEXT_248);
-    stringBuffer.append(genItemType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
     stringBuffer.append(TEXT_249);
-    }
+    stringBuffer.append(genItemType.getName());
     stringBuffer.append(TEXT_250);
-    } else if (!genDataType.getMemberTypes().isEmpty()) {
+    }
     stringBuffer.append(TEXT_251);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
+    } else if (!genDataType.getMemberTypes().isEmpty()) {
     stringBuffer.append(TEXT_252);
-    for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_253);
-    if (genMemberType.getGenPackage() == genPackage) {
+    for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
     stringBuffer.append(TEXT_254);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
+    if (genMemberType.getGenPackage() == genPackage) {
     stringBuffer.append(TEXT_255);
-    stringBuffer.append(genMemberType.getName());
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_256);
-    } else {
+    stringBuffer.append(genMemberType.getName());
     stringBuffer.append(TEXT_257);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
+    } else {
     stringBuffer.append(TEXT_258);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_259);
-    stringBuffer.append(genMemberType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
     stringBuffer.append(TEXT_260);
-    }
+    stringBuffer.append(genMemberType.getName());
     stringBuffer.append(TEXT_261);
     }
     stringBuffer.append(TEXT_262);
-    } else if (genDataType.isArrayType()) {
+    }
     stringBuffer.append(TEXT_263);
-    stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
+    } else if (genDataType.isArrayType()) {
     stringBuffer.append(TEXT_264);
-    } else {
+    stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
     stringBuffer.append(TEXT_265);
-    stringBuffer.append(genDataType.getObjectInstanceClassName());
+    } else {
     stringBuffer.append(TEXT_266);
-    stringBuffer.append(genDataType.getClassifierID());
+    stringBuffer.append(genDataType.getObjectInstanceClassName());
     stringBuffer.append(TEXT_267);
-    }
+    stringBuffer.append(genDataType.getClassifierID());
     stringBuffer.append(TEXT_268);
-    stringBuffer.append(genDataType.getName());
+    }
     stringBuffer.append(TEXT_269);
-    if (genDataType instanceof GenEnum) {
+    stringBuffer.append(genDataType.getName());
     stringBuffer.append(TEXT_270);
+    if (genDataType instanceof GenEnum) {
+    stringBuffer.append(TEXT_271);
     } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); 
     if (genBaseType.getGenPackage() == genPackage) {
-    stringBuffer.append(TEXT_271);
-    stringBuffer.append(genBaseType.getName());
     stringBuffer.append(TEXT_272);
-    } else {
+    stringBuffer.append(genBaseType.getName());
     stringBuffer.append(TEXT_273);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
+    } else {
     stringBuffer.append(TEXT_274);
-    stringBuffer.append(genBaseType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
     stringBuffer.append(TEXT_275);
+    stringBuffer.append(genBaseType.getName());
+    stringBuffer.append(TEXT_276);
     }
     } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); 
-    stringBuffer.append(TEXT_276);
-    stringBuffer.append(genModel.getImportedName("java.util.List"));
     stringBuffer.append(TEXT_277);
     stringBuffer.append(genModel.getImportedName("java.util.List"));
     stringBuffer.append(TEXT_278);
-    stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
+    stringBuffer.append(genModel.getImportedName("java.util.List"));
     stringBuffer.append(TEXT_279);
     stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
     stringBuffer.append(TEXT_280);
-    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
+    stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
     stringBuffer.append(TEXT_281);
-    if (genItemType.getGenPackage() == genPackage) {
+    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
     stringBuffer.append(TEXT_282);
-    stringBuffer.append(genItemType.getName());
+    if (genItemType.getGenPackage() == genPackage) {
     stringBuffer.append(TEXT_283);
-    } else {
+    stringBuffer.append(genItemType.getName());
     stringBuffer.append(TEXT_284);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
+    } else {
     stringBuffer.append(TEXT_285);
-    stringBuffer.append(genItemType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
     stringBuffer.append(TEXT_286);
-    }
+    stringBuffer.append(genItemType.getName());
     stringBuffer.append(TEXT_287);
-    } else if (!genDataType.getMemberTypes().isEmpty()) {
+    }
     stringBuffer.append(TEXT_288);
-    for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
+    } else if (!genDataType.getMemberTypes().isEmpty()) {
     stringBuffer.append(TEXT_289);
-    stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
+    for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
     stringBuffer.append(TEXT_290);
-    if (genMemberType.getGenPackage() == genPackage) {
+    stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
     stringBuffer.append(TEXT_291);
-    stringBuffer.append(genMemberType.getName());
+    if (genMemberType.getGenPackage() == genPackage) {
     stringBuffer.append(TEXT_292);
-    } else {
+    stringBuffer.append(genMemberType.getName());
     stringBuffer.append(TEXT_293);
-    stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
+    } else {
     stringBuffer.append(TEXT_294);
-    stringBuffer.append(genMemberType.getName());
+    stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
     stringBuffer.append(TEXT_295);
-    }
+    stringBuffer.append(genMemberType.getName());
     stringBuffer.append(TEXT_296);
     }
     stringBuffer.append(TEXT_297);
-    stringBuffer.append(genDataType.getName());
+    }
     stringBuffer.append(TEXT_298);
-    } else if (genDataType.isArrayType()) {
+    stringBuffer.append(genDataType.getName());
     stringBuffer.append(TEXT_299);
-    stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
+    } else if (genDataType.isArrayType()) {
     stringBuffer.append(TEXT_300);
-    } else {
+    stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
     stringBuffer.append(TEXT_301);
-    stringBuffer.append(genDataType.getClassifierID());
+    } else {
     stringBuffer.append(TEXT_302);
-    }
+    stringBuffer.append(genDataType.getClassifierID());
     stringBuffer.append(TEXT_303);
     }
+    stringBuffer.append(TEXT_304);
+    }
     }
     } else {
     for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
     if (genClass.hasFactoryInterfaceCreateMethod()) {
-    stringBuffer.append(TEXT_304);
-    stringBuffer.append(genClass.getFormattedName());
     stringBuffer.append(TEXT_305);
     stringBuffer.append(genClass.getFormattedName());
     stringBuffer.append(TEXT_306);
-    stringBuffer.append(genClass.getImportedInterfaceName());
+    stringBuffer.append(genClass.getFormattedName());
     stringBuffer.append(TEXT_307);
-    stringBuffer.append(genClass.getName());
+    stringBuffer.append(genClass.getImportedInterfaceName());
     stringBuffer.append(TEXT_308);
+    stringBuffer.append(genClass.getName());
+    stringBuffer.append(TEXT_309);
     }
     }
-    stringBuffer.append(TEXT_309);
+    stringBuffer.append(TEXT_310);
     if (genPackage.isDataTypeConverters()) {
     for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
     if (genDataType.isSerializable()) {
-    stringBuffer.append(TEXT_310);
-    stringBuffer.append(genDataType.getFormattedName());
     stringBuffer.append(TEXT_311);
-    stringBuffer.append(genDataType.getImportedInstanceClassName());
+    stringBuffer.append(genDataType.getFormattedName());
     stringBuffer.append(TEXT_312);
-    stringBuffer.append(genDataType.getName());
+    stringBuffer.append(genDataType.getImportedInstanceClassName());
     stringBuffer.append(TEXT_313);
-    stringBuffer.append(genDataType.getFormattedName());
-    stringBuffer.append(TEXT_314);
     stringBuffer.append(genDataType.getName());
+    stringBuffer.append(TEXT_314);
+    stringBuffer.append(genDataType.getFormattedName());
     stringBuffer.append(TEXT_315);
-    stringBuffer.append(genDataType.getImportedInstanceClassName());
+    stringBuffer.append(genDataType.getName());
     stringBuffer.append(TEXT_316);
+    stringBuffer.append(genDataType.getImportedInstanceClassName());
+    stringBuffer.append(TEXT_317);
     }
     }
     }
     }
-    stringBuffer.append(TEXT_317);
+    stringBuffer.append(TEXT_318);
     stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName());
     genModel.emitSortedImports();
-    stringBuffer.append(TEXT_318);
+    stringBuffer.append(TEXT_319);
     return stringBuffer.toString();
   }
 }

Modified: incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet?rev=573320&r1=573319&r2=573320&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet Thu Sep  6 09:36:11 2007
@@ -398,7 +398,8 @@
           <%for (Iterator k = packageAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);%>
 			 <%=key%>, <%=value%><%=k.hasNext() ? "," : ""%><%=genModel.getNonNLS(key + value)%>
           <%}%>
-			 });
+			 },
+			 "<%=packageAnnotation.getSource()%>");
 
       <%}%>
 

Modified: incubator/tuscany/java/sdo/toolsTest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/toolsTest/pom.xml?rev=573320&r1=573319&r2=573320&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/toolsTest/pom.xml (original)
+++ incubator/tuscany/java/sdo/toolsTest/pom.xml Thu Sep  6 09:36:11 2007
@@ -137,6 +137,15 @@
                             <goal>generate</goal>
                         </goals>
                     </execution>
+                    <execution>
+                        <id>SimpleNoTns</id>
+                        <configuration>
+                            <schemaFile>${basedir}/src/main/resources/simpleNoTns.xsd</schemaFile>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>

Added: incubator/tuscany/java/sdo/toolsTest/src/main/resources/simpleNoTns.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/toolsTest/src/main/resources/simpleNoTns.xsd?rev=573320&view=auto
==============================================================================
--- incubator/tuscany/java/sdo/toolsTest/src/main/resources/simpleNoTns.xsd (added)
+++ incubator/tuscany/java/sdo/toolsTest/src/main/resources/simpleNoTns.xsd Thu Sep  6 09:36:11 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.    
+ -->
+<xsd:schema 
+	xmlns="http://www.example.com/simpleNoTns"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  
+   <xsd:complexType name="Quote">
+       <xsd:sequence>
+          <xsd:element name="symbol" type="xsd:string"/>
+          <xsd:element name="companyName" type="xsd:string"/>
+          <xsd:element name="price" type="xsd:decimal"/>
+          <xsd:element name="open1" type="xsd:decimal"/>
+          <xsd:element name="high" type="xsd:decimal"/>
+          <xsd:element name="low" type="xsd:decimal"/>
+          <xsd:element name="volume" type="xsd:double"/>
+          <xsd:element name="change1" type="xsd:double"/>
+       </xsd:sequence>
+   </xsd:complexType>
+
+</xsd:schema>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message