protected InputSource resolveSystemID ( String systemId , boolean trace ) { if ( systemId == null ) return null ; if ( trace ) log . trace ( "resolveSystemID, systemId=" + systemId ) ; InputSource inputSource = null ; // Try to resolve the systemId as an entity key String filename = null ; if ( localEntities != null ) filename = ( String ) localEntities . get ( systemId ) ; if ( filename == null ) filename = ( String ) entities . get ( systemId ) ; if ( filename != null ) { if ( trace ) log . trace ( "Found entity systemId=" + systemId + " fileName=" + filename ) ; InputStream ins = loadClasspathResource ( filename , trace ) ; if ( ins != null ) { inputSource = new InputSource ( ins ) ; inputSource . setSystemId ( systemId ) ; } else { log . warn ( "Cannot load systemId from resource: " + filename ) ; } } return inputSource ; }
Attempt to use the systemId as a URL from which the schema can be read . This checks to see whether the systemId is a key to an entry in the class entity map .