class PdfBoxMigration implements Migrate, Serializable {

    private MigrateResult htmlMigration(
            final DigitalObject digitalObject, final ServiceReport report) {
        try {
            final HtmlExtractor he = new HtmlExtractor();
            final String htmlBlob = he.getText(
                    digitalObject.getContent().getInputStream());
            final DigitalObject.Builder factory =
                    new DigitalObject.Builder(
                            Content.byValue(htmlBlob.getBytes()));
            factory.title(digitalObject.getTitle() + ".html");
            // HTML 4.0 File format
            factory.format(outputformatHtml);
            DigitalObject htmlObject = factory.build();

            return new MigrateResult(htmlObject, report);

        } catch (Exception e) {
            log.severe(e.getClass().getName()+": "+e.getMessage());
            return this.fail(new ServiceReport(Type.ERROR, Status.TOOL_ERROR, e
                    .toString()));
        }
    }

}