Package org.datanucleus.metadata.xml
Class XmlMetaDataEntityResolver
- java.lang.Object
-
- org.datanucleus.metadata.xml.XmlMetaDataEntityResolver
-
- All Implemented Interfaces:
EntityResolver
public class XmlMetaDataEntityResolver extends Object implements EntityResolver
Implementation of an entity resolver for XML MetaData files. Supports a series of internally supported public or system identities. Note that this applies to ALL types of XML MetaData (persistence.xml, JDO package.jdo, JDO package.orm, JDO package.jdoquery, JPA/Jakarta orm.xml). We could, potentially, separate these different types of MetaData XML file, and hence split up the entities based on the handler, but not considered a priority currently.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
publicIdEntities
Map of public identity entities supported.protected Map<String,String>
systemIdEntities
Map of system identity entities supported.
-
Constructor Summary
Constructors Constructor Description XmlMetaDataEntityResolver(PluginManager pluginMgr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputSource
getLocalInputSource(String publicId, String systemId, String localPath)
Accessor for the input source for a path.Source[]
getRegisteredSchemas()
The list of schemas registered in the plugin "metadata_entityresolver".InputSource
resolveEntity(String publicId, String systemId)
Method to resolve XML entities.
-
-
-
Constructor Detail
-
XmlMetaDataEntityResolver
public XmlMetaDataEntityResolver(PluginManager pluginMgr)
-
-
Method Detail
-
getRegisteredSchemas
public Source[] getRegisteredSchemas()
The list of schemas registered in the plugin "metadata_entityresolver".- Returns:
- the Sources pointing to the .xsd files
-
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:
resolveEntity
in 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
-
-