org.apache.felix.ipojo.xml.parser

## Class SchemaResolver

- java.lang.Object
- - org.apache.felix.ipojo.xml.parser.SchemaResolver

All Implemented Interfaces:
  EntityResolver

    public class SchemaResolver
    extends Object
    implements EntityResolver

Entity Resolver loading embedded XML Schemas. This resolver avoid using a network connection to get schemas as they are loaded from the manipulator jar file.

Author:
  Felix Project Team

### Field Summary

Fields
`static String` `XSD_PATH` Directory where embedded schemas are copied.

### Constructor Summary

Constructors
Constructor and Description
`SchemaResolver()`

### Method Summary

All Methods Instance Methods Concrete Methods
`InputSource` `resolveEntity(String publicId, String systemId)` Resolves systemIds to use embedded schemas.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### XSD_PATH

    public static final String XSD_PATH

Directory where embedded schemas are copied.

See Also:
  Constant Field Values

### Constructor Detail

#### SchemaResolver

    public SchemaResolver()

### Method Detail

#### resolveEntity

    public InputSource resolveEntity(String publicId,
                                     String systemId)
                              throws SAXException,
                                     IOException

Resolves systemIds to use embedded schemas. The schemas are loaded from the `XSD_PATH` directory with the current classloader.

Specified by:
  `resolveEntity` in interface `EntityResolver`
Parameters:
  `publicId` - the publicId
  `systemId` - the systemId (Schema URL)
Returns:
  the InputSource to load the schemas or `null` if the schema cannot be loaded (not embedded)
Throws:
  `SAXException` - cannot happen
  `IOException` - when the embedded resource cannot be read correctly
See Also:
  `EntityResolver.resolveEntity(java.lang.String, java.lang.String)`