I'll start taking a look at that this week, particularly related to the following thoughts: <br><br>OSGi runs a service model. Our concept of plugins wouldn't make for a perfect match with an RCP plugin. The RCP plugin, on activation, would have to reach into a JSword OSGi service to register itself, in much the same way you register a Filter with FilterFactory today (this is a minor point, but I think worth mentioning). One major benefit of having it be a service, though, is that you're talking to an interface managed by the OSGi framework, instead of an instance sitting in a dependent jar.<br><br>Losing the RCP dependency means losing some of the job interfaces (e.g. IProgressMonitor). We can replace this with something that's easily adapted to RCP's classes. <br><br>I think we'll need to identify where exactly the JSword jar and Common jar connect to each other, and probably with BibleDesktop's application jars. I created one RCP plugin for these jars because I didn't
see a gain in managing the package relationships. Would we want to export/expose all of their packages or should we consider making some packages private (implementation packages, e.g. o.c.j.book.filter.gbf, come to mind)?<br><br>From an Eclipse perspective, we probably want to make these plain Java projects rather than plugin projects. The OSGi implementation used by the plugins is part of the org.eclipse.osgi_*.jar. I'll look into finding a framework-neutral OSGi jar that we can use.<br><br><br><b><i>DM Smith <dmsmith555@yahoo.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> I mentioned in my last email that using OSGi for plugins would be desirable.<br><br>Would someone like to take this on. I'd like to see one or more of these <br>prototyped to use OSGi library directly and as indirectly through RCP.<br><br>My apologies in advance for how badly this outline will wrap.<br><br>Here
are the classes in JSword that use a plugin model. (note: using <br>abbreviated package names)<br>Filter:<br>We use a Filter to transform from a text string in input language into <br>an OSIS xml document.<br>o.c.j.book.filter.Filter.properties<br> Pairs implementation of o.c.j.book.filter.Filter.java to symbolic names.<br> o.c.j.book.filter.FilterFactory will provide an instance of the <br>requested filter by symbolic name.<br> Note: we anticipate the addition of a "TEI" filter.<br><br>Installer: (A bit convoluted)<br>We use an installer to "download" books from a download site.<br>o.c.j.book.install.InstallerFactory.properties<br> Pairs implementations of o.c.j.book.install.InstallerFactory.java to <br>symbolic names that mimic specialized protocols.<br> o.c.j.book.install.InstallerManager.java will manage Installer <br>instances of the requested InstallerFactory by symbolic name.<br> Note: o.c.j.book.install.InstallManager.properties is a persistent,
<br>initial store of download sites. It is not a plugin.<br> Note: We anticipate the addition of two more installers:<br> A direct download installer which would grab and install a zip <br>of a module.<br> A local file-system installer which would copy a module from one <br>location to the current install location.<br><br>Index/Query/Search:<br>Creating an index of a Book, formulating queries, and searching an index <br>are a dependent set. We use a plugin model so that we can develop new <br>techniques. Currently we only allow for a single set of behavior. While <br>there are interdependencies, these are manually managed by the developer <br>changing these plugins. If we allowed for more than one kind of index <br>this would need to be changed.<br>o.c.j.book.index.IndexManager.properties<br> The IndexManager manages the life-cycle of an Index.<br> Names the one and only one implementation of IndexManager.<br>
o.c.j.book.index.IndexManagerFactory.java provides an instance of <br>the IndexManager.<br><br>o.c.j.index.query.QueryBuilder.properties<br> A QueryBuilder parses a string into a Query.<br> This property names the one and only implementation of a QueryBuilder.<br> An instance of the QueryBuilder is provided by the QueryBuilderFactory.<br><br>o.c.j.index.query.QueryDecorator.properties<br> A QueryDecorator decorates a string with the requested decoration.<br> The purpose is to allow for the programmatic generation of inputs to <br>QueryBuilder.<br> This property names the one and only implementation of a QueryDecorator.<br> QueryDecoratorFactory doles out instances of QueryDecorator.<br><br>o.c.j.index.search.Searcher.properties<br> A Searcher applies a Query against an Index to return all the hits <br>as a Key (which can be a list of Keys).<br> This property names the one and only implementation of a Searcher.<br> SearcherFactory can be
requested for an instance of a Searcher, <br>which is not reusable.<br><br>Book/Module handling:<br>o.c.j.book.BookDriver.properties<br> Pairs implementations of BookDriver to a symbolic name, where each <br>named BookDriver handles the set of books known to that driver.<br> All implemented BookDrivers are registered via Book.autoRegister <br>which calls Book.registerDriver, thus acting as a Book factory.<br> Note: currently we have 2 BookDrivers:<br> SwordBookDriver which describes the Sword modules that JSword <br>currently handles (only GenBook is lacking)<br> ReadingsBookDriver which describes a daily reading plan.<br> Note: We hope to add a driver which will allow for the direct <br>importation of OSIS Bibles (and subsequently other kinds of OSIS documents)<br> Note: It should be possible to add an ESwordBookDriver, but we won't <br>go there.<br><br>Conversion of OSIS XML to HTML<br>o.c.c.xml.Converter.properties (This is messy and should be
"fixed")<br> Provides a named list of ways to transform XML.<br> o.c.j.util.ConverterFactory acts as a factory for Converters named <br>"Configurable" (hardcoded)<br> o.c.b.util.ConfigurableSwingConverter.java allows for the user to <br>pick via options which known xsl the user wishes to use. (This ability <br>is turned off since there is only one style provided.)<br><br><br><br> <br> <br><br><br><br>_______________________________________________<br>jsword-devel mailing list<br>jsword-devel@crosswire.org<br>http://www.crosswire.org/mailman/listinfo/jsword-devel<br></blockquote><br><p> 
<hr size=1>Want to start your own business? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index">Yahoo! Small Business.</a>