|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lizardtech.djvu.DjVuObject
com.lizardtech.djvu.DjVmDir
public final class DjVmDir
This class represents an index structure for bundled and indexed documents.
| Nested Class Summary | |
|---|---|
static class |
DjVmDir.File
This class stores the details about a single page of include file within a document. |
| Field Summary | |
|---|---|
static int |
version
The version of this class. |
| Fields inherited from class com.lizardtech.djvu.DjVuObject |
|---|
hasReferences |
| Constructor Summary | |
|---|---|
DjVmDir()
Creates a new DjVmDir object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Create a copy by value of this instance. |
static DjVmDir |
createDjVmDir(DjVuInterface ref)
Creates an instance of DjVmDir with the options interherited from the specified reference. |
DjVmDir.File |
createFile()
Create a new instance of DjVmDir.File |
DjVmDir.File |
createFile(java.lang.String load_name,
java.lang.String save_name,
java.lang.String title,
int file_type)
Create a new instance of DjVmDir.File |
void |
decode(CachedInputStream pool)
Called to decode the data source and initialize this index. |
void |
delete_file(java.lang.String id)
Called to remove the named file from the index. |
int |
get_file_pos(DjVmDir.File f)
Called to find the position of a File in the list |
java.util.Vector |
get_files_list()
Query the file list. |
int |
get_files_num()
Query the size of the file list |
int |
get_page_pos(int page_num)
Query the position of a page in the list |
int |
get_pages_num()
Query the number of pages in the index. |
DjVmDir.File |
get_shared_anno_file()
Query the document shared annotation |
java.net.URL |
getInitURL()
Get the top level URL used to initialize this document. |
int |
getPageno(java.lang.String url)
Convert a relative url to a page number. |
DjVmDir.File |
id_to_file(java.lang.String id)
Called to map an id to a File. |
int |
insert_file(DjVmDir.File file)
Called to add a file to the index. |
int |
insert_file(DjVmDir.File file,
int pos_num)
Called to add a file to the index. |
boolean |
is_bundled()
Query if the index is for a bundled document. |
boolean |
is_indirect()
Query if the index is for an indirect document. |
boolean |
isImageData()
Query if this is image data. |
DjVmDir.File |
name_to_file(java.lang.String name)
Query the File mapped to name. |
DjVmDir.File |
page_to_file(int page_num)
Query the File mapped to the specified page number. |
void |
set_file_name(java.lang.String id,
java.lang.String name)
Set the filename corresponding to an id. |
void |
set_file_title(java.lang.String id,
java.lang.String title)
Set the title corresponding to an id. |
void |
setInitURL(java.net.URL url)
Set the top level URL used to initialize this document. |
DjVmDir.File |
title_to_file(java.lang.String title)
Find the DjVmDir.File with the specified title. |
| Methods inherited from class com.lizardtech.djvu.DjVuObject |
|---|
checkLockTime, create, create, createSoftReference, createWeakReference, getDjVuOptions, getFromReference, invoke, logError, printStackTrace, setDjVuOptions, verbose |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.lizardtech.djvu.DjVuInterface |
|---|
getDjVuOptions, setDjVuOptions |
| Field Detail |
|---|
public static final int version
| Constructor Detail |
|---|
public DjVmDir()
| Method Detail |
|---|
public static DjVmDir createDjVmDir(DjVuInterface ref)
ref - Object to interherit DjVuOptions from.
public boolean isImageData()
isImageData in interface Codecpublic void setInitURL(java.net.URL url)
url - DOCUMENT ME!public java.net.URL getInitURL()
public int getPageno(java.lang.String url)
url - The URL to convert
public java.lang.Object clone()
clone in class java.lang.Objectpublic DjVmDir.File createFile()
public DjVmDir.File createFile(java.lang.String load_name,
java.lang.String save_name,
java.lang.String title,
int file_type)
load_name - the name used for loadingsave_name - the name used for savingtitle - the titlefile_type - the type of record
public void decode(CachedInputStream pool)
throws java.io.IOException
decode in interface Codecpool - data source
java.io.IOException - if an error occurspublic void delete_file(java.lang.String id)
id - the name of the file to removepublic int get_file_pos(DjVmDir.File f)
f - the file to search for
public java.util.Vector get_files_list()
public int get_files_num()
public int get_page_pos(int page_num)
page_num - page number to search for
public int get_pages_num()
public DjVmDir.File get_shared_anno_file()
public DjVmDir.File id_to_file(java.lang.String id)
id - the load name to look for
public int insert_file(DjVmDir.File file)
throws java.io.IOException
file - DjVmDir.File object to add
java.io.IOException - if an error occurs
public int insert_file(DjVmDir.File file,
int pos_num)
throws java.io.IOException
file - DjVmDir.File object to addpos_num - the position to insert the file
java.io.IOException - if an error occurspublic boolean is_bundled()
public boolean is_indirect()
public DjVmDir.File name_to_file(java.lang.String name)
name - the name to look for
public DjVmDir.File page_to_file(int page_num)
page_num - the page number to look for
public void set_file_name(java.lang.String id,
java.lang.String name)
throws java.io.IOException
id - the id to mapname - the name to map
java.io.IOException - if an error occurs
public void set_file_title(java.lang.String id,
java.lang.String title)
throws java.io.IOException
id - the id to maptitle - the title to map to
java.io.IOException - if an error occurspublic DjVmDir.File title_to_file(java.lang.String title)
title - the title to search for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||