[jsword-devel] Patch for book stuff
DM Smith
jsword-devel@crosswire.org
Thu, 01 Apr 2004 17:34:39 -0500
Joe Walker wrote:
>
>
>I'm doing this quickly, so sorry If I'm not looking properly. Why do we
>need isCompressedBackendSupported() when the backend can tell you itself. I
>guess we've not ctor'ed it yet?
Yes, it is because it is not constructed yet. So we don't know which one to
ask.
We can't construct one because we don't have a "path" for it.
>
>Applying anyway. Virtually untested bar running it up.
>
>Joe.
>
>DM Smith wrote:
>>I have made a few more changes.
>>I added isSupported to Backend and implemented it in each derived class.
>>This returns true if the backend is implemented.
>>
>>I added isSupported(SwordBookMetaData sbmd) to ModuleType to have it
>>return whether it or its backend is supported.
>>I modified SwordBookMetaData.isSupported to:
>> see if it has a name
>> see if it has a supported ModuleType (it used to just check to see the
>>ModuleType had a BookType)
>> see if it is locked
>> to output all the reasons the book is not supported. (I moved
>>diagnostics here from the ctor and from SwordInstaller)
>>
>>I added more constants for HISTORY to ConfigEntry so that I could add the
>>diagnostic on unknown ConfigEntries to SBMD.
>>
>>I changed the parsing in SBMD to be tolerant of the errors I mentioned in
>>an earlier e-mail.
>>
>>I changed the writing of the SBMD to file to be a copy of the original.
>>
>>I modified SwordInstaller
>> to not install a book if it is already installed (This fixes a bug)
>> by moving the check for locked into SBMD.isSupported
>>
>>I changed APIexamples by adding a main to it and changing the book to KJV
>>(I could not find AV).
>>
>>I also made numerous changes to Books. Basically, Books had two different
>>contracts/patterns. One of a class factory or utility class w/ the static
>>methods and the other of a singlton. It should use one or the other. So I
>>did the singleton.
>>First, I made all the static methods except installed() to be member
>>methods.
>>Likewise for all the static fields, except installed and log.
>>This resulted in trivial changes to files which called the static methods
>>to use the installed() method.
>>I moved the static initialization of the drivers into member methods and
>>called them from the constructor.
>>As is my habit, I constructed fields in the constructor.
>>I finished the synchronization of the class since some of the accessors
>>could be used at the same time as the modifiers.
>>
>>I added getFullNameArray to Books because it seemed to belong ther and not
>>in OptionsAction
>>
>>I changed the method getBookMetaData(String name) to check getInitials as
>>well. This is what was expected by APIExamples.
>>
>>Finally, I merged Joe's latest changes to Books.
>>
>>The zip file contains the patch and Books.java in case the patch does not
>>work.
>>
>>_________________________________________________________________
>>Find a broadband plan that fits. Great local deals on high-speed Internet
>>access.
>>https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/
>
>
>_______________________________________________
>jsword-devel mailing list
>jsword-devel@crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel
_________________________________________________________________
Check out MSN PC Safety & Security to help ensure your PC is protected and
safe. http://specials.msn.com/msn/security.asp