/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
@Override public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException { if (entityResolver != null) { return entityResolver.resolveEntity(name, publicId, baseURI, systemId); } return super.resolveEntity(name, publicId, baseURI, systemId); }
@Override public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException { if (entityResolver != null) { return entityResolver.resolveEntity(name, publicId, baseURI, systemId); } return super.resolveEntity(name, publicId, baseURI, systemId); }
@Override public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException { if (entityResolver != null) { return entityResolver.resolveEntity(publicId, systemId); } else { return super.resolveEntity(publicId, systemId); } }
@Override public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException { if (entityResolver != null) { return entityResolver.resolveEntity(publicId, systemId); } else { return super.resolveEntity(publicId, systemId); } }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * @see org.xml.sax.ext.EntityResolver2#resolveEntity(java.lang.String, * java.lang.String, java.lang.String, java.lang.String) */ public InputSource resolveEntity(final String name, final String publicId, final String baseURI, final String systemId) throws SAXException, IOException { return this.defaultHandler2.resolveEntity(name, publicId, baseURI, systemId); }
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(publicId, systemId); }
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(publicId, systemId); }
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(name, publicId, baseURI, systemId); }
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(publicId, systemId); }
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(name, publicId, baseURI, systemId); }
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException { return baseHandler.resolveEntity(name, publicId, baseURI, systemId); }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * Invokes * {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} * with null entity name and base URI. * You only need to override that method to use this class. * * @param publicId The public identifier of the external entity being * referenced (normalized as required by the XML specification), or * null if none was supplied. * @param systemId The system identifier of the external entity * being referenced; either a relative or absolute URI. * This is never null when invoked by a SAX2 parser; only declared * entities, and any external subset, are resolved by such parsers. * * @return An InputSource object describing the new input source. * * @exception SAXException Any SAX exception, possibly wrapping * another exception. * @exception IOException Probably indicating a failure to create * a new InputStream or Reader, or an illegal URL. */ public InputSource resolveEntity (String publicId, String systemId) throws SAXException, IOException { return resolveEntity (null, publicId, null, systemId); } }
/** * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, * java.lang.String) */ public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException, IOException { URL url; if (systemId.startsWith("file:")) { url = URLResource.getResource(systemId.substring(5)); } else { url = URLResource.getResource(systemId); } InputStream localStream = URLResource.getResourceAsStream(url .toExternalForm()); if (localStream != null) { return new InputSource(localStream); } return this.defaultHandler2.resolveEntity(publicId, systemId); } }
return super.resolveEntity(name, publicId, baseURI, systemId);