[jsword-devel] How to check for GlobalOptionFilter=OSISStrongs in .conf file
scribe777@gmail.com
scribe at crosswire.org
Wed Jun 8 10:42:33 MST 2011
I believe this is a bug in the module. If the text provides a Strong's marked translation, then feature should be set. The filter list to handle these things can grow, shrink, be renamed, whatever.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
DM Smith <dmsmith at crosswire.org> wrote:
On 06/07/2011 04:37 PM, Martin Denham wrote:
Books containing Strong's Numbers don't always have:
Feature=StrongsNumbers
in their .conf file
But they do always have:
GlobalOptionFilter=OSISStrongs
Checking for 'Feature=StrongsNumbers' is easy:
book.hasFeature(FeatureType.STRONGS_NUMBERS)
But I don't know how to check for 'GlobalOptionFilter=OSISStrongs'.
Can anybody give me some advice or sample code?
There's a bug in the assumption in o.c.j.book.sword.SwordBookMetaData.hasFeature(FeatureType feature)
It looks first at Feature and then at GlobalOptionFilters. It assumes that the filter is named the same as the Feature but has the SourceType appended to it.
The basic difference between SWORD API and JSword regarding GlobalOptionFilters is that for SWORD, they are the name of a class that does filtering and the order of the filters in the conf can make a difference. For JSword, all filtering takes place in the XSLT. I had thought that (prior to Peter's input) in a SWORD app the presence of a Feature is meant to indicate whether the toggle should be made available and the presence of the GlobalOptionFilter is what actually does the work.
I think the easiest fix is to change:
o.c.j.book.FeatureType.STRONGS_NUMBER("StrongsNumber");
to
o.c.j.book.FeatureType.STRONGS_NUMBER("Strongs");
This change should work correctly for all JSword apps.
Hope that helps for now....
In Him,
DM
Thanks
Martin
_______________________________________________ jsword-devel mailing list jsword-devel at crosswire.org http://www.crosswire.org/mailman/listinfo/jsword-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110608/fec15a65/attachment.html>
More information about the jsword-devel
mailing list