public class DocxContentImporter extends Object implements ContentImporter, Serviceable, Contextualizable
Modifier and Type | Class and Description |
---|---|
private class |
DocxContentImporter.DocxPrefixResolver |
Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private DOMParser |
_domParser |
protected ServiceManager |
_manager
The service manager
|
private SourceResolver |
_resolver |
private XPathProcessor |
_xPathProcessor |
Constructor and Description |
---|
DocxContentImporter() |
Modifier and Type | Method and Description |
---|---|
private String |
_getContentType(String contentType) |
private Document |
_getDocument(ZipFile zipFile,
String entryName,
File file) |
void |
contextualize(Context context) |
String[] |
getMimeTypes()
Returns all mime types handled by this importer.
|
void |
importContent(File file,
ModifiableWebContent content,
Map<String,String> params)
Extracts file content and populates the given
Content . |
void |
postTreatment(ModifiablePage page,
Content content,
File file)
Post treatment after import process
|
void |
service(ServiceManager manager) |
protected ServiceManager _manager
private SourceResolver _resolver
private DOMParser _domParser
private XPathProcessor _xPathProcessor
public DocxContentImporter()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void importContent(File file, ModifiableWebContent content, Map<String,String> params) throws IOException
ContentImporter
Content
.
Typical usage is to provide a newly created empty Content.importContent
in interface ContentImporter
file
- the source.content
- the Content
to be populated.params
- in/out params to set and get additional data to and from the importer.IOException
- if an error occurs processing the stream.private String _getContentType(String contentType)
public String[] getMimeTypes()
ContentImporter
getMimeTypes
in interface ContentImporter
public void postTreatment(ModifiablePage page, Content content, File file) throws IOException
ContentImporter
postTreatment
in interface ContentImporter
page
- The created pagecontent
- The created contentfile
- The imported fileIOException
- if an error occurredprivate Document _getDocument(ZipFile zipFile, String entryName, File file) throws IOException
IOException