All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.docx4j.openpackaging.parts.WordprocessingML.AltChunkType Maven / Gradle / Ivy

Go to download

docx4j is a library which helps you to work with the Office Open XML file format as used in docx documents, pptx presentations, and xlsx spreadsheets.

There is a newer version: 11.4.11
Show newest version
package org.docx4j.openpackaging.parts.WordprocessingML;

import org.docx4j.openpackaging.contenttype.ContentTypes;

public enum AltChunkType {
	// Same as http://msdn.microsoft.com/en-us/library/documentformat.openxml.packaging.alternativeformatimportparttype.aspx
	// except that has 'htm', not 'html'
	
	Xhtml("xhtml", "application/xhtml+xml"),
				// Alternatively, you can serve your XHTML (any version) as application/xml, or even as text/xml
				// but which is right for Word?
    Mht("mht", "message/rfc822"), 
    
    // Office 2003 Word XML format (schemas) and the Office 2007 flat OPC format.
    Xml("xml", "application/xml"),	 // see http://blogs.msdn.com/b/ericwhite/archive/2010/03/11/formats-supported-for-altchunk.aspx
    
    TextPlain("txt", "text/plain"),
    WordprocessingML("docx", ContentTypes.WORDPROCESSINGML_DOCUMENT),
    OfficeWordMacroEnabled("docm", ContentTypes.WORDPROCESSINGML_DOCUMENT_MACROENABLED),
    OfficeWordTemplate("dotx", ContentTypes.WORDPROCESSINGML_TEMPLATE),
    OfficeWordMacroEnabledTemplate("dotm",ContentTypes.WORDPROCESSINGML_TEMPLATE_MACROENABLED),
    Rtf("rtf", "text/rtf"),
    Html("html", "text/html");
	
	// file name extension
	private String extension;
	// content-type
	private String contentType;
	
	private AltChunkType(String extension, String contentType) {
		this.extension = extension;
		this.contentType = contentType;
	}
	
	public String getExtension() {
		return extension;
	}
	
	public String getContentType() {
		return contentType;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy