src/main/java/org/jboss/util/xml/catalog/Resolver.java
public String resolveSystem(String systemId)
    throws MalformedURLException, IOException {

    String resolved = super.resolveSystem(systemId);
    if (resolved != null) {
      return resolved;
    }

    Enumeration enumt = catalogEntries.elements();
    while (enumt.hasMoreElements()) {
      CatalogEntry e = (CatalogEntry) enumt.nextElement();
      if (e.getEntryType() == RESOLVER) {
	resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
	if (resolved != null) {
	  return resolved;
	}
      } else if (e.getEntryType() == SYSTEMSUFFIX) {
	String suffix = e.getEntryArg(0);
	String result = e.getEntryArg(1);

	if (suffix.length() <= systemId.length()
	    && systemId.substring(systemId.length()-suffix.length()).equals(suffix)) {
	  return result;
	}
      }
    }

    return resolveSubordinateCatalogs(Catalog.SYSTEM,
				      null,
				      null,
				      systemId);
  }
public String resolveSystem(String systemId)
    throws MalformedURLException, IOException {

    String resolved = super.resolveSystem(systemId);
    if (resolved != null) {
      return resolved;
    }

    Enumeration enumt = catalogEntries.elements();
    while (enumt.hasMoreElements()) {
      CatalogEntry e = (CatalogEntry) enumt.nextElement();
      if (e.getEntryType() == RESOLVER) {
	resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
	if (resolved != null) {
	  return resolved;
	}
      } else if (e.getEntryType() == SYSTEMSUFFIX) {
	String suffix = e.getEntryArg(0);
	String result = e.getEntryArg(1);

	if (suffix.length() <= systemId.length()
	    && systemId.substring(systemId.length()-suffix.length()).equals(suffix)) {
	  return result;
	}
      }
    }

    return resolveSubordinateCatalogs(Catalog.SYSTEM,
				      null,
				      null,
				      systemId);
  }
public String resolveSystem ( String systemId ) throws MalformedURLException , IOException { String resolved = super . resolveSystem ( systemId ) ; if ( resolved != null ) { return resolved ; } Enumeration enumt = catalogEntries . elements ( ) ; while ( enumt . hasMoreElements ( ) ) { CatalogEntry e = ( CatalogEntry ) enumt . nextElement ( ) ; if ( e . getEntryType ( ) == RESOLVER ) { resolved = resolveExternalSystem ( systemId , e . getEntryArg ( 0 ) ) ; if ( resolved != null ) { return resolved ; } } else if ( e . getEntryType ( ) == SYSTEMSUFFIX ) { String suffix = e . getEntryArg ( 0 ) ; String result = e . getEntryArg ( 1 ) ; if ( suffix . length ( ) <= systemId . length ( ) && systemId . substring ( systemId . length ( ) - suffix . length ( ) ) . equals ( suffix ) ) { return result ; } } } return resolveSubordinateCatalogs ( Catalog . SYSTEM , null , null , systemId ) ; }
Return the applicable SYSTEM system identifier, resorting
to external RESOLVERs if necessary.

<p>If a SYSTEM entry exists in the Catalog
for the system ID specified, return the mapped value.</p>

<p>In the Resolver (as opposed to the Catalog) class, if the
URI isn't found by the usual algorithm, SYSTEMSUFFIX entries are
considered.</p>

<p>On Windows-based operating systems, the comparison between
the system identifier provided and the SYSTEM entries in the
Catalog is case-insensitive.</p>

@param systemId The system ID to locate in the catalog.

@return The system identifier to use for systemId.

@throws MalformedURLException The formal system identifier of a
subordinate catalog cannot be turned into a valid URL.
@throws IOException Error reading subordinate catalog file.
Return the applicable SYSTEM system identifier resorting to external RESOLVERs if necessary .