Class FSEntityResolver
java.lang.Object
org.openpdf.resource.FSEntityResolver
- All Implemented Interfaces:
EntityResolver, EntityResolver2
A SAX EntityResolver for common entity references and DTDs in X/HTML processing. Maps official entity references to local copies to avoid network lookup. The local copies are stored in the source tree under /entities, and the references here are resolved by a system ClassLoader. As long as the entity files are in the classpath (or bundled in the FS jar), they will be picked up.
The basic form of this class comes from Elliot Rusty Harold, on ...
This class is a Singleton; use instance to retrieve it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FSEntityResolverSingleton instance, useinstance()to retrieve.private static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of entities parsed by this resolver.@Nullable String@Nullable InputSourcegetExternalSubset(String name, String baseURI) static FSEntityResolverinstance()Gets an instance of this class.private static InputSourceprivate static InputSourceresolveEntity(String publicID, String systemID) resolveEntity(String name, String publicId, String baseURI, String systemId)
-
Field Details
-
log
private static final org.slf4j.Logger log -
instance
Singleton instance, useinstance()to retrieve. -
entities
-
-
Constructor Details
-
FSEntityResolver
private FSEntityResolver()
-
-
Method Details
-
resolveEntity
- Specified by:
resolveEntityin interfaceEntityResolver
-
resolveEntity
- Specified by:
resolveEntityin interfaceEntityResolver2
-
getExternalSubset
- Specified by:
getExternalSubsetin interfaceEntityResolver2
-
newHTML5DoctypeSource
-
newEmptySource
-
instance
-
getEntities
-
getEntity
-