use of com.sun.tools.xjc.reader.xmlschema.bindinfo.BIXPluginCustomization in project midpoint by Evolveum.
the class SchemaProcessor method getFieldReferenceUseAnnotationQName.
// e.g. c:link (as opposed to c:linkRef)
private QName getFieldReferenceUseAnnotationQName(JFieldVar field, ClassOutline classOutline) {
BIDeclaration declaration = hasAnnotation(classOutline, field, A_OBJECT_REFERENCE);
if (!(declaration instanceof BIXPluginCustomization)) {
return null;
}
BIXPluginCustomization customization = (BIXPluginCustomization) declaration;
if (customization.element == null) {
return null;
}
Element element = customization.element;
String strQName = element.getTextContent();
String[] array = strQName.split(":");
if (array.length == 2) {
return new QName(PrefixMapper.C.getNamespace(), array[1]);
} else if (array.length == 1) {
return new QName(PrefixMapper.C.getNamespace(), array[0]);
}
return null;
}
Aggregations