org.eadge.extractpdfexcel.data.SortedData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdf-to-excel Show documentation
Show all versions of pdf-to-excel Show documentation
A Java library used to convert PDF to Excel.
The newest version!
package org.eadge.extractpdfexcel.data;
import java.util.HashMap;
import java.util.Map;
/**
* Created by eadgyo on 12/07/16.
*
* Blocks sorted in lines and columns, and separated in pages
*/
public class SortedData
{
private Map sortedPages;
public SortedData()
{
sortedPages = new HashMap();
}
/**
* Insert an sortedPage
*
* @param pageIndex index of concerned page
* @param sortedPage inserted sortedPage
*/
public void insertPage(int pageIndex, SortedPage sortedPage)
{
this.sortedPages.put(pageIndex, sortedPage);
}
/**
* Get all blocks in all page
*
* @return all blocks separated in page
*/
public Map getPages()
{
return sortedPages;
}
/**
* Get extracted page using his page index
*
* @param pageIndex index of page
* @return page with extracted data
*/
public SortedPage getSortedPage(int pageIndex)
{
return sortedPages.get(pageIndex);
}
public int numberOfPages()
{
return sortedPages.size();
}
}