public class DctmMeta extends CaoMetadata {
public DctmMeta(CaoDriver driver, Enumeration<?> attributes) {
super(driver);
while ( attributes.hasMoreElements() ) {
IDfAttr attr = (IDfAttr)attributes.nextElement();
TYPE type = TYPE.STRING;
String cat = null;
if (attr.getName().equals("r_object_id"))
cat = CaoDriver.CATEGORY_ID;
if (attr.isRepeating()) {
definition.add(new CaoMetaDefinition(this, attr.getName(), TYPE.LIST, attr.getName(), 0, cat ));
} else {
switch (attr.getDataType()) {
case IDfAttr.DM_BOOLEAN:
type = TYPE.BOOLEAN;
break;
case IDfAttr.DM_DOUBLE:
type = TYPE.DOUBLE;
break;
case IDfAttr.DM_ID:
type = TYPE.STRING;
cat = CaoDriver.CATEGORY_ID;
break;
case IDfAttr.DM_INTEGER:
type = TYPE.LONG;
break;
case IDfAttr.DM_TIME:
type = TYPE.DATETIME;
break;
case IDfAttr.DM_UNDEFINED:
type = TYPE.OBJECT;
break;
}
definition.add(new CaoMetaDefinition(this, attr.getName(), type, attr.getName(), attr.getLength(), cat ));
}
}
}