se.biltmore.tools.odttoapt.maven.plugin
Class ODT2APTMojo.ODTImageHandler

java.lang.Object
  extended by se.biltmore.tools.odttoapt.maven.plugin.ODT2APTMojo.ODTImageHandler
All Implemented Interfaces:
ImageHandler
Enclosing class:
ODT2APTMojo

public class ODT2APTMojo.ODTImageHandler
extends Object
implements ImageHandler

Provides an implementatin of ImageHandler.


Field Summary
private  ZipFile odtDocument
          The odt document as a zip file.
 
Constructor Summary
ODT2APTMojo.ODTImageHandler(ZipFile odtDocument)
          Creates a new ODTImageHandler instance.
 
Method Summary
 void extractImage(String sourcePath)
          Extracts an image from an .odt file.
 String getExtractedPath(String sourcePath)
          Returns the extracted path of the image path specified.
 String getImageAPTLinkPath(String sourcePath)
          Returns the path to use in the APT document to the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

odtDocument

private ZipFile odtDocument
The odt document as a zip file.

Constructor Detail

ODT2APTMojo.ODTImageHandler

public ODT2APTMojo.ODTImageHandler(ZipFile odtDocument)
Creates a new ODTImageHandler instance.

Parameters:
odtDocument - The odt document to extract the image from.
Method Detail

extractImage

public void extractImage(String sourcePath)
                  throws SAXException
Extracts an image from an .odt file.

Specified by:
extractImage in interface ImageHandler
Parameters:
sourcePath - The path relative to the .odt file root.
Throws:
SAXException - on any failure.

getExtractedPath

public String getExtractedPath(String sourcePath)
                        throws SAXException
Returns the extracted path of the image path specified.

Specified by:
getExtractedPath in interface ImageHandler
Parameters:
sourcePath - The path to get the extracted path for.
Throws:
SAXException

getImageAPTLinkPath

public String getImageAPTLinkPath(String sourcePath)
                           throws SAXException
Returns the path to use in the APT document to the image.

Specified by:
getImageAPTLinkPath in interface ImageHandler
Parameters:
sourcePath - The path to produce the APT link path from.
Throws:
SAXException


Copyright © 2009-2010 Biltmore Group AB. All Rights Reserved.