* createDynamicallyWithStaticResources. The same XSD is used for the static
* generation of SDO Types using XSD2JavaGenerator.
*/
public static void createDynamically(HelperContext hc) {
TypeHelper types = hc.getTypeHelper();
Type stringType = types.getType("commonj.sdo", "String");
Type intType = types.getType("commonj.sdo", "Int");
Type booleanType = types.getType("commonj.sdo", "Boolean");
Type byteType = types.getType("commonj.sdo", "Byte");
Type decimalType = types.getType("commonj.sdo", "Decimal");
Type floatType = types.getType("commonj.sdo", "Float");
Type doubleType = types.getType("commonj.sdo", "Double");
Type dateType = types.getType("commonj.sdo", "Date");
Type shortType = types.getType("commonj.sdo", "Short");
Type longType = types.getType("commonj.sdo", "Long");
Type bytesType = types.getType("commonj.sdo", "Bytes");
Type integerType = types.getType("commonj.sdo", "Integer");
Type charType = types.getType("commonj.sdo", "Character");
DataObject testType = hc.getDataFactory().create("commonj.sdo", "Type");
testType.set("uri", TEST_URI);
testType.set("name", TEST_TYPE_NAME);
DataObject stringProperty = testType.createDataObject("property");
stringProperty.set("name", "stringVal");
stringProperty.set("type", stringType);
DataObject booleanProperty = testType.createDataObject("property");
booleanProperty.set("name", "booleanVal");
booleanProperty.set("type", booleanType);
DataObject byteProperty = testType.createDataObject("property");
byteProperty.set("name", "byteVal");
byteProperty.set("type", byteType);
DataObject decimalProperty = testType.createDataObject("property");
decimalProperty.set("name", "decimalVal");
decimalProperty.set("type", decimalType);
DataObject intProperty = testType.createDataObject("property");
intProperty.set("name", "intVal");
intProperty.set("type", intType);
DataObject floatProperty = testType.createDataObject("property");
floatProperty.set("name", "floatVal");
floatProperty.set("type", floatType);
DataObject doubleProperty = testType.createDataObject("property");
doubleProperty.set("name", "doubleVal");
doubleProperty.set("type", doubleType);
DataObject dateProperty = testType.createDataObject("property");
dateProperty.set("name", "dateVal");
dateProperty.set("type", dateType);
DataObject shortProperty = testType.createDataObject("property");
shortProperty.set("name", "shortVal");
shortProperty.set("type", shortType);
DataObject longProperty = testType.createDataObject("property");
longProperty.set("name", "longVal");
longProperty.set("type", longType);
DataObject childrenProperty = testType.createDataObject("property");
childrenProperty.set("name", "listVal");
childrenProperty.setBoolean("many", true);
childrenProperty.set("type", stringType);
DataObject bytesProperty = testType.createDataObject("property");
bytesProperty.set("name", "bytesVal");
bytesProperty.set("type", bytesType);
DataObject integerProperty = testType.createDataObject("property");
integerProperty.set("name", "integerVal");
integerProperty.set("type", integerType);
DataObject charProperty = testType.createDataObject("property");
charProperty.set("name", "charVal");
charProperty.set("type", charType);
DataObject readOnlyProperty = testType.createDataObject("property");
readOnlyProperty.set("name", "readOnlyVal");
readOnlyProperty.set("type", stringType);
readOnlyProperty.setBoolean("readOnly", true);
DataObject readOnlyListProperty = testType.createDataObject("property");
readOnlyListProperty.set("name", "readOnlyListVal");
readOnlyListProperty.set("type", stringType);
readOnlyListProperty.setBoolean("readOnly", true);
readOnlyListProperty.setBoolean("many", true);
types.define(testType);
DataObject seqType = hc.getDataFactory().create("commonj.sdo", "Type");
seqType.set("uri", TEST_URI);
seqType.set("name", SEQ_TYPE_NAME);
seqType.setBoolean("sequenced", true);
DataObject seqROProperty = seqType.createDataObject("property");
seqROProperty.set("name", "readOnlyVal");
seqROProperty.set("type", stringType);
seqROProperty.setBoolean("readOnly", true);
DataObject seqROListProperty = seqType.createDataObject("property");
seqROListProperty.set("name", "readOnlyListVal");
seqROListProperty.set("type", stringType);
seqROListProperty.setBoolean("readOnly", true);
seqROListProperty.setBoolean("many", true);
DataObject uniqueNameProperty = seqType.createDataObject("property");
uniqueNameProperty.set("name", "uniqueName");
uniqueNameProperty.set("type", stringType);
types.define(seqType);
}