44 import com.sun.org.apache.xml.internal.resolver.CatalogManager; 45 import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader; 46 import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader; 47 48 /** 49 * <p>The catalog resolver handles the resolution of external 50 * identifiers and URI references through XML catalogs. This 51 * component supports XML catalogs defined by the 52 * <a href="http://www.oasis-open.org/committees/entity/spec.html"> 53 * OASIS XML Catalogs Specification</a>. It encapsulates the 54 * <a href="http://xml.apache.org/commons/">XML Commons</a> resolver. 55 * An instance of this class may be registered on the parser 56 * as a SAX entity resolver, as a DOM LSResourceResolver or 57 * as an XNI entity resolver by setting the property 58 * (http://apache.org/xml/properties/internal/entity-resolver).</p> 59 * 60 * <p>It is intended that this class may be used standalone to perform 61 * catalog resolution outside of a parsing context. It may be shared 62 * between several parsers and the application.</p> 63 * 64 * @author Michael Glavassevich, IBM 65 * 66 */ 67 public class XMLCatalogResolver 68 implements XMLEntityResolver, EntityResolver2, LSResourceResolver { 69 70 /** Internal catalog manager for Apache catalogs. **/ 71 private CatalogManager fResolverCatalogManager = null; 72 73 /** Internal catalog structure. **/ 74 private Catalog fCatalog = null; 75 76 /** An array of catalog URIs. **/ 77 private String [] fCatalogsList = null; 78 79 /** 80 * Indicates whether the list of catalogs has 81 * changed since it was processed. 82 */ 83 private boolean fCatalogsChanged = true; 84 85 /** Application specified prefer public setting. **/ 86 private boolean fPreferPublic = true; | 44 import com.sun.org.apache.xml.internal.resolver.CatalogManager; 45 import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader; 46 import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader; 47 48 /** 49 * <p>The catalog resolver handles the resolution of external 50 * identifiers and URI references through XML catalogs. This 51 * component supports XML catalogs defined by the 52 * <a href="http://www.oasis-open.org/committees/entity/spec.html"> 53 * OASIS XML Catalogs Specification</a>. It encapsulates the 54 * <a href="http://xml.apache.org/commons/">XML Commons</a> resolver. 55 * An instance of this class may be registered on the parser 56 * as a SAX entity resolver, as a DOM LSResourceResolver or 57 * as an XNI entity resolver by setting the property 58 * (http://apache.org/xml/properties/internal/entity-resolver).</p> 59 * 60 * <p>It is intended that this class may be used standalone to perform 61 * catalog resolution outside of a parsing context. It may be shared 62 * between several parsers and the application.</p> 63 * 64 * @deprecated This class and the JDK internal Catalog API in package 65 * {@code com.sun.org.apache.xml.internal.resolver} 66 * is encapsulated in JDK 9. The entire implementation under the package is now 67 * deprecated and subject to removal in a future release. Users of the API should 68 * migrate to the {@linkplain javax.xml.catalog new public API}. 69 * <p> 70 * The new Catalog API is supported throughout the JDK XML Processors, which allows 71 * the use of Catalog by simply setting a path to a Catalog file as a property. 72 * 73 * @author Michael Glavassevich, IBM 74 * 75 */ 76 @Deprecated(since="9", forRemoval=true) 77 public class XMLCatalogResolver 78 implements XMLEntityResolver, EntityResolver2, LSResourceResolver { 79 80 /** Internal catalog manager for Apache catalogs. **/ 81 private CatalogManager fResolverCatalogManager = null; 82 83 /** Internal catalog structure. **/ 84 private Catalog fCatalog = null; 85 86 /** An array of catalog URIs. **/ 87 private String [] fCatalogsList = null; 88 89 /** 90 * Indicates whether the list of catalogs has 91 * changed since it was processed. 92 */ 93 private boolean fCatalogsChanged = true; 94 95 /** Application specified prefer public setting. **/ 96 private boolean fPreferPublic = true; |