Xindice API
version 1.2m1

org.apache.xindice.util
Class SymbolSerializer

java.lang.Object
  extended byorg.apache.xindice.util.SymbolSerializer

public final class SymbolSerializer
extends Object

SymbolSerializer is a utility class for managing SymbolTables in the server context of Wire Compression.

Version:
$Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $

Constructor Summary
SymbolSerializer(SymbolTable syms)
           
 
Method Summary
 Hashtable convertFromDocument(org.w3c.dom.Document doc, long stamp)
          convertFromDocument converts a DOM Document into an Hashtable that, depending on the time stamp, possibly includes a current image of the managed Collection's Symbol Table.
 long getLastModified()
          getLastModified returns a time stamp of the last server-side modified of the Symbol Table.
 SymbolTable getSymbols()
          getSymbols returns the Symbol Table being managed by this Serializer.
 Hashtable getSymBuffer()
          getSymBuffer returns a new Hashtable that includes a reference to the SymbolTable's byte array image for wire transmission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolSerializer

public SymbolSerializer(SymbolTable syms)
Method Detail

getSymBuffer

public Hashtable getSymBuffer()
getSymBuffer returns a new Hashtable that includes a reference to the SymbolTable's byte array image for wire transmission. Depending on whether the client is up to date, convertFromDocument will remove this reference.

Returns:
A new Hashtable

convertFromDocument

public Hashtable convertFromDocument(org.w3c.dom.Document doc,
                                     long stamp)
convertFromDocument converts a DOM Document into an Hashtable that, depending on the time stamp, possibly includes a current image of the managed Collection's Symbol Table.

Parameters:
doc - The Document to Convert
stamp - The client's last modified stamp
Returns:
The Hashtable

getSymbols

public SymbolTable getSymbols()
getSymbols returns the Symbol Table being managed by this Serializer.

Returns:
The Symbol Table

getLastModified

public long getLastModified()
getLastModified returns a time stamp of the last server-side modified of the Symbol Table. This is used to determine whether or not to regenerate the byte stream, and whether the client will need a new copy of the Symbol Table.

Returns:
Last modified stamp

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.