You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/02/26 15:32:49 UTC
svn commit: r511815 [3/6] - in /incubator/tuscany/java/sdo:
impl/src/main/java/org/apache/tuscany/sdo/helper/
impl/src/main/java/org/apache/tuscany/sdo/impl/
impl/src/main/java/org/apache/tuscany/sdo/util/
impl/src/main/java/org/apache/tuscany/sdo/util...
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?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -149,217 +149,215 @@
protected final String TEXT_109 = ".freeze(); //FB do we need to freeze / should we freeze ????" + NL + "" + NL + "\t\treturn the";
protected final String TEXT_110 = ";" + NL + "\t}" + NL + " " + NL + "\tprivate boolean isCreated = false;" + NL + "" + NL + "\tpublic void createMetaData()" + NL + "\t{" + NL + "\t\tif (isCreated) return;" + NL + "\t\tisCreated = true;";
protected final String TEXT_111 = "\t" + NL + "" + NL + "\t\t// Create types and their properties";
- protected final String TEXT_112 = NL + "\t\t";
+ protected final String TEXT_112 = NL + " ";
protected final String TEXT_113 = "Type = createType(false, ";
protected final String TEXT_114 = ");";
protected final String TEXT_115 = NL + "\t\tcreateProperty(";
protected final String TEXT_116 = ", ";
- protected final String TEXT_117 = "Type, ";
- protected final String TEXT_118 = ".";
- protected final String TEXT_119 = ");";
- protected final String TEXT_120 = NL;
- protected final String TEXT_121 = NL + NL + "\t\t// Create data types";
- protected final String TEXT_122 = NL + "\t\t";
- protected final String TEXT_123 = "Type = createType(true, ";
- protected final String TEXT_124 = " );";
- protected final String TEXT_125 = NL + "\t}" + NL + "\t" + NL + "\tprivate boolean isInitialized = false;" + NL + "" + NL + "\tpublic void initializeMetaData()" + NL + "\t{" + NL + "\t\tif (isInitialized) return;" + NL + "\t\tisInitialized = true;";
- protected final String TEXT_126 = NL + NL + "\t\t// Obtain other dependent packages";
- protected final String TEXT_127 = NL + "\t\t";
- protected final String TEXT_128 = " ";
- protected final String TEXT_129 = " = (";
- protected final String TEXT_130 = ")FactoryBase.getStaticFactory(";
- protected final String TEXT_131 = ".NAMESPACE_URI);";
- protected final String TEXT_132 = NL + "\t\t";
- protected final String TEXT_133 = " property = null;" + NL + "" + NL + "\t\t// Add supertypes to types";
- protected final String TEXT_134 = NL + "\t\taddSuperType(";
- protected final String TEXT_135 = "Type, ";
- protected final String TEXT_136 = "Type);";
- protected final String TEXT_137 = NL + NL + "\t\t// Initialize types and properties";
- protected final String TEXT_138 = NL + "\t\tinitializeType(";
- protected final String TEXT_139 = "Type, ";
- protected final String TEXT_140 = ".class, \"";
- protected final String TEXT_141 = "\", ";
- protected final String TEXT_142 = ");";
- protected final String TEXT_143 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_144 = "Type, \"";
- protected final String TEXT_145 = "\", ";
- protected final String TEXT_146 = ", ";
- protected final String TEXT_147 = ");";
- protected final String TEXT_148 = NL + "\t\tproperty = (";
- protected final String TEXT_149 = ")";
- protected final String TEXT_150 = "Type.getProperties().get(";
- protected final String TEXT_151 = ".";
- protected final String TEXT_152 = ");";
- protected final String TEXT_153 = NL + "\t\tinitializeProperty(property, ";
- protected final String TEXT_154 = ", \"";
- protected final String TEXT_155 = "\", ";
+ protected final String TEXT_117 = "Type,";
+ protected final String TEXT_118 = ".INTERNAL_";
+ protected final String TEXT_119 = "); ";
+ protected final String TEXT_120 = NL + NL + "\t\t// Create data types";
+ protected final String TEXT_121 = NL + "\t\t";
+ protected final String TEXT_122 = "Type = createType(true, ";
+ protected final String TEXT_123 = " );";
+ protected final String TEXT_124 = NL + "\t}" + NL + "\t" + NL + "\tprivate boolean isInitialized = false;" + NL + "" + NL + "\tpublic void initializeMetaData()" + NL + "\t{" + NL + "\t\tif (isInitialized) return;" + NL + "\t\tisInitialized = true;";
+ protected final String TEXT_125 = NL + NL + "\t\t// Obtain other dependent packages";
+ protected final String TEXT_126 = NL + "\t\t";
+ protected final String TEXT_127 = " ";
+ protected final String TEXT_128 = " = (";
+ protected final String TEXT_129 = ")FactoryBase.getStaticFactory(";
+ protected final String TEXT_130 = ".NAMESPACE_URI);";
+ protected final String TEXT_131 = NL + "\t\t";
+ protected final String TEXT_132 = " property = null;" + NL + "" + NL + "\t\t// Add supertypes to types";
+ protected final String TEXT_133 = NL + "\t\taddSuperType(";
+ protected final String TEXT_134 = "Type, ";
+ protected final String TEXT_135 = "Type);";
+ protected final String TEXT_136 = NL + NL + "\t\t// Initialize types and properties";
+ protected final String TEXT_137 = NL + "\t\tinitializeType(";
+ protected final String TEXT_138 = "Type, ";
+ protected final String TEXT_139 = ".class, \"";
+ protected final String TEXT_140 = "\", ";
+ protected final String TEXT_141 = ");";
+ protected final String TEXT_142 = NL + "\t\tsetInstanceProperty (";
+ protected final String TEXT_143 = "Type, \"";
+ protected final String TEXT_144 = "\", ";
+ protected final String TEXT_145 = ", ";
+ protected final String TEXT_146 = ");";
+ protected final String TEXT_147 = NL + "\t\tproperty = getProperty(";
+ protected final String TEXT_148 = "Type, ";
+ protected final String TEXT_149 = ".INTERNAL_";
+ protected final String TEXT_150 = ");";
+ protected final String TEXT_151 = NL + "\t\tinitializeProperty(property, ";
+ protected final String TEXT_152 = ", \"";
+ protected final String TEXT_153 = "\", ";
+ protected final String TEXT_154 = ", ";
+ protected final String TEXT_155 = ", ";
protected final String TEXT_156 = ", ";
protected final String TEXT_157 = ", ";
protected final String TEXT_158 = ", ";
protected final String TEXT_159 = ", ";
protected final String TEXT_160 = ", ";
- protected final String TEXT_161 = ", ";
- protected final String TEXT_162 = ", ";
- protected final String TEXT_163 = ", ";
- protected final String TEXT_164 = ");";
- protected final String TEXT_165 = NL + "\t\tinitializeProperty(property, ";
- protected final String TEXT_166 = ", \"";
- protected final String TEXT_167 = "\", ";
+ protected final String TEXT_161 = " , ";
+ protected final String TEXT_162 = ");";
+ protected final String TEXT_163 = NL + "\t\tinitializeProperty(property, ";
+ protected final String TEXT_164 = ", \"";
+ protected final String TEXT_165 = "\", ";
+ protected final String TEXT_166 = ", ";
+ protected final String TEXT_167 = ", ";
protected final String TEXT_168 = ", ";
protected final String TEXT_169 = ", ";
protected final String TEXT_170 = ", ";
protected final String TEXT_171 = ", ";
- protected final String TEXT_172 = ", ";
- protected final String TEXT_173 = ", ";
- protected final String TEXT_174 = ");";
- protected final String TEXT_175 = NL + "\t\tsetInstanceProperty (property, \"";
- protected final String TEXT_176 = "\", ";
- protected final String TEXT_177 = ", ";
- protected final String TEXT_178 = ");";
- protected final String TEXT_179 = NL;
- protected final String TEXT_180 = NL + "\t\t// Initialize data types";
- protected final String TEXT_181 = NL + "\t\tinitializeType(";
- protected final String TEXT_182 = "Type, ";
- protected final String TEXT_183 = ".class, \"";
- protected final String TEXT_184 = "\", ";
- protected final String TEXT_185 = ", ";
- protected final String TEXT_186 = ");";
- protected final String TEXT_187 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_188 = "Type, \"";
- protected final String TEXT_189 = "\", ";
- protected final String TEXT_190 = ", ";
- protected final String TEXT_191 = ");";
- protected final String TEXT_192 = NL;
- protected final String TEXT_193 = NL + "\t\tcreateXSDMetaData(";
- protected final String TEXT_194 = ");" + NL + "\t}" + NL + "\t " + NL + "\tprotected void createXSDMetaData(";
- protected final String TEXT_195 = ")" + NL + "\t{" + NL + "\t\tsuper.initXSD();" + NL + "\t\t" + NL + "\t\t";
- protected final String TEXT_196 = " property = null;" + NL + "\t\t";
- protected final String TEXT_197 = NL + "\t\taddXSDMapping" + NL + "\t\t (new String[]" + NL + "\t\t\t {";
- protected final String TEXT_198 = NL + "\t\t\t ";
- protected final String TEXT_199 = ", ";
- protected final String TEXT_200 = NL + "\t\t\t });" + NL;
- protected final String TEXT_201 = NL + "\t\taddXSDMapping" + NL + "\t\t (";
- protected final String TEXT_202 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
- protected final String TEXT_203 = NL + "\t\t\t ";
- protected final String TEXT_204 = ", ";
- protected final String TEXT_205 = NL + "\t\t\t });" + NL;
- protected final String TEXT_206 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t (\"";
- protected final String TEXT_207 = "\"," + NL + "\t\t ";
- protected final String TEXT_208 = ".get";
- protected final String TEXT_209 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_210 = NL + "\t\t\t ";
- protected final String TEXT_211 = ", ";
- protected final String TEXT_212 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
- protected final String TEXT_213 = NL + "\t\t\t });";
- protected final String TEXT_214 = NL + " ";
- protected final String TEXT_215 = NL + "\t\tsetInstanceProperty" + NL + "\t\t (property," + NL + "\t\t\t \"";
- protected final String TEXT_216 = "\"," + NL + "\t\t\t ";
- protected final String TEXT_217 = ", ";
- protected final String TEXT_218 = ");";
- protected final String TEXT_219 = NL + " ";
- protected final String TEXT_220 = " ";
- protected final String TEXT_221 = NL + "\t\taddXSDMapping" + NL + "\t\t ((";
- protected final String TEXT_222 = ")";
- protected final String TEXT_223 = "Type.getProperties().get(";
- protected final String TEXT_224 = ".";
- protected final String TEXT_225 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_226 = NL + "\t\t\t ";
- protected final String TEXT_227 = ", ";
- protected final String TEXT_228 = NL + "\t\t\t });" + NL;
- protected final String TEXT_229 = NL + " }" + NL + " ";
- protected final String TEXT_230 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_231 = " create";
- protected final String TEXT_232 = "FromString(String initialValue)" + NL + "\t{";
- protected final String TEXT_233 = NL + "\t\t";
- protected final String TEXT_234 = " result = ";
- protected final String TEXT_235 = ".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_236 = NL + "\t\treturn result;";
- protected final String TEXT_237 = NL + "\t\treturn (";
- protected final String TEXT_238 = ")create";
- protected final String TEXT_239 = "FromString(initialValue);";
- protected final String TEXT_240 = NL + "\t\treturn (";
- protected final String TEXT_241 = ")";
- protected final String TEXT_242 = ".create";
- protected final String TEXT_243 = "FromString(initialValue);";
- protected final String TEXT_244 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_245 = " result = new ";
- protected final String TEXT_246 = "();" + NL + "\t\tfor (";
- protected final String TEXT_247 = " stringTokenizer = new ";
- protected final String TEXT_248 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
- protected final String TEXT_249 = NL + "\t\t\tresult.add(create";
- protected final String TEXT_250 = "FromString(item));";
- protected final String TEXT_251 = NL + "\t\t\tresult.add(";
- protected final String TEXT_252 = ".create";
- protected final String TEXT_253 = "FromString(item));";
- protected final String TEXT_254 = NL + "\t\t}" + NL + "\t\treturn result;";
- protected final String TEXT_255 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_256 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
- protected final String TEXT_257 = NL + "\t\ttry" + NL + "\t\t{";
- protected final String TEXT_258 = NL + "\t\t\tresult = (";
- protected final String TEXT_259 = ")create";
- protected final String TEXT_260 = "FromString(initialValue);";
- protected final String TEXT_261 = NL + "\t\t\tresult = (";
- protected final String TEXT_262 = ")";
- protected final String TEXT_263 = ".create";
- protected final String TEXT_264 = "FromString(initialValue);";
- protected final String TEXT_265 = 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_266 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;";
- protected final String TEXT_267 = 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_268 = "();";
- protected final String TEXT_269 = NL + "\t\treturn (";
- protected final String TEXT_270 = ")super.createFromString(";
- protected final String TEXT_271 = ", initialValue);";
- protected final String TEXT_272 = 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_273 = "ToString(Object instanceValue)" + NL + "\t{";
- protected final String TEXT_274 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
- protected final String TEXT_275 = NL + "\t\treturn convert";
- protected final String TEXT_276 = "ToString(instanceValue);";
- protected final String TEXT_277 = NL + "\t\treturn ";
- protected final String TEXT_278 = ".convert";
- protected final String TEXT_279 = "ToString(instanceValue);";
- protected final String TEXT_280 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_281 = " list = (";
- protected final String TEXT_282 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
- protected final String TEXT_283 = " result = new ";
- protected final String TEXT_284 = "();" + NL + "\t\tfor (";
- protected final String TEXT_285 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
- protected final String TEXT_286 = NL + "\t\t\tresult.append(convert";
- protected final String TEXT_287 = "ToString(i.next()));";
- protected final String TEXT_288 = NL + "\t\t\tresult.append(";
- protected final String TEXT_289 = ".convert";
- protected final String TEXT_290 = "ToString(i.next()));";
- protected final String TEXT_291 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
- protected final String TEXT_292 = NL + "\t\tif (instanceValue == null) return null;";
- protected final String TEXT_293 = NL + "\t\tif (";
- protected final String TEXT_294 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
- protected final String TEXT_295 = NL + "\t\t\t\tString value = convert";
- protected final String TEXT_296 = "ToString(instanceValue);";
- protected final String TEXT_297 = NL + "\t\t\t\tString value = ";
- protected final String TEXT_298 = ".convert";
- protected final String TEXT_299 = "ToString(instanceValue);";
- protected final String TEXT_300 = 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_301 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
- protected final String TEXT_302 = "\");";
- protected final String TEXT_303 = 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_304 = "();";
- protected final String TEXT_305 = NL + "\t\treturn super.convertToString(";
- protected final String TEXT_306 = ", instanceValue);";
- protected final String TEXT_307 = NL + "\t}" + NL;
- protected final String TEXT_308 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
- protected final String TEXT_309 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
- protected final String TEXT_310 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
- protected final String TEXT_311 = " create";
- protected final String TEXT_312 = "();" + NL;
- protected final String TEXT_313 = 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_314 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
- protected final String TEXT_315 = "</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_316 = " create";
- protected final String TEXT_317 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
- protected final String TEXT_318 = "</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_319 = "(";
- protected final String TEXT_320 = " instanceValue);" + NL;
- protected final String TEXT_321 = NL + "} //";
- protected final String TEXT_322 = NL;
+ protected final String TEXT_172 = ");";
+ protected final String TEXT_173 = NL + "\t\tsetInstanceProperty (property, \"";
+ protected final String TEXT_174 = "\", ";
+ protected final String TEXT_175 = ", ";
+ protected final String TEXT_176 = ");";
+ protected final String TEXT_177 = NL;
+ protected final String TEXT_178 = NL + "\t\t// Initialize data types";
+ protected final String TEXT_179 = NL + "\t\tinitializeType(";
+ protected final String TEXT_180 = "Type, ";
+ protected final String TEXT_181 = ".class, \"";
+ protected final String TEXT_182 = "\", ";
+ protected final String TEXT_183 = ", ";
+ protected final String TEXT_184 = ");";
+ protected final String TEXT_185 = NL + "\t\tsetInstanceProperty (";
+ protected final String TEXT_186 = "Type, \"";
+ protected final String TEXT_187 = "\", ";
+ protected final String TEXT_188 = ", ";
+ protected final String TEXT_189 = ");";
+ protected final String TEXT_190 = NL;
+ protected final String TEXT_191 = NL + "\t\tcreateXSDMetaData(";
+ protected final String TEXT_192 = ");" + NL + "\t}" + NL + "\t " + NL + "\tprotected void createXSDMetaData(";
+ protected final String TEXT_193 = ")" + NL + "\t{" + NL + "\t\tsuper.initXSD();" + NL + "\t\t" + NL + "\t\t";
+ protected final String TEXT_194 = " property = null;" + NL + "\t\t";
+ protected final String TEXT_195 = NL + "\t\taddXSDMapping" + NL + "\t\t (new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_196 = NL + "\t\t\t ";
+ protected final String TEXT_197 = ", ";
+ protected final String TEXT_198 = NL + "\t\t\t });" + NL;
+ protected final String TEXT_199 = NL;
+ protected final String TEXT_200 = NL + "\t\taddXSDMapping" + NL + "\t\t (";
+ protected final String TEXT_201 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
+ protected final String TEXT_202 = NL + "\t\t\t ";
+ protected final String TEXT_203 = ", ";
+ protected final String TEXT_204 = NL + "\t\t\t });" + NL;
+ protected final String TEXT_205 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t (\"";
+ protected final String TEXT_206 = "\"," + NL + "\t\t ";
+ protected final String TEXT_207 = ".get";
+ protected final String TEXT_208 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_209 = NL + "\t\t\t ";
+ protected final String TEXT_210 = ", ";
+ protected final String TEXT_211 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
+ protected final String TEXT_212 = NL + "\t\t\t });";
+ protected final String TEXT_213 = NL + " ";
+ protected final String TEXT_214 = NL + "\t\tsetInstanceProperty" + NL + "\t\t (property," + NL + "\t\t\t \"";
+ protected final String TEXT_215 = "\"," + NL + "\t\t\t ";
+ protected final String TEXT_216 = ", ";
+ protected final String TEXT_217 = ");";
+ protected final String TEXT_218 = NL + " ";
+ protected final String TEXT_219 = " ";
+ protected final String TEXT_220 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getProperty(";
+ protected final String TEXT_221 = "Type, ";
+ protected final String TEXT_222 = ".INTERNAL_";
+ protected final String TEXT_223 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_224 = NL + "\t\t\t ";
+ protected final String TEXT_225 = ", ";
+ protected final String TEXT_226 = NL + "\t\t\t });" + NL;
+ protected final String TEXT_227 = NL + " }" + NL + " ";
+ protected final String TEXT_228 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_229 = " create";
+ protected final String TEXT_230 = "FromString(String initialValue)" + NL + "\t{";
+ protected final String TEXT_231 = NL + "\t\t";
+ protected final String TEXT_232 = " result = ";
+ protected final String TEXT_233 = ".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_234 = NL + "\t\treturn result;";
+ protected final String TEXT_235 = NL + "\t\treturn (";
+ protected final String TEXT_236 = ")create";
+ protected final String TEXT_237 = "FromString(initialValue);";
+ protected final String TEXT_238 = NL + "\t\treturn (";
+ protected final String TEXT_239 = ")";
+ protected final String TEXT_240 = ".create";
+ protected final String TEXT_241 = "FromString(initialValue);";
+ protected final String TEXT_242 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_243 = " result = new ";
+ protected final String TEXT_244 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_245 = " stringTokenizer = new ";
+ protected final String TEXT_246 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
+ protected final String TEXT_247 = NL + "\t\t\tresult.add(create";
+ protected final String TEXT_248 = "FromString(item));";
+ protected final String TEXT_249 = NL + "\t\t\tresult.add(";
+ protected final String TEXT_250 = ".create";
+ protected final String TEXT_251 = "FromString(item));";
+ protected final String TEXT_252 = NL + "\t\t}" + NL + "\t\treturn result;";
+ protected final String TEXT_253 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_254 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
+ protected final String TEXT_255 = NL + "\t\ttry" + NL + "\t\t{";
+ protected final String TEXT_256 = NL + "\t\t\tresult = (";
+ protected final String TEXT_257 = ")create";
+ protected final String TEXT_258 = "FromString(initialValue);";
+ protected final String TEXT_259 = NL + "\t\t\tresult = (";
+ protected final String TEXT_260 = ")";
+ protected final String TEXT_261 = ".create";
+ protected final String TEXT_262 = "FromString(initialValue);";
+ protected final String TEXT_263 = 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_264 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;";
+ protected final String TEXT_265 = 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_266 = "();";
+ protected final String TEXT_267 = NL + "\t\treturn (";
+ protected final String TEXT_268 = ")super.createFromString(";
+ protected final String TEXT_269 = ", initialValue);";
+ protected final String TEXT_270 = 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_271 = "ToString(Object instanceValue)" + NL + "\t{";
+ protected final String TEXT_272 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
+ protected final String TEXT_273 = NL + "\t\treturn convert";
+ protected final String TEXT_274 = "ToString(instanceValue);";
+ protected final String TEXT_275 = NL + "\t\treturn ";
+ protected final String TEXT_276 = ".convert";
+ protected final String TEXT_277 = "ToString(instanceValue);";
+ protected final String TEXT_278 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_279 = " list = (";
+ protected final String TEXT_280 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
+ protected final String TEXT_281 = " result = new ";
+ protected final String TEXT_282 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_283 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
+ protected final String TEXT_284 = NL + "\t\t\tresult.append(convert";
+ protected final String TEXT_285 = "ToString(i.next()));";
+ protected final String TEXT_286 = NL + "\t\t\tresult.append(";
+ protected final String TEXT_287 = ".convert";
+ protected final String TEXT_288 = "ToString(i.next()));";
+ protected final String TEXT_289 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
+ protected final String TEXT_290 = NL + "\t\tif (instanceValue == null) return null;";
+ protected final String TEXT_291 = NL + "\t\tif (";
+ protected final String TEXT_292 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
+ protected final String TEXT_293 = NL + "\t\t\t\tString value = convert";
+ protected final String TEXT_294 = "ToString(instanceValue);";
+ protected final String TEXT_295 = NL + "\t\t\t\tString value = ";
+ protected final String TEXT_296 = ".convert";
+ protected final String TEXT_297 = "ToString(instanceValue);";
+ protected final String TEXT_298 = 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_299 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
+ protected final String TEXT_300 = "\");";
+ protected final String TEXT_301 = 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_302 = "();";
+ protected final String TEXT_303 = NL + "\t\treturn super.convertToString(";
+ protected final String TEXT_304 = ", instanceValue);";
+ protected final String TEXT_305 = NL + "\t}" + NL;
+ protected final String TEXT_306 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
+ protected final String TEXT_307 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
+ protected final String TEXT_308 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_309 = " create";
+ protected final String TEXT_310 = "();" + NL;
+ protected final String TEXT_311 = 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_312 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
+ protected final String TEXT_313 = "</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_314 = " create";
+ protected final String TEXT_315 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
+ protected final String TEXT_316 = "</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_317 = "(";
+ protected final String TEXT_318 = " instanceValue);" + NL;
+ protected final String TEXT_319 = NL + "} //";
+ protected final String TEXT_320 = NL;
public String generate(Object argument)
{
@@ -387,7 +385,7 @@
GenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel();
boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);
- String factoryPatternVersion = "1.0";
+ String factoryPatternVersion = "1.1";
String publicStaticFinalFlag = isImplementation ? "public static final " : "";
stringBuffer.append(TEXT_1);
stringBuffer.append(TEXT_2);
@@ -661,501 +659,495 @@
stringBuffer.append(genFeature.getUpperName());
stringBuffer.append(TEXT_119);
}
- if (c.hasNext()) {
- stringBuffer.append(TEXT_120);
- }
}
}
}
if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_121);
+ stringBuffer.append(TEXT_120);
for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_122);
+ stringBuffer.append(TEXT_121);
stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_123);
+ stringBuffer.append(TEXT_122);
stringBuffer.append(genPackage.getClassifierID(genDataType));
- stringBuffer.append(TEXT_124);
+ stringBuffer.append(TEXT_123);
}
}
- stringBuffer.append(TEXT_125);
+ stringBuffer.append(TEXT_124);
if (!genPackage.getPackageInitializationDependencies().isEmpty()) {
- stringBuffer.append(TEXT_126);
+ stringBuffer.append(TEXT_125);
for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
- stringBuffer.append(TEXT_127);
+ stringBuffer.append(TEXT_126);
stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_128);
+ stringBuffer.append(TEXT_127);
stringBuffer.append(genPackage.getPackageInstanceVariable(dep));
+ stringBuffer.append(TEXT_128);
+ stringBuffer.append(dep.getImportedFactoryClassName());
stringBuffer.append(TEXT_129);
stringBuffer.append(dep.getImportedFactoryClassName());
stringBuffer.append(TEXT_130);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_131);
}
}
List annotationSources = genPackage.getAnnotationSources();
annotationSources.remove(ExtendedMetaData.ANNOTATION_URI);
- stringBuffer.append(TEXT_132);
+ stringBuffer.append(TEXT_131);
stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_133);
+ stringBuffer.append(TEXT_132);
for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
for (Iterator b=genClass.getBaseGenClasses().iterator(); b.hasNext();) { GenClass baseGenClass = (GenClass)b.next();
- stringBuffer.append(TEXT_134);
+ stringBuffer.append(TEXT_133);
stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_135);
+ stringBuffer.append(TEXT_134);
stringBuffer.append(baseGenClass.getSafeUncapName());
- stringBuffer.append(TEXT_136);
+ stringBuffer.append(TEXT_135);
}
}
- stringBuffer.append(TEXT_137);
+ stringBuffer.append(TEXT_136);
for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
if (!genClass.isDynamic()) {
- stringBuffer.append(TEXT_138);
+ stringBuffer.append(TEXT_137);
stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_139);
+ stringBuffer.append(TEXT_138);
stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_140);
+ stringBuffer.append(TEXT_139);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_141);
+ stringBuffer.append(TEXT_140);
stringBuffer.append(genClass.isAbstract());
- stringBuffer.append(TEXT_142);
+ stringBuffer.append(TEXT_141);
for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
EAnnotation classAnnotation = genClass.getEcoreClassifier().getEAnnotation(annotationSource);
if (classAnnotation != null) {
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_143);
+ stringBuffer.append(TEXT_142);
stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_144);
+ stringBuffer.append(TEXT_143);
stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_145);
+ stringBuffer.append(TEXT_144);
stringBuffer.append(key);
- stringBuffer.append(TEXT_146);
+ stringBuffer.append(TEXT_145);
stringBuffer.append(value);
stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_147);
+ stringBuffer.append(TEXT_146);
}
}
}
for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next();
String type = genFeature.getType().equals("commonj.sdo.Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()";
- stringBuffer.append(TEXT_148);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_149);
+ stringBuffer.append(TEXT_147);
stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_150);
+ stringBuffer.append(TEXT_148);
stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_151);
+ stringBuffer.append(TEXT_149);
stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_152);
+ stringBuffer.append(TEXT_150);
if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();
String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";
- stringBuffer.append(TEXT_153);
+ stringBuffer.append(TEXT_151);
stringBuffer.append(type);
+ stringBuffer.append(TEXT_152);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_153);
+ stringBuffer.append(genFeature.getDefaultValue());
stringBuffer.append(TEXT_154);
- stringBuffer.append(genFeature.getName());
+ stringBuffer.append(genFeature.getLowerBound());
stringBuffer.append(TEXT_155);
- stringBuffer.append(genFeature.getDefaultValue());
+ stringBuffer.append(genFeature.getUpperBound());
stringBuffer.append(TEXT_156);
- stringBuffer.append(genFeature.getLowerBound());
+ stringBuffer.append(genFeature.getContainerClass());
stringBuffer.append(TEXT_157);
- stringBuffer.append(genFeature.getUpperBound());
+ stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
stringBuffer.append(TEXT_158);
- stringBuffer.append(genFeature.getContainerClass());
+ stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
stringBuffer.append(TEXT_159);
- stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
+ stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
stringBuffer.append(TEXT_160);
- stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
+ stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false");
stringBuffer.append(TEXT_161);
- stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
+ stringBuffer.append(reverse);
stringBuffer.append(TEXT_162);
- stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false");
+ }else{
stringBuffer.append(TEXT_163);
- stringBuffer.append(reverse);
+ stringBuffer.append(type);
stringBuffer.append(TEXT_164);
- }else{
+ stringBuffer.append(genFeature.getSafeName());
stringBuffer.append(TEXT_165);
- stringBuffer.append(type);
- stringBuffer.append(TEXT_166);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_167);
stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_168);
+ stringBuffer.append(TEXT_166);
stringBuffer.append(genFeature.getLowerBound());
- stringBuffer.append(TEXT_169);
+ stringBuffer.append(TEXT_167);
stringBuffer.append(genFeature.getUpperBound());
- stringBuffer.append(TEXT_170);
+ stringBuffer.append(TEXT_168);
stringBuffer.append(genFeature.getContainerClass());
- stringBuffer.append(TEXT_171);
+ stringBuffer.append(TEXT_169);
stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
- stringBuffer.append(TEXT_172);
+ stringBuffer.append(TEXT_170);
stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
- stringBuffer.append(TEXT_173);
+ stringBuffer.append(TEXT_171);
stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
- stringBuffer.append(TEXT_174);
+ stringBuffer.append(TEXT_172);
}
for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
if (featureAnnotation != null) {
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_175);
+ stringBuffer.append(TEXT_173);
stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_176);
+ stringBuffer.append(TEXT_174);
stringBuffer.append(key);
- stringBuffer.append(TEXT_177);
+ stringBuffer.append(TEXT_175);
stringBuffer.append(value);
stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_178);
+ stringBuffer.append(TEXT_176);
}
}
}
+ stringBuffer.append(TEXT_177);
}
- stringBuffer.append(TEXT_179);
}
}
if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_180);
+ stringBuffer.append(TEXT_178);
for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_181);
+ stringBuffer.append(TEXT_179);
stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_182);
+ stringBuffer.append(TEXT_180);
stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_183);
+ stringBuffer.append(TEXT_181);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_184);
+ stringBuffer.append(TEXT_182);
stringBuffer.append(genDataType.getSerializableFlag().equals("IS_SERIALIZABLE") ? "true" : "false");
- stringBuffer.append(TEXT_185);
+ stringBuffer.append(TEXT_183);
stringBuffer.append(genDataType.getGeneratedInstanceClassFlag().equals("IS_GENERATED_INSTANCE_CLASS") ? "true" : "false" );
- stringBuffer.append(TEXT_186);
+ stringBuffer.append(TEXT_184);
stringBuffer.append(genModel.getNonNLS());
for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
EAnnotation dataTypeAnnotation = genDataType.getEcoreDataType().getEAnnotation(annotationSource);
if (dataTypeAnnotation != null) {
for (Iterator k = dataTypeAnnotation.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_187);
+ stringBuffer.append(TEXT_185);
stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_188);
+ stringBuffer.append(TEXT_186);
stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_189);
+ stringBuffer.append(TEXT_187);
stringBuffer.append(key);
- stringBuffer.append(TEXT_190);
+ stringBuffer.append(TEXT_188);
stringBuffer.append(value);
stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_191);
+ stringBuffer.append(TEXT_189);
}
}
}
- stringBuffer.append(TEXT_192);
+ stringBuffer.append(TEXT_190);
}
}
- stringBuffer.append(TEXT_193);
+ stringBuffer.append(TEXT_191);
stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, false));
- stringBuffer.append(TEXT_194);
+ stringBuffer.append(TEXT_192);
stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, true));
- stringBuffer.append(TEXT_195);
+ stringBuffer.append(TEXT_193);
stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_196);
+ stringBuffer.append(TEXT_194);
String extendedMetaDataSource = ExtendedMetaData.ANNOTATION_URI;
EAnnotation packageAnnotation = genPackage.getEcorePackage().getEAnnotation(extendedMetaDataSource);
if (packageAnnotation != null){
- stringBuffer.append(TEXT_197);
+ stringBuffer.append(TEXT_195);
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);
- stringBuffer.append(TEXT_198);
+ stringBuffer.append(TEXT_196);
stringBuffer.append(key);
- stringBuffer.append(TEXT_199);
+ stringBuffer.append(TEXT_197);
stringBuffer.append(value);
stringBuffer.append(k.hasNext() ? "," : "");
stringBuffer.append(genModel.getNonNLS(key + value));
}
- stringBuffer.append(TEXT_200);
+ stringBuffer.append(TEXT_198);
}
+ stringBuffer.append(TEXT_199);
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_201);
+ stringBuffer.append(TEXT_200);
stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_202);
+ stringBuffer.append(TEXT_201);
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_203);
+ stringBuffer.append(TEXT_202);
stringBuffer.append(key);
- stringBuffer.append(TEXT_204);
+ stringBuffer.append(TEXT_203);
stringBuffer.append(value);
stringBuffer.append(k.hasNext() ? "," : "");
stringBuffer.append(genModel.getNonNLS(key + value));
}
- stringBuffer.append(TEXT_205);
+ stringBuffer.append(TEXT_204);
}
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_206);
+ stringBuffer.append(TEXT_205);
stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_207);
+ stringBuffer.append(TEXT_206);
stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
- stringBuffer.append(TEXT_208);
+ stringBuffer.append(TEXT_207);
stringBuffer.append(genFeature.getTypeClassifierAccessorName());
- stringBuffer.append(TEXT_209);
+ stringBuffer.append(TEXT_208);
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_210);
+ stringBuffer.append(TEXT_209);
stringBuffer.append(key);
- stringBuffer.append(TEXT_211);
+ stringBuffer.append(TEXT_210);
stringBuffer.append(value);
stringBuffer.append(k.hasNext() ? "," : "");
stringBuffer.append(genModel.getNonNLS(key + value));
}
if (!genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_212);
+ stringBuffer.append(TEXT_211);
} else {
- stringBuffer.append(TEXT_213);
+ stringBuffer.append(TEXT_212);
}
- stringBuffer.append(TEXT_214);
+ stringBuffer.append(TEXT_213);
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_215);
+ stringBuffer.append(TEXT_214);
stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_216);
+ stringBuffer.append(TEXT_215);
stringBuffer.append(key);
- stringBuffer.append(TEXT_217);
+ stringBuffer.append(TEXT_216);
stringBuffer.append(value);
stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_218);
+ stringBuffer.append(TEXT_217);
}
- stringBuffer.append(TEXT_219);
+ stringBuffer.append(TEXT_218);
}
}
- stringBuffer.append(TEXT_220);
+ stringBuffer.append(TEXT_219);
}
}
} else {
- stringBuffer.append(TEXT_221);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_222);
+ stringBuffer.append(TEXT_220);
stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_223);
+ stringBuffer.append(TEXT_221);
stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_224);
+ stringBuffer.append(TEXT_222);
stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_225);
+ stringBuffer.append(TEXT_223);
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_226);
+ stringBuffer.append(TEXT_224);
stringBuffer.append(key);
- stringBuffer.append(TEXT_227);
+ stringBuffer.append(TEXT_225);
stringBuffer.append(value);
stringBuffer.append(k.hasNext() ? "," : "");
stringBuffer.append(genModel.getNonNLS(key + value));
}
- stringBuffer.append(TEXT_228);
+ stringBuffer.append(TEXT_226);
}
}
}
}
- stringBuffer.append(TEXT_229);
+ stringBuffer.append(TEXT_227);
for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_230);
+ stringBuffer.append(TEXT_228);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_231);
+ stringBuffer.append(TEXT_229);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_232);
+ stringBuffer.append(TEXT_230);
if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_233);
+ stringBuffer.append(TEXT_231);
stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_234);
+ stringBuffer.append(TEXT_232);
stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_235);
+ stringBuffer.append(TEXT_233);
stringBuffer.append(genModel.getNonNLS());
stringBuffer.append(genModel.getNonNLS(2));
stringBuffer.append(genModel.getNonNLS(3));
- stringBuffer.append(TEXT_236);
+ stringBuffer.append(TEXT_234);
} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_237);
+ stringBuffer.append(TEXT_235);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_238);
+ stringBuffer.append(TEXT_236);
stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_239);
+ stringBuffer.append(TEXT_237);
} else {
- stringBuffer.append(TEXT_240);
+ stringBuffer.append(TEXT_238);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_241);
+ stringBuffer.append(TEXT_239);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_242);
+ stringBuffer.append(TEXT_240);
stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_243);
+ stringBuffer.append(TEXT_241);
}
} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_244);
+ stringBuffer.append(TEXT_242);
stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_245);
+ stringBuffer.append(TEXT_243);
stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_246);
+ stringBuffer.append(TEXT_244);
stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_247);
+ stringBuffer.append(TEXT_245);
stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_248);
+ stringBuffer.append(TEXT_246);
if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_249);
+ stringBuffer.append(TEXT_247);
stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_250);
+ stringBuffer.append(TEXT_248);
} else {
- stringBuffer.append(TEXT_251);
+ stringBuffer.append(TEXT_249);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_252);
+ stringBuffer.append(TEXT_250);
stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_253);
+ stringBuffer.append(TEXT_251);
}
- stringBuffer.append(TEXT_254);
+ stringBuffer.append(TEXT_252);
} else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_255);
+ stringBuffer.append(TEXT_253);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_256);
+ stringBuffer.append(TEXT_254);
for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_257);
+ stringBuffer.append(TEXT_255);
if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_258);
+ stringBuffer.append(TEXT_256);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_259);
+ stringBuffer.append(TEXT_257);
stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_260);
+ stringBuffer.append(TEXT_258);
} else {
- stringBuffer.append(TEXT_261);
+ stringBuffer.append(TEXT_259);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_262);
+ stringBuffer.append(TEXT_260);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_263);
+ stringBuffer.append(TEXT_261);
stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_264);
+ stringBuffer.append(TEXT_262);
}
- stringBuffer.append(TEXT_265);
+ stringBuffer.append(TEXT_263);
}
- stringBuffer.append(TEXT_266);
+ stringBuffer.append(TEXT_264);
} else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_267);
+ stringBuffer.append(TEXT_265);
stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_268);
+ stringBuffer.append(TEXT_266);
} else {
- stringBuffer.append(TEXT_269);
+ stringBuffer.append(TEXT_267);
stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_270);
+ stringBuffer.append(TEXT_268);
stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_271);
+ stringBuffer.append(TEXT_269);
}
- stringBuffer.append(TEXT_272);
+ stringBuffer.append(TEXT_270);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_273);
+ stringBuffer.append(TEXT_271);
if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_274);
+ stringBuffer.append(TEXT_272);
} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_275);
+ stringBuffer.append(TEXT_273);
stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_276);
+ stringBuffer.append(TEXT_274);
} else {
- stringBuffer.append(TEXT_277);
+ stringBuffer.append(TEXT_275);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_278);
+ stringBuffer.append(TEXT_276);
stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_279);
+ stringBuffer.append(TEXT_277);
}
} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_280);
+ stringBuffer.append(TEXT_278);
stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_281);
+ stringBuffer.append(TEXT_279);
stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_282);
+ stringBuffer.append(TEXT_280);
stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_283);
+ stringBuffer.append(TEXT_281);
stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_284);
+ stringBuffer.append(TEXT_282);
stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_285);
+ stringBuffer.append(TEXT_283);
if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_286);
+ stringBuffer.append(TEXT_284);
stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_287);
+ stringBuffer.append(TEXT_285);
} else {
- stringBuffer.append(TEXT_288);
+ stringBuffer.append(TEXT_286);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_289);
+ stringBuffer.append(TEXT_287);
stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_290);
+ stringBuffer.append(TEXT_288);
}
- stringBuffer.append(TEXT_291);
+ stringBuffer.append(TEXT_289);
} else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_292);
+ stringBuffer.append(TEXT_290);
for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_293);
+ stringBuffer.append(TEXT_291);
stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
- stringBuffer.append(TEXT_294);
+ stringBuffer.append(TEXT_292);
if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_295);
+ stringBuffer.append(TEXT_293);
stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_296);
+ stringBuffer.append(TEXT_294);
} else {
- stringBuffer.append(TEXT_297);
+ stringBuffer.append(TEXT_295);
stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_298);
+ stringBuffer.append(TEXT_296);
stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_299);
+ stringBuffer.append(TEXT_297);
}
- stringBuffer.append(TEXT_300);
+ stringBuffer.append(TEXT_298);
}
- stringBuffer.append(TEXT_301);
+ stringBuffer.append(TEXT_299);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_302);
+ stringBuffer.append(TEXT_300);
} else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_303);
+ stringBuffer.append(TEXT_301);
stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_304);
+ stringBuffer.append(TEXT_302);
} else {
- stringBuffer.append(TEXT_305);
+ stringBuffer.append(TEXT_303);
stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_306);
+ stringBuffer.append(TEXT_304);
}
- stringBuffer.append(TEXT_307);
+ stringBuffer.append(TEXT_305);
}
}
} else {
for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
if (genClass.hasFactoryInterfaceCreateMethod()) {
- stringBuffer.append(TEXT_308);
+ stringBuffer.append(TEXT_306);
stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_309);
+ stringBuffer.append(TEXT_307);
stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_310);
+ stringBuffer.append(TEXT_308);
stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_311);
+ stringBuffer.append(TEXT_309);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_312);
+ stringBuffer.append(TEXT_310);
}
}
- stringBuffer.append(TEXT_313);
+ stringBuffer.append(TEXT_311);
if (genPackage.isDataTypeConverters()) {
for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_314);
+ stringBuffer.append(TEXT_312);
stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_315);
+ stringBuffer.append(TEXT_313);
stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_316);
+ stringBuffer.append(TEXT_314);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_317);
+ stringBuffer.append(TEXT_315);
stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_318);
+ stringBuffer.append(TEXT_316);
stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_319);
+ stringBuffer.append(TEXT_317);
stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_320);
+ stringBuffer.append(TEXT_318);
}
}
}
}
- stringBuffer.append(TEXT_321);
+ stringBuffer.append(TEXT_319);
stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName());
genModel.emitSortedImports();
- stringBuffer.append(TEXT_322);
+ stringBuffer.append(TEXT_320);
return stringBuffer.toString();
}
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java Mon Feb 26 06:32:47 2007
@@ -42,96 +42,137 @@
*/
public class Quote extends DataObjectBase implements Serializable
{
+
+ public final static int SYMBOL = 0;
+
+ public final static int COMPANY_NAME = 1;
+
+ public final static int PRICE = 2;
+
+ public final static int OPEN1 = 3;
+
+ public final static int HIGH = 4;
+
+ public final static int LOW = 5;
+
+ public final static int VOLUME = 6;
+
+ public final static int CHANGE1 = 7;
+
+ public final static int QUOTES = 8;
+
+ public final static int SDO_PROPERTY_COUNT = 9;
+
+ public final static int EXTENDED_PROPERTY_COUNT = 0;
+
+
/**
- * The feature id for the '<em><b>Symbol</b></em>' attribute.
+ * The internal feature id for the '<em><b>Symbol</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int SYMBOL = 0;
+ */
+ public final static int INTERNAL_SYMBOL = 0;
/**
- * The feature id for the '<em><b>Company Name</b></em>' attribute.
+ * The internal feature id for the '<em><b>Company Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int COMPANY_NAME = 1;
+ */
+ public final static int INTERNAL_COMPANY_NAME = 1;
/**
- * The feature id for the '<em><b>Price</b></em>' attribute.
+ * The internal feature id for the '<em><b>Price</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int PRICE = 2;
+ */
+ public final static int INTERNAL_PRICE = 2;
/**
- * The feature id for the '<em><b>Open1</b></em>' attribute.
+ * The internal feature id for the '<em><b>Open1</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int OPEN1 = 3;
+ */
+ public final static int INTERNAL_OPEN1 = 3;
/**
- * The feature id for the '<em><b>High</b></em>' attribute.
+ * The internal feature id for the '<em><b>High</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int HIGH = 4;
+ */
+ public final static int INTERNAL_HIGH = 4;
/**
- * The feature id for the '<em><b>Low</b></em>' attribute.
+ * The internal feature id for the '<em><b>Low</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int LOW = 5;
+ */
+ public final static int INTERNAL_LOW = 5;
/**
- * The feature id for the '<em><b>Volume</b></em>' attribute.
+ * The internal feature id for the '<em><b>Volume</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int VOLUME = 6;
+ */
+ public final static int INTERNAL_VOLUME = 6;
/**
- * The feature id for the '<em><b>Change1</b></em>' attribute.
+ * The internal feature id for the '<em><b>Change1</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int CHANGE1 = 7;
+ */
+ public final static int INTERNAL_CHANGE1 = 7;
/**
- * The feature id for the '<em><b>Quotes</b></em>' containment reference list.
+ * The internal feature id for the '<em><b>Quotes</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int QUOTES = 8;
+ */
+ public final static int INTERNAL_QUOTES = 8;
/**
- * This represents the number of properties for this type.
+ * The number of properties for this type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
-
- public final static int SDO_PROPERTY_COUNT = 9;
+ public final static int INTERNAL_PROPERTY_COUNT = 9;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_SYMBOL: return SYMBOL;
+ case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
+ case INTERNAL_PRICE: return PRICE;
+ case INTERNAL_OPEN1: return OPEN1;
+ case INTERNAL_HIGH: return HIGH;
+ case INTERNAL_LOW: return LOW;
+ case INTERNAL_VOLUME: return VOLUME;
+ case INTERNAL_CHANGE1: return CHANGE1;
+ case INTERNAL_QUOTES: return QUOTES;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
/**
* The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
@@ -154,6 +195,15 @@
protected String symbol = SYMBOL_DEFAULT_;
/**
+ * This is true if the Symbol attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean symbol_set_ = false;
+
+ /**
* The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -174,6 +224,15 @@
protected String companyName = COMPANY_NAME_DEFAULT_;
/**
+ * This is true if the Company Name attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean companyName_set_ = false;
+
+ /**
* The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -194,6 +253,15 @@
protected BigDecimal price = PRICE_DEFAULT_;
/**
+ * This is true if the Price attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean price_set_ = false;
+
+ /**
* The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -214,6 +282,15 @@
protected BigDecimal open1 = OPEN1_DEFAULT_;
/**
+ * This is true if the Open1 attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean open1_set_ = false;
+
+ /**
* The default value of the '{@link #getHigh() <em>High</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -234,6 +311,15 @@
protected BigDecimal high = HIGH_DEFAULT_;
/**
+ * This is true if the High attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean high_set_ = false;
+
+ /**
* The default value of the '{@link #getLow() <em>Low</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -254,6 +340,15 @@
protected BigDecimal low = LOW_DEFAULT_;
/**
+ * This is true if the Low attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean low_set_ = false;
+
+ /**
* The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -351,6 +446,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Symbol</em>' attribute.
+ * @see #isSetSymbol()
+ * @see #unsetSymbol()
* @see #setSymbol(String)
* @generated
*/
@@ -363,6 +460,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Symbol</em>' attribute.
+ * @see #isSetSymbol()
+ * @see #unsetSymbol()
* @see #getSymbol()
* @generated
*/
@@ -370,8 +469,44 @@
{
String oldSymbol = symbol;
symbol = newSymbol;
+ boolean oldSymbol_set_ = symbol_set_;
+ symbol_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol <em>Symbol</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetSymbol()
+ * @see #getSymbol()
+ * @see #setSymbol(String)
+ * @generated
+ */
+ public void unsetSymbol()
+ {
+ String oldSymbol = symbol;
+ boolean oldSymbol_set_ = symbol_set_;
+ symbol = SYMBOL_DEFAULT_;
+ symbol_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol);
+ notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol <em>Symbol</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Symbol</em>' attribute is set.
+ * @see #unsetSymbol()
+ * @see #getSymbol()
+ * @see #setSymbol(String)
+ * @generated
+ */
+ public boolean isSetSymbol()
+ {
+ return symbol_set_;
}
/**
@@ -383,6 +518,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Company Name</em>' attribute.
+ * @see #isSetCompanyName()
+ * @see #unsetCompanyName()
* @see #setCompanyName(String)
* @generated
*/
@@ -395,6 +532,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Company Name</em>' attribute.
+ * @see #isSetCompanyName()
+ * @see #unsetCompanyName()
* @see #getCompanyName()
* @generated
*/
@@ -402,8 +541,44 @@
{
String oldCompanyName = companyName;
companyName = newCompanyName;
+ boolean oldCompanyName_set_ = companyName_set_;
+ companyName_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName <em>Company Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetCompanyName()
+ * @see #getCompanyName()
+ * @see #setCompanyName(String)
+ * @generated
+ */
+ public void unsetCompanyName()
+ {
+ String oldCompanyName = companyName;
+ boolean oldCompanyName_set_ = companyName_set_;
+ companyName = COMPANY_NAME_DEFAULT_;
+ companyName_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName);
+ notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName <em>Company Name</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Company Name</em>' attribute is set.
+ * @see #unsetCompanyName()
+ * @see #getCompanyName()
+ * @see #setCompanyName(String)
+ * @generated
+ */
+ public boolean isSetCompanyName()
+ {
+ return companyName_set_;
}
/**
@@ -415,6 +590,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Price</em>' attribute.
+ * @see #isSetPrice()
+ * @see #unsetPrice()
* @see #setPrice(BigDecimal)
* @generated
*/
@@ -427,6 +604,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Price</em>' attribute.
+ * @see #isSetPrice()
+ * @see #unsetPrice()
* @see #getPrice()
* @generated
*/
@@ -434,8 +613,44 @@
{
BigDecimal oldPrice = price;
price = newPrice;
+ boolean oldPrice_set_ = price_set_;
+ price_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice <em>Price</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetPrice()
+ * @see #getPrice()
+ * @see #setPrice(BigDecimal)
+ * @generated
+ */
+ public void unsetPrice()
+ {
+ BigDecimal oldPrice = price;
+ boolean oldPrice_set_ = price_set_;
+ price = PRICE_DEFAULT_;
+ price_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, PRICE, oldPrice, price);
+ notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice <em>Price</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Price</em>' attribute is set.
+ * @see #unsetPrice()
+ * @see #getPrice()
+ * @see #setPrice(BigDecimal)
+ * @generated
+ */
+ public boolean isSetPrice()
+ {
+ return price_set_;
}
/**
@@ -447,6 +662,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Open1</em>' attribute.
+ * @see #isSetOpen1()
+ * @see #unsetOpen1()
* @see #setOpen1(BigDecimal)
* @generated
*/
@@ -459,6 +676,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Open1</em>' attribute.
+ * @see #isSetOpen1()
+ * @see #unsetOpen1()
* @see #getOpen1()
* @generated
*/
@@ -466,8 +685,44 @@
{
BigDecimal oldOpen1 = open1;
open1 = newOpen1;
+ boolean oldOpen1_set_ = open1_set_;
+ open1_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, OPEN1, oldOpen1, open1);
+ notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 <em>Open1</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetOpen1()
+ * @see #getOpen1()
+ * @see #setOpen1(BigDecimal)
+ * @generated
+ */
+ public void unsetOpen1()
+ {
+ BigDecimal oldOpen1 = open1;
+ boolean oldOpen1_set_ = open1_set_;
+ open1 = OPEN1_DEFAULT_;
+ open1_set_ = false;
+ if (isNotifying())
+ notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 <em>Open1</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Open1</em>' attribute is set.
+ * @see #unsetOpen1()
+ * @see #getOpen1()
+ * @see #setOpen1(BigDecimal)
+ * @generated
+ */
+ public boolean isSetOpen1()
+ {
+ return open1_set_;
}
/**
@@ -479,6 +734,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>High</em>' attribute.
+ * @see #isSetHigh()
+ * @see #unsetHigh()
* @see #setHigh(BigDecimal)
* @generated
*/
@@ -491,6 +748,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>High</em>' attribute.
+ * @see #isSetHigh()
+ * @see #unsetHigh()
* @see #getHigh()
* @generated
*/
@@ -498,8 +757,44 @@
{
BigDecimal oldHigh = high;
high = newHigh;
+ boolean oldHigh_set_ = high_set_;
+ high_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, HIGH, oldHigh, high);
+ notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh <em>High</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetHigh()
+ * @see #getHigh()
+ * @see #setHigh(BigDecimal)
+ * @generated
+ */
+ public void unsetHigh()
+ {
+ BigDecimal oldHigh = high;
+ boolean oldHigh_set_ = high_set_;
+ high = HIGH_DEFAULT_;
+ high_set_ = false;
+ if (isNotifying())
+ notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh <em>High</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>High</em>' attribute is set.
+ * @see #unsetHigh()
+ * @see #getHigh()
+ * @see #setHigh(BigDecimal)
+ * @generated
+ */
+ public boolean isSetHigh()
+ {
+ return high_set_;
}
/**
@@ -511,6 +806,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Low</em>' attribute.
+ * @see #isSetLow()
+ * @see #unsetLow()
* @see #setLow(BigDecimal)
* @generated
*/
@@ -523,6 +820,8 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Low</em>' attribute.
+ * @see #isSetLow()
+ * @see #unsetLow()
* @see #getLow()
* @generated
*/
@@ -530,8 +829,44 @@
{
BigDecimal oldLow = low;
low = newLow;
+ boolean oldLow_set_ = low_set_;
+ low_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+ }
+
+ /**
+ * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getLow <em>Low</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLow()
+ * @see #getLow()
+ * @see #setLow(BigDecimal)
+ * @generated
+ */
+ public void unsetLow()
+ {
+ BigDecimal oldLow = low;
+ boolean oldLow_set_ = low_set_;
+ low = LOW_DEFAULT_;
+ low_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, LOW, oldLow, low);
+ notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+ }
+
+ /**
+ * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getLow <em>Low</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Low</em>' attribute is set.
+ * @see #unsetLow()
+ * @see #getLow()
+ * @see #setLow(BigDecimal)
+ * @generated
+ */
+ public boolean isSetLow()
+ {
+ return low_set_;
}
/**
@@ -795,22 +1130,22 @@
switch (propertyIndex)
{
case SYMBOL:
- setSymbol(SYMBOL_DEFAULT_);
+ unsetSymbol();
return;
case COMPANY_NAME:
- setCompanyName(COMPANY_NAME_DEFAULT_);
+ unsetCompanyName();
return;
case PRICE:
- setPrice(PRICE_DEFAULT_);
+ unsetPrice();
return;
case OPEN1:
- setOpen1(OPEN1_DEFAULT_);
+ unsetOpen1();
return;
case HIGH:
- setHigh(HIGH_DEFAULT_);
+ unsetHigh();
return;
case LOW:
- setLow(LOW_DEFAULT_);
+ unsetLow();
return;
case VOLUME:
unsetVolume();
@@ -835,17 +1170,17 @@
switch (propertyIndex)
{
case SYMBOL:
- return SYMBOL_DEFAULT_ == null ? symbol != null : !SYMBOL_DEFAULT_.equals(symbol);
+ return isSetSymbol();
case COMPANY_NAME:
- return COMPANY_NAME_DEFAULT_ == null ? companyName != null : !COMPANY_NAME_DEFAULT_.equals(companyName);
+ return isSetCompanyName();
case PRICE:
- return PRICE_DEFAULT_ == null ? price != null : !PRICE_DEFAULT_.equals(price);
+ return isSetPrice();
case OPEN1:
- return OPEN1_DEFAULT_ == null ? open1 != null : !OPEN1_DEFAULT_.equals(open1);
+ return isSetOpen1();
case HIGH:
- return HIGH_DEFAULT_ == null ? high != null : !HIGH_DEFAULT_.equals(high);
+ return isSetHigh();
case LOW:
- return LOW_DEFAULT_ == null ? low != null : !LOW_DEFAULT_.equals(low);
+ return isSetLow();
case VOLUME:
return isSetVolume();
case CHANGE1:
@@ -867,17 +1202,17 @@
StringBuffer result = new StringBuffer(super.toString());
result.append(" (symbol: ");
- result.append(symbol);
+ if (symbol_set_) result.append(symbol); else result.append("<unset>");
result.append(", companyName: ");
- result.append(companyName);
+ if (companyName_set_) result.append(companyName); else result.append("<unset>");
result.append(", price: ");
- result.append(price);
+ if (price_set_) result.append(price); else result.append("<unset>");
result.append(", open1: ");
- result.append(open1);
+ if (open1_set_) result.append(open1); else result.append("<unset>");
result.append(", high: ");
- result.append(high);
+ if (high_set_) result.append(high); else result.append("<unset>");
result.append(", low: ");
- result.append(low);
+ if (low_set_) result.append(low); else result.append("<unset>");
result.append(", volume: ");
if (volume_set_) result.append(volume); else result.append("<unset>");
result.append(", change1: ");
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org