src/main/java/org/jboss/util/xml/JBossEntityResolver.java
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;
   }
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;
   }
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.

@param systemId - the systemId
@param trace - trace level logging flag
@return the URL InputSource if the URL input stream can be opened, null
if the systemId is not a URL or could not be opened.
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 .