Dashboard > blojsom > ... > The Lab > XStream testing
  blojsom Log In   View a printable version of the current page.  
  XStream testing
Added by David Czarnecki, last edited by David Czarnecki on Jul 02, 2004  (view change)
Labels: 
(None)

What is XStream?

XStream is "a simple library to serialize objects to XML and back again."

Why incorporate XStream into blojsom?

I wanted to see how another file format still utilizing the file system as the content database could be integrated into blojsom.

What do I need to compile and use this?

  1. Download XStream. This code was compiled against XStream 1.0.1.
  2. Place the attached source files in the appropriate directories in your blojsom source tree.
  3. Compile blojsom's JAR files.
  4. In /WEB-INF/blojsom.properties, use the following for the fetcher configuration property.

    blojsom-fetcher=org.blojsom.fetcher.xstream.XStreamFetcher

  5. In /WEB-INF/plugin.properties, use the following for the comment and trackback plugin.

    comment=org.blojsom.plugin.comment.xstream.CommentPlugin
    trackback=org.blojsom.plugin.trackback.xstream.TrackbackPlugin

What does a blog entry look like?

<org.blojsom.blog.xstream.XStreamBlogEntry>
  <_blogCategory class="org.blojsom.blog.FileBackedBlogCategory">
    <_category>/</_category>
    <_categoryURL>http://localhost:8080/blojsom/blog/default/</_categoryURL>
  </_blogCategory>
  <_blogFileEncoding>UTF8</_blogFileEncoding>
  <_category>/</_category>
  <_commentsDirectory>.comments</_commentsDirectory>
  <_description>Bar!
</_description>
  <_entryDate>2004-07-01 14:04:47.300 PM</_entryDate>
  <_lastModified>1088705087300</_lastModified>
  <_link>http://localhost:8080/blojsom/blog/default/?permalink=8F40BA3D062F502835670B79847EEB0E.html</_link>
  <_metaData>
    <entry>
      <string>blog-entry-metadata-timestamp</string>
      <string>1088705087300</string>
    </entry>
    <entry>
      <string>blog-entry-author</string>
      <string>david</string>
    </entry>
  </_metaData>
  <_source>
    <path>/testing/blog-xstream/8F40BA3D062F502835670B79847EEB0E.html</path>
  </_source>
  <_title>Foo</_title>
  <_trackbacks>
    <org.blojsom.blog.Trackback>
      <_blogName></_blogName>
      <_excerpt></_excerpt>
      <_metaData>
        <entry>
          <string>BLOJSOM_TRACKBACK_PLUGIN_METADATA_IP</string>
          <string>127.0.0.1</string>
        </entry>
      </_metaData>
      <_title>http://www.blojsom.com/blog/</_title>
      <_trackbackDateLong>1088706680161</_trackbackDateLong>
      <_url>http://www.blojsom.com/blog/</_url>
    </org.blojsom.blog.Trackback>
  </_trackbacks>
  <_trackbacksDirectory>.trackbacks</_trackbacksDirectory>
</org.blojsom.blog.xstream.XStreamBlogEntry>

What else might not work?

The administration plugin which handles editing of blog entries and allows for comments/trackbacks to be deleted would need to be changed ever-so-slightly to save the entry instead of deleting the individual comment/trackback.

The Blogger and MetaWeblog API XML-RPC handlers would also change slightly.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators