Changes between Version 13 and Version 14 of BOOK_HTML_EXPORT_R0
- Timestamp:
- 06/05/09 09:13:01 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BOOK_HTML_EXPORT_R0
v13 v14 41 41 = Design = 42 42 * Exporting sophie books to html, will use the org.sophie2.base.persistence library. For more information about it see [wiki:GROUP_PERSISTENCE_R0]. 43 * Will create a module for HTML export named [source:/ branches/private/peko/peko2/modules/org.sophie2.extra.func.html org.sophie2.extra.func.html]44 * It will have a module class named [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/HtmlModule.java HtmlModule] that will register all the extensions of the [source:branches/private/peko/peko2/modules/org.sophie2.base.persistence/src/main/java/org/sophie2/base/persistence/persister/MasterPersister.java MasterPersister].43 * Will create a module for HTML export named [source:/trunk/sophie2-platform/modules/org.sophie2.extra.func.html org.sophie2.extra.func.html] 44 * It will have a module class named [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/HtmlModule.java HtmlModule] that will register all the extensions of the [source:trunk/sophie2-platform/modules/org.sophie2.base.persistence/src/main/java/org/sophie2/base/persistence/persister/MasterPersister.java MasterPersister]. 45 45 * Will create Persister implementations for Book, Page, Frame and ImmImage and will register them as extensions to the MasterPersister. The already created persisters about Book, Page etc are not of use for the html persisting. The tags used are not html compatible. That is why the new ones will be created that are alike the already created, differing in schema and tags. 46 * [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/BookToHtmlPersister.java BookToHtmlPersister] having a schema "book|storage|html" - will convert a book to a storage node.47 * [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/PageToHtmlPersister.java PageToHtmlPersister] having a schema "page|storage|html" - will convert a page to a storage node.48 * [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/FrameToHtmlPersister.java FrameToHtmlPersister] having a schema "frame|storage|html" - will convert a frame to a storage node.46 * [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/BookToHtmlPersister.java BookToHtmlPersister] having a schema "book|storage|html" - will convert a book to a storage node. 47 * [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/PageToHtmlPersister.java PageToHtmlPersister] having a schema "page|storage|html" - will convert a page to a storage node. 48 * [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/FrameToHtmlPersister.java FrameToHtmlPersister] having a schema "frame|storage|html" - will convert a frame to a storage node. 49 49 * The FrameToHtmlPersister will invoke two other persisters for text and images: 50 * [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/HotTextToHtmlPersister.java HotTextToHtmlPersister] having a schema "hottext|storage|html" - will convert a Sophie formated text to a storage node.51 * [source: branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/ImmImageToHtmlPersister.java ImmImageToHtmlPersister] having a schema "imm:image|storage|html" - will convert a Sophie ImmImage to a storage node.50 * [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/HotTextToHtmlPersister.java HotTextToHtmlPersister] having a schema "hottext|storage|html" - will convert a Sophie formated text to a storage node. 51 * [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/persister/ImmImageToHtmlPersister.java ImmImageToHtmlPersister] having a schema "imm:image|storage|html" - will convert a Sophie ImmImage to a storage node. 52 52 * These will also be extensions of the MasterPersister. 53 53 * Will create a Persister implementation named HthlPersister for converting from a storage tree to HTML file. It will have a schema as follows - "storage|text:html|html". It will create an XHTML file and a directory containing the resources - current only the images. It will also be registerred as an extension to the MasterPersister. 54 * Exporting to HTML will be done from the [source: branches/private/peko/peko2/modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/ExportSubMenu.java ExportSubMenu] which is a sub-menu of the file menu. An [source:branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/ExportAsHtmlItem.java ExportAsHtmlItem] will represent a menu item in the ExportSubMenu which when clicked fires an event that will be handled in a [source:branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/HtmlLogic.java HtmlLogic]. '''Note: The [source:/branches/private/peko/peko2/modules/org.sophie2.extra.func.print/src/main/java/org/sophie2/extra/func/print/pdf/export/ExportToPDFItem.java ExportToPDFItem] will also be attached to the ExportSubMenu, since that menu will contain all supported formats that we export to.'''54 * Exporting to HTML will be done from the [source:trunk/sophie2-platform/modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/ExportSubMenu.java ExportSubMenu] which is a sub-menu of the file menu. An [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/ExportAsHtmlItem.java ExportAsHtmlItem] will represent a menu item in the ExportSubMenu which when clicked fires an event that will be handled in a [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/main/java/org/sophie2/extra/func/html/HtmlLogic.java HtmlLogic]. '''Note: The [source:/trunk/sophie2-platform/modules/org.sophie2.extra.func.print/src/main/java/org/sophie2/extra/func/print/pdf/export/ExportToPDFItem.java ExportToPDFItem] will also be attached to the ExportSubMenu, since that menu will contain all supported formats that we export to.''' 55 55 * The title of the ExportSubMenu will be "Export as ...". It will have a mnemonic VK_E. The mnemonic of the ExportToPDFItem will be VK_P and its title "PDF". The mnemonic of the ExportAsHtmlItem will be VK_H and its title "HTML". 56 56 * The logic will eventually show a dialog and prompt the user to export the book to a file. … … 67 67 * [changeset:3199] - synchronized with trunk. 68 68 * [changeset:3217] - synchronized with trunk. 69 * Test: [source:branches/private/peko/peko2/modules/org.sophie2.extra.func.html/src/test/java/org/sophie2/extra/func/html/HtmlExportTest.java HtmlExportTest] 69 * Test: [source:trunk/sophie2-platform/modules/org.sophie2.extra.func.html/src/test/java/org/sophie2/extra/func/html/HtmlExportTest.java HtmlExportTest] 70 71 Design related code merged into the trunk in [3223]. 70 72 71 73 = Implementation =