class DefaultModelReader implements ModelReader {
    private final ModelSourceTransformer transformer;

    @Inject
    public DefaultModelReader(ModelSourceTransformer transformer) {
        this.transformer = transformer;
    }

    @Override
    public Model read(File input, Map<String, ?> options) throws IOException {
        Objects.requireNonNull(input, "input cannot be null");
        return read(input.toPath(), options);
    }

    @Override
    public Model read(Path path, Map<String, ?> options) throws IOException {
        Objects.requireNonNull(path, "path cannot be null");

        try (InputStream in = Files.newInputStream(path)) {
            Model model = read(in, path, options);

            model.setPomPath(path);

            return model;
        }
    }

    @Override
    public Model read(Reader input, Map<String, ?> options) throws IOException {
        Objects.requireNonNull(input, "input cannot be null");

        try (Reader in = input) {
            return read(in, null, options);
        }
    }

    @Override
    public Model read(InputStream input, Map<String, ?> options) throws IOException {
        Objects.requireNonNull(input, "input cannot be null");

        try (InputStream in = input) {
            return read(input, null, options);
        }
    }

    private boolean isStrict(Map<String, ?> options) {
        Object value = (options != null) ? options.get(IS_STRICT) : null;
        return value == null || Boolean.parseBoolean(value.toString());
    }

    private InputSource getSource(Map<String, ?> options) {
        Object value = (options != null) ? options.get(INPUT_SOURCE) : null;
        return (InputSource) value;
    }

    private Path getRootDirectory(Map<String, ?> options) {
        Object value = (options != null) ? options.get(ROOT_DIRECTORY) : null;
        return (Path) value;
    }

    private Model read(InputStream input, Path pomFile, Map<String, ?> options) throws IOException {<FILL_FUNCTION_BODY>}

    private Model read(Reader reader, Path pomFile, Map<String, ?> options) throws IOException {
        try {
            XMLInputFactory factory = new com.ctc.wstx.stax.WstxInputFactory();
            factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
            XMLStreamReader parser = factory.createXMLStreamReader(reader);

            InputSource source = getSource(options);
            boolean strict = isStrict(options);
            MavenStaxReader mr = new MavenStaxReader();
            mr.setAddLocationInformation(source != null);
            Model model = new Model(mr.read(parser, strict, source != null ? source.toApiSource() : null));
            return model;
        } catch (XMLStreamException e) {
            Location location = e.getLocation();
            throw new ModelParseException(
                    e.getMessage(),
                    location != null ? location.getLineNumber() : -1,
                    location != null ? location.getColumnNumber() : -1,
                    e);
        } catch (Exception e) {
            throw new IOException("Unable to transform pom", e);
        }
    }
}

        try {
            XMLInputFactory factory = new com.ctc.wstx.stax.WstxInputFactory();
            factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
            XMLStreamReader parser = factory.createXMLStreamReader(input);

            InputSource source = getSource(options);
            boolean strict = isStrict(options);
            MavenStaxReader mr = new MavenStaxReader();
            mr.setAddLocationInformation(source != null);
            Model model = new Model(mr.read(parser, strict, source != null ? source.toApiSource() : null));
            return model;
        } catch (XMLStreamException e) {
            Location location = e.getLocation();
            throw new ModelParseException(
                    e.getMessage(),
                    location != null ? location.getLineNumber() : -1,
                    location != null ? location.getColumnNumber() : -1,
                    e);
        } catch (Exception e) {
            throw new IOException("Unable to transform pom", e);
        }
    
<no_super_class>