private static IdentifierHandler < ? extends Identifier > getExtendedIdentifierHandlerFor ( Element element ) { if ( ! checkExtendedIdentityElement ( element ) ) { return null ; } String name = element . getAttribute ( IfmapStrings . IDENTITY_ATTR_NAME ) ; Document extendedDocument ; try { extendedDocument = DomHelpers . parseEscapedXmlString ( name ) ; } catch ( UnmarshalException e ) { return null ; } Element extendedElement = extendedDocument . getDocumentElement ( ) ; String nodeName = extendedElement . getLocalName ( ) ; // try to find the most specific handler for ( Entry < Class < ? extends Identifier > , IdentifierHandler < ? extends Identifier > > entry : sIdentifierHandlers . entrySet ( ) ) { String simpleClassName = entry . getKey ( ) . getSimpleName ( ) ; if ( simpleClassName . equalsIgnoreCase ( nodeName ) ) { return entry . getValue ( ) ; } } return null ; }
If the element argument is an extended identity Identifier then try to find the most specific handler for this element . Used the Element - LocalName to find the right handler .