It would be an excellent idea to isolate the parser from the jamwiki core.
AbstractParser. JAMWiki ships with two parsers: the standard parser and the bliki parser. -- Ryan 26-Jul-2007 12:13 PDTThis is the metrics view from Jamwiki
As we can see, there is a strong coupling (all nodes reachable from each other, called "tangle" from now on are in Red) between:
| Afferent Couplings | Efferent Couplings | Abstractness | Instability | Distance |
|---|---|---|---|---|
| 7 | 8 | 33.0% | 52.999996% | 13.0% |
| Abstract Classes | Concrete Classes | Used by Packages | Uses Packages |
|---|---|---|---|
| org.jamwiki.parser.AbstractParser org.jamwiki.parser.ParserTag |
org.jamwiki.parser.ParserDocument org.jamwiki.parser.ParserInput org.jamwiki.parser.TableOfContents org.jamwiki.parser.TableOfContents$TableOfContentsEntry |
org.jamwiki org.jamwiki.db org.jamwiki.parser.bliki org.jamwiki.parser.jflex org.jamwiki.search org.jamwiki.servlets org.jamwiki.utils |
java.io java.lang java.util java.util.regex org.jamwiki org.jamwiki.model org.jamwiki.utils org.springframework.web.util |
| Afferent Couplings | Efferent Couplings | Abstractness | Instability | Distance |
|---|---|---|---|---|
| 0 | 8 | 0.0% | 100.0% | 0.0% |
| Abstract Classes | Concrete Classes | Used by Packages | Uses Packages |
|---|---|---|---|
| None | org.jamwiki.parser.bliki.BlikiParser org.jamwiki.parser.bliki.JAMWikiModel |
None | info.bliki.wiki.filter java.lang org.jamwiki org.jamwiki.model org.jamwiki.parser org.jamwiki.parser.jflex org.jamwiki.utils org.springframework.util |
| Afferent Couplings | Efferent Couplings | Abstractness | Instability | Distance |
|---|---|---|---|---|
| 1 | 11 | 5.0% | 92.0% | 4.0% |
| Abstract Classes | Concrete Classes | Used by Packages | Uses Packages |
|---|---|---|---|
| org.jamwiki.parser.jflex.AbstractLexer |
org.jamwiki.parser.jflex.CharacterTag org.jamwiki.parser.jflex.HtmlCommentTag org.jamwiki.parser.jflex.HtmlLinkTag org.jamwiki.parser.jflex.HtmlPreTag org.jamwiki.parser.jflex.HtmlTag org.jamwiki.parser.jflex.IncludeOnlyTag org.jamwiki.parser.jflex.JAMWikiPostProcessor org.jamwiki.parser.jflex.JAMWikiPreProcessor org.jamwiki.parser.jflex.JAMWikiProcessor org.jamwiki.parser.jflex.JAMWikiSpliceProcessor org.jamwiki.parser.jflex.JFlexParser org.jamwiki.parser.jflex.NoIncludeTag org.jamwiki.parser.jflex.ParserUtil org.jamwiki.parser.jflex.TemplateTag org.jamwiki.parser.jflex.WikiHeadingTag org.jamwiki.parser.jflex.WikiLinkTag org.jamwiki.parser.jflex.WikiListTag org.jamwiki.parser.jflex.WikiNowikiTag org.jamwiki.parser.jflex.WikiReferenceTag org.jamwiki.parser.jflex.WikiReferencesTag org.jamwiki.parser.jflex.WikiSignatureTag |
org.jamwiki.parser.bliki |
java.io java.lang java.text java.util java.util.regex org.jamwiki org.jamwiki.model org.jamwiki.parser org.jamwiki.utils org.springframework.util org.springframework.web.util |
At this point, there is
As of revision 2027 it is now possible to use the JAMWiki parser in a standalone mode. There are further changes that will occur to cleanup the interfaces, but currently the jamwiki-core Maven project will generate a JAR file containing everything required to parse Mediawiki syntax into HTML. See the org.jamwiki.parser.ParserTest.java file within the jamwiki-core project's unit test directory for an example of how to use the parser in a standalone setting, noting that several resource files and a DataHandler instance will still be needed to successfully run the parser.
The original work on this task was abandoned due to the inter-dependencies between all of the JAMWiki packages. Over the past few releases I've been making an effort to reduce these dependencies up as much as possible, with an eventual goal of modularizing the JAMWiki project to look something like the following (NOT final - will definitely change):
This re-organization is a work-in-progress and not a tremendously high priority, but I'm posting here for those who watch the Subversion commits and wonder what the goal of the occasional cleanup re-organization commit might be. -- Ryan 19-Jan-2008 17:40 PST
mvn site is currently a bit broken, but a working jamwiki WAR file can be generated. The next step is to split out a jamwiki-parser project, and to potentially split out additionally modules if it makes sense to do so. -- Ryan 27-Jan-2008 22:35 PST