}
@Override
public boolean introspect(DataType dataType, Annotation[] annotations) {
Class javaType = dataType.getPhysical();
HelperContext context = HelperProvider.getDefaultContext();
// FIXME: Need a better to test dynamic SDO
if (DataObject.class.isAssignableFrom(javaType)) {
// Dynamic SDO
dataType.setDataBinding(getName());
if (dataType.getLogical() == null) {
dataType.setLogical(XMLType.UNKNOWN);
}
return true;
}
// FIXME: We need to access HelperContext
Type type = context.getTypeHelper().getType(javaType);
if (type == null) {
return false;
}
if (type.isDataType()) {
// FIXME: Ignore simple types?
return false;
}
String namespace = type.getURI();
String name = context.getXSDHelper().getLocalName(type);
QName xmlType = new QName(namespace, name);
dataType.setDataBinding(getName());
QName elementName = null;
Object logical = dataType.getLogical();
if (logical instanceof XMLType) {