@Service(name="web") @ContractsProvided(value={WebEntityResolver.class,org.xml.sax.EntityResolver.class}) public class WebEntityResolver extends Object implements EntityResolver, org.glassfish.hk2.api.PostConstruct
EntityResolver
that recognizes known public IDs of JavaEE DTDs/schemas
and return a local copy.
This implementation assumes that those files are available in $INSTALL_ROOT/lib/schemas and $INSTALL_ROOT/lib/dtds, but in different environment, different implementation can be plugged in to perform entirely different resolution.
Modifier and Type | Field and Description |
---|---|
Map<String,String> |
knownDTDs
Known DTDs.
|
Constructor and Description |
---|
WebEntityResolver() |
Modifier and Type | Method and Description |
---|---|
void |
postConstruct() |
InputSource |
resolveEntity(String publicId,
String systemId)
If the parser hits one of the well-known DTDs, parse local copies instead of hitting
the remote server.
|
public void postConstruct()
postConstruct
in interface org.glassfish.hk2.api.PostConstruct
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
resolveEntity
in interface EntityResolver
SAXException
IOException
Copyright © 2018. All rights reserved.