reconcileReferences(false);
}
public void reconcileReferences(boolean deep) {
Definition definition = getEnclosingDefinition();
Element element = getElement();
if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_PROPERTY_NAME_ATTRIBUTE))
{
if (definition != null)
{
QName qname = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_PROPERTY_NAME_ATTRIBUTE));
// resolve the qname to a property
// TODO could this reference an imported property?
for (Iterator i = definition.getExtensibilityElements().iterator(); i.hasNext();)
{
ExtensibilityElement extensibilityElement = (ExtensibilityElement) i.next();
if (extensibilityElement instanceof Property)
{
Property property = (Property) extensibilityElement;
if (property.getQName().equals(qname) && property != getPropertyName())
{
setPropertyName(property);
break;
}
}
}
}
}
if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_MESSAGE_TYPE_ATTRIBUTE))
{
if (definition != null)
{
QName messageQName = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_MESSAGE_TYPE_ATTRIBUTE));
Message newMessage = (messageQName != null) ? (Message) definition.getMessage(messageQName) : null;
if (newMessage != null && newMessage!= getMessageType())
setMessageType(newMessage);
}
} else {
setMessageType(null);