org.ceryle.plink
Class IndexProcessor

java.lang.Object
  extended by org.ceryle.plink.IndexProcessor

public class IndexProcessor
extends Object

Produces an index document provided events generated by the PlinkProcessor.

Since:
JDK1.2
Version:
$Id: IndexProcessor.java,v 3.4 2007-06-15 12:09:28 altheim Exp $
Author:
Murray Altheim

Field Summary
protected  Element index
          Document element for the index Document.
protected  Document m_indexDoc
          XML Document used as an optional index.
 
Constructor Summary
IndexProcessor(Document indexDocument, String documentName, String dateMarker)
          Constructor that will initialize the processor with the provided settings, using default values.
 
Method Summary
 void buildIndexDoc()
          Builds the indexDocument as the Document to be populated with the index of links created.
protected  Document getIndex()
          Returns the Document populated with the index of links created.
protected  void index(String type, String sid, String ssn, String ssnText)
          If the File index has been set, adds Elements linking the SID sid and SSN ssn to the Document to the index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_indexDoc

protected Document m_indexDoc
XML Document used as an optional index.


index

protected Element index
Document element for the index Document.

Constructor Detail

IndexProcessor

public IndexProcessor(Document indexDocument,
                      String documentName,
                      String dateMarker)
Constructor that will initialize the processor with the provided settings, using default values. Sets indexDocument as the Document to be populated with the index of links created. If not set, this feature is ignored. The String dateMarker is used to provide date or version information.

Method Detail

buildIndexDoc

public void buildIndexDoc()
Builds the indexDocument as the Document to be populated with the index of links created. This currently generates an XHTML document, but this could easily be changed.


getIndex

protected Document getIndex()
Returns the Document populated with the index of links created. If never set, null is returned.


index

protected void index(String type,
                     String sid,
                     String ssn,
                     String ssnText)
If the File index has been set, adds Elements linking the SID sid and SSN ssn to the Document to the index. If the value of type (ie., element type) matches linkType (default "a") the value of sid is used as the link ID.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.