private MutablePrismPropertyDefinition createResourceAttributeDefinition(QName elementName, QName typeName,
PrismContext prismContext, XSAnnotation annotation) throws SchemaException {
ResourceAttributeDefinitionImpl attrDef = new ResourceAttributeDefinitionImpl(elementName, typeName, prismContext);
Element nativeAttrElement = SchemaProcessorUtil.getAnnotationElement(annotation, MidPointConstants.RA_NATIVE_ATTRIBUTE_NAME);
String nativeAttributeName = nativeAttrElement == null ? null : nativeAttrElement.getTextContent();
if (!StringUtils.isEmpty(nativeAttributeName)) {
attrDef.setNativeAttributeName(nativeAttributeName);
}
Element frameworkAttrElement = SchemaProcessorUtil.getAnnotationElement(annotation, MidPointConstants.RA_FRAMEWORK_ATTRIBUTE_NAME);
String frameworkAttributeName = frameworkAttrElement == null ? null : frameworkAttrElement.getTextContent();
if (!StringUtils.isEmpty(frameworkAttributeName)) {
attrDef.setFrameworkAttributeName(frameworkAttributeName);
}
attrDef.setReturnedByDefault(SchemaProcessorUtil.getAnnotationBoolean(annotation, MidPointConstants.RA_RETURNED_BY_DEFAULT_NAME));
return attrDef;
}