/** * Creates the nested <code><entity></code> element. Not * allowed if this catalog is itself a reference to another * catalog -- that is, a catalog cannot both refer to another * <em>and</em> contain elements or other attributes. * * @param entity the information about the URI resource mapping to be * added to the catalog. * @exception BuildException if this is a reference and no nested * elements are allowed. */ public void addEntity(ResourceLocation entity) throws BuildException { addDTD(entity); }
/** * Create a DTD location record; optional. * This stores the location of a DTD. The DTD is identified * by its public Id. * @return created DTD location */ public DTDLocation createDTD() { DTDLocation dtdLocation = new DTDLocation(); xmlCatalog.addDTD(dtdLocation); return dtdLocation; } /**
/** * <p>Add a PUBLIC catalog entry to the controlling XMLCatalog instance. * ApacheCatalog calls this for each PUBLIC entry found in an external * catalog file.</p> * * @param publicid The public ID of the resource * @param systemid The system ID (aka location) of the resource * @param base The base URL of the resource. If the systemid * specifies a relative URL/pathname, it is resolved using the * base. The default base for an external catalog file is the * directory in which the catalog is located. * */ public void addPublicEntry(final String publicid, final String systemid, final URL base) { final ResourceLocation dtd = new ResourceLocation(); dtd.setBase(base); dtd.setPublicId(publicid); dtd.setLocation(systemid); xmlCatalog.addDTD(dtd); }