public T getValue ( ModelElementInstance modelElement ) { String value ; if ( namespaceUri == null ) { value = modelElement . getAttributeValue ( attributeName ) ; } else { value = modelElement . getAttributeValueNs ( namespaceUri , attributeName ) ; if ( value == null ) { String alternativeNamespace = owningElementType . getModel ( ) . getAlternativeNamespace ( namespaceUri ) ; if ( alternativeNamespace != null ) { value = modelElement . getAttributeValueNs ( alternativeNamespace , attributeName ) ; } } } // default value if ( value == null && defaultValue != null ) { return defaultValue ; } else { return convertXmlValueToModelValue ( value ) ; } }
returns the value of the attribute .