Package org.datanucleus.util
Class AbstractXMLEntityResolver
- java.lang.Object
-
- org.datanucleus.util.AbstractXMLEntityResolver
-
- All Implemented Interfaces:
EntityResolver
- Direct Known Subclasses:
XMLAutoStarterEntityResolver,XmlMetaDataEntityResolver
public abstract class AbstractXMLEntityResolver extends Object implements EntityResolver
Abstract implementation of an entity resolver for XML files. Supports a series of internally supported public or system identities, allowing implementers to support particular identities and direct them to local copies of the DTD for example.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>publicIdEntitiesMap of public identity entities supported.protected Map<String,String>systemIdEntitiesMap of system identity entities supported.
-
Constructor Summary
Constructors Constructor Description AbstractXMLEntityResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputSourcegetLocalInputSource(String publicId, String systemId, String localPath)Accessor for the input source for a path.InputSourceresolveEntity(String publicId, String systemId)Method to resolve XML entities.
-
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
Method to resolve XML entities. Allows for the internally supported public and system identity entities.- Specified by:
resolveEntityin interfaceEntityResolver- Parameters:
publicId- The public id.systemId- The system id.- Returns:
- Input Source for the URI.
- Throws:
SAXException- See Also:
EntityResolver.resolveEntity(java.lang.String,java.lang.String)
-
getLocalInputSource
protected InputSource getLocalInputSource(String publicId, String systemId, String localPath) throws FileNotFoundException
Accessor for the input source for a path.- Parameters:
publicId- Public identitysystemId- System identitylocalPath- The local path- Returns:
- The input source
- Throws:
FileNotFoundException- if the local file is not accessible
-
-