Package org.datanucleus.metadata.xml
Class XmlMetaDataEntityResolver
java.lang.Object
org.datanucleus.metadata.xml.XmlMetaDataEntityResolver
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescription(package private) final PluginManager
Map of public identity entities supported.Map of system identity entities supported. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputSource
getLocalInputSource
(String publicId, String systemId, String localPath) Accessor for the input source for a path.Source[]
The list of schemas registered in the plugin "metadata_entityresolver".resolveEntity
(String publicId, String systemId) Method to resolve XML entities.
-
Field Details
-
publicIdEntities
Map of public identity entities supported. The key will be the identity, and the value is the local input to use. -
systemIdEntities
Map of system identity entities supported. The key will be the identity, and the value is the local input to use. -
pluginMgr
-
-
Constructor Details
-
XmlMetaDataEntityResolver
-
-
Method Details
-
getRegisteredSchemas
The list of schemas registered in the plugin "metadata_entityresolver".- Returns:
- the Sources pointing to the .xsd files
-
resolveEntity
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:
-
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
-