/** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(final XMLCatalog xmlCatalog) { this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); }
/** * Get the XML catalog containing entity definitions * * @return the XML catalog for the task. */ public XMLCatalog getXMLCatalog() { xmlCatalog.setProject(getProject()); return xmlCatalog; }
/** * 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); }
/** * Implements the EntityResolver.resolveEntity() interface method. * @param publicId the public id to resolve. * @param systemId the system id to resolve. * @throws SAXException if there is a parsing problem. * @throws IOException if there is an IO problem. * @return the resolved entity. * @see org.xml.sax.EntityResolver#resolveEntity */ @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { if (isReference()) { return getRef().resolveEntity(publicId, systemId); } dieOnCircularReference(); log("resolveEntity: '" + publicId + "': '" + systemId + "'", Project.MSG_DEBUG); InputSource inputSource = getCatalogResolver().resolveEntity(publicId, systemId); if (inputSource == null) { log("No matching catalog entry found, parser will use: '" + systemId + "'", Project.MSG_DEBUG); } return inputSource; }
/** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) { if(this.xmlCatalog==null) { this.xmlCatalog = new XMLCatalog(); this.xmlCatalog.setProject(getProject()); } this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); }
/** * Allow specification of a DTD outside of an XMLCatalog. * * @return a DTDLocation with the specified DTD **/ public DTDLocation createDTD() { DTDLocation dtdLoc = new DTDLocation(); globalXMLCatalog.addEntity(dtdLoc); return dtdLoc; }
/** * @see org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog#resolveEntityLocation(java.lang.String, java.lang.String) */ public String resolveEntityLocation(String publicId, String systemId) { String resolvedId = null; try { InputSource is = xmlCatalog.resolveEntity(publicId, systemId); if (is != null) { resolvedId = is.getSystemId(); } } // catch (Exception e) { // Do nothing if the resource can't be resolved. } // needs to return null if it can't resolve the id if (resolvedId != null && resolvedId.equals("")) { resolvedId = null; } return resolvedId; }
/** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) { if (this.xmlCatalog == null) { this.xmlCatalog = new XMLCatalog(); this.xmlCatalog.setProject(getProject()); } this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); }
/** * Allow specification of an entity outside of an XMLCatalog. * * @return a DTDLocation with the specified entity **/ public DTDLocation createEntity() { DTDLocation dtdLoc = new DTDLocation(); globalXMLCatalog.addEntity(dtdLoc); return dtdLoc; }
public void addConfiguredXMLCatalog(XMLCatalog entityResolver) { if(this.xmlCatalog==null){ this.xmlCatalog = new XMLCatalog(); xmlCatalog.setProject(getProject()); } this.xmlCatalog.addConfiguredXMLCatalog(entityResolver); }
/** * add an XMLCatalog as a nested element; optional. * @param catalog the XMLCatalog to use */ public void addConfiguredXMLCatalog(XMLCatalog catalog) { xmlCatalog.addConfiguredXMLCatalog(catalog); }
/** * Initializes the task. */ @Override public void init() { super.init(); xmlCatalog.setProject(getProject()); }
/** * 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; } /**
/** * @see org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog#addEntryToCatalog(java.lang.String, java.lang.String) */ public void addEntryToCatalog(String publicId, String systemId) { DTDLocation resLoc = new DTDLocation(); resLoc.setLocation(systemId); resLoc.setPublicId(publicId); xmlCatalog.addEntity(resLoc); }
/** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) { if(this.xmlCatalog==null) { this.xmlCatalog = new XMLCatalog(); this.xmlCatalog.setProject(getProject()); } this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); }
/** * add an XMLCatalog as a nested element; optional. * @param catalog XMLCatalog to use */ public void addConfiguredXMLCatalog(XMLCatalog catalog) { xmlCatalog.addConfiguredXMLCatalog(catalog); }
/** * Called by the project to let the task initialize properly. * * @exception BuildException if something goes wrong with the build */ public void init() throws BuildException { super.init(); xmlCatalog.setProject(getProject()); }
/** * <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); }
/** * <p>Add a URI catalog entry to the controlling XMLCatalog instance. * ApacheCatalog calls this for each URI entry found in an external * catalog file.</p> * * @param uri The URI of the resource * @param altURI The URI to which the resource should be mapped * (aka the location) * @param base The base URL of the resource. If the altURI * 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 addURIEntry(final String uri, final String altURI, final URL base) { final ResourceLocation entity = new ResourceLocation(); entity.setBase(base); entity.setPublicId(uri); entity.setLocation(altURI); xmlCatalog.addEntity(entity); }
/** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) { if (this.xmlCatalog == null) { this.xmlCatalog = new XMLCatalog(); this.xmlCatalog.setProject(getProject()); } this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); }