java.lang.Object
org.crosswire.bible.book.raw.Mem
org.crosswire.bible.book.raw.InstsMem
org.crosswire.bible.book.raw.WordInstsMem
- All Implemented Interfaces:
- Insts
- public class WordInstsMem
- extends InstsMem
A WordInstsMem provides access to the list of word ids that make up
a Passage. The central interface is an Eumeration over the words in
the given verse.
We should probably avoid cacheing at this level since there are
other Bibles that could do with cacheing.
The layout of the underlying file probably has a lot in common with
the WordResource class, instead of an array of ascii bytes for each
index, we have a get of integers in bytes for an index. Techniques like
capitalizing the first letter to indicate the start of a new word will
not work here, so perhaps we should no do them in WordResource either?
The other difference with the WordResource class is that there is no
inherent meaning in having abimelech after aaron, whereas having
Gen 1:2 after Gen 1:1 makes perfect sense.
Inheritance will make use of these similarities, however we need to
remember that there are some important conceptual differences.
In the AV there are 790790 words, in the NIV there are 726111 words.
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
| Fields inherited from class org.crosswire.bible.book.raw.InstsMem |
array |
| Methods inherited from class org.crosswire.bible.book.raw.Mem |
load, save |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crosswire.bible.book.raw.Insts |
save |
WordInstsMem
public WordInstsMem(RawBible raw,
boolean create)
throws java.lang.Exception
- Basic constructor
load
public void load(java.io.InputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Load the Resource from a stream
- Specified by:
load in class Mem
save
public void save(java.io.OutputStream out)
throws java.io.IOException
- Ensure that all changes to the index of words are written to a
stream
- Specified by:
save in class Mem