diff options
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/DocumentConverter.java (renamed from src/main/java/org/zwobble/mammoth/Mammoth.java) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/org/zwobble/mammoth/Mammoth.java b/src/main/java/org/zwobble/mammoth/DocumentConverter.java index e979afc..31464e7 100644 --- a/src/main/java/org/zwobble/mammoth/Mammoth.java +++ b/src/main/java/org/zwobble/mammoth/DocumentConverter.java @@ -27,27 +27,27 @@ import java.util.zip.ZipFile; import static org.zwobble.mammoth.internal.docx.DocumentReader.readDocument; import static org.zwobble.mammoth.internal.util.MammothLists.list; -public class Mammoth { +public class DocumentConverter { private final DocumentToHtmlOptions options; - public Mammoth() { + public DocumentConverter() { this(DocumentToHtmlOptions.DEFAULT.addStyleMap(DefaultStyles.DEFAULT_STYLE_MAP)); } - private Mammoth(DocumentToHtmlOptions options) { + private DocumentConverter(DocumentToHtmlOptions options) { this.options = options; } - public Mammoth idPrefix(String idPrefix) { - return new Mammoth(options.idPrefix(idPrefix)); + public DocumentConverter idPrefix(String idPrefix) { + return new DocumentConverter(options.idPrefix(idPrefix)); } - public Mammoth preserveEmptyParagraphs() { - return new Mammoth(options.preserveEmptyParagraphs()); + public DocumentConverter preserveEmptyParagraphs() { + return new DocumentConverter(options.preserveEmptyParagraphs()); } - public Mammoth addStyleMap(String styleMap) { - return new Mammoth(options.addStyleMap(styleMap)); + public DocumentConverter addStyleMap(String styleMap) { + return new DocumentConverter(options.addStyleMap(styleMap)); } public Result<String> convertToHtml(InputStream stream) throws IOException { @@ -71,7 +71,7 @@ public class Mammoth { public static Result<String> extractRawText(File file) throws IOException { return withDocxFile(file, zipFile -> readDocument(Optional.of(file.toPath()), zipFile) - .map(Mammoth::extractRawTextOfChildren)); + .map(DocumentConverter::extractRawTextOfChildren)); } private static <T> T withDocxFile(File file, Function<DocxFile, T> function) throws IOException { |
