Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.eireneh.bible.book.raw
Class InstsDisk  view InstsDisk download InstsDisk.java

java.lang.Object
  extended bycom.eireneh.bible.book.raw.Disk
      extended bycom.eireneh.bible.book.raw.InstsDisk
All Implemented Interfaces:
Insts
Direct Known Subclasses:
PuncInstsDisk, WordInstsDisk

public abstract class InstsDisk
extends Disk
implements Insts

InstsDisk is a Base implementation of the Insts interface using the in on disk model (Disk).
Distribution Licence:
Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.

Version:
D0.I0.T0

Field Summary
protected  boolean create
          Are we allowed to create new indexes
protected  long[] index
          The file offsets
protected  java.lang.String leafname
          The leafname of the file read
protected  RawBible raw
          The RawBible co-ordinated the various classes that cache the files
 
Constructor Summary
InstsDisk(RawBible raw, java.lang.String leafname, boolean create)
          Basic constructor
InstsDisk(RawBible raw, java.lang.String leafname, boolean create, java.lang.StringBuffer messages)
          Create a WordResource from a File that contains the dictionary.
 
Method Summary
private  void ctor(RawBible raw, java.lang.String leafname, boolean create)
          This really should be a constructor, however the StringBuffer ctor wants to trap and muffle exceptions.
 int[] getIndexes(com.eireneh.bible.passage.Verse verse)
          Retrieve an ordered list of the words in a Verse
abstract  void load()
          Load the Resource from a named file
 void save()
          Lzay resources can not be used for creation
 void setIndexes(int[] indexes, com.eireneh.bible.passage.Verse verse)
          Set a list of word indexes as the test to a Verse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eireneh.bible.book.raw.Insts
getIndexes
 

Field Detail

index

protected long[] index
The file offsets


create

protected boolean create
Are we allowed to create new indexes


leafname

protected java.lang.String leafname
The leafname of the file read


raw

protected RawBible raw
The RawBible co-ordinated the various classes that cache the files

Constructor Detail

InstsDisk

public InstsDisk(RawBible raw,
                 java.lang.String leafname,
                 boolean create)
          throws java.lang.Exception
Basic constructor


InstsDisk

public InstsDisk(RawBible raw,
                 java.lang.String leafname,
                 boolean create,
                 java.lang.StringBuffer messages)
Create a WordResource from a File that contains the dictionary.

Method Detail

ctor

private void ctor(RawBible raw,
                  java.lang.String leafname,
                  boolean create)
           throws java.lang.Exception
This really should be a constructor, however the StringBuffer ctor wants to trap and muffle exceptions. and I can't do this: try { this(...) } ...


load

public abstract void load()
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException,
                          java.net.MalformedURLException
Load the Resource from a named file


save

public void save()
          throws java.io.IOException
Lzay resources can not be used for creation

Specified by:
save in interface Insts

getIndexes

public int[] getIndexes(com.eireneh.bible.passage.Verse verse)
Retrieve an ordered list of the words in a Verse

Specified by:
getIndexes in interface Insts

setIndexes

public void setIndexes(int[] indexes,
                       com.eireneh.bible.passage.Verse verse)
Set a list of word indexes as the test to a Verse

Specified by:
setIndexes in interface Insts