degu.degudocumentbuilder.ejb
Class DeguDocument

java.lang.Object
  extended by degu.degudocumentbuilder.ejb.DeguDocument
All Implemented Interfaces:
java.io.Serializable

public class DeguDocument
extends java.lang.Object
implements java.io.Serializable

The Representation of a document used throughout degu.

See Also:
Serialized Form

Field Summary
private  DocumentDescriptor descriptor
           
private  java.lang.String digestString
           
private  org.jdom.Document document
           
private  java.lang.String mimeTypeString
           
private  java.lang.String rawText
           
private  org.jdom.Element root
           
private  org.jdom.Element toc
           
private  java.lang.String uuidStr
           
 
Constructor Summary
DeguDocument(org.jdom.Document document)
          ctor
DeguDocument(java.io.InputStream is)
          ctor Constructs the DeguDocument from an InputStream, which must contain a jdom XML document
 
Method Summary
 DocumentDescriptor getDesctriptor()
           
 java.lang.String getDigest()
           
 org.jdom.Document getDocument()
          Deprecated. 
 PageTokenizer getPageTokenizer()
           
 java.lang.String getRawText()
           
 org.jdom.Element getTOC()
           
 java.lang.String getUUIDString()
           
 void save(java.io.OutputStream os)
          saves the Document to an OutputStream
private  boolean validateDocument()
          validates the jdom document input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

private org.jdom.Document document

root

private org.jdom.Element root

toc

private org.jdom.Element toc

descriptor

private DocumentDescriptor descriptor

rawText

private java.lang.String rawText

digestString

private java.lang.String digestString

uuidStr

private java.lang.String uuidStr

mimeTypeString

private java.lang.String mimeTypeString
Constructor Detail

DeguDocument

public DeguDocument(org.jdom.Document document)
ctor

Parameters:
document -
digest, - calculated fingerprint of the original file

DeguDocument

public DeguDocument(java.io.InputStream is)
             throws org.jdom.JDOMException,
                    java.io.IOException
ctor Constructs the DeguDocument from an InputStream, which must contain a jdom XML document

Parameters:
is -
Throws:
java.io.IOException
org.jdom.JDOMException
Method Detail

getDocument

@Deprecated
public org.jdom.Document getDocument()
Deprecated. 

This is for debugging only. Use the other get-Methods to access the DeguDocument data.

Returns:

getDesctriptor

public DocumentDescriptor getDesctriptor()
                                  throws DeguDocumentCorrupted
Throws:
DeguDocumentCorrupted

getTOC

public org.jdom.Element getTOC()

getRawText

public java.lang.String getRawText()

getPageTokenizer

public PageTokenizer getPageTokenizer()

getUUIDString

public java.lang.String getUUIDString()

getDigest

public java.lang.String getDigest()

save

public void save(java.io.OutputStream os)
          throws java.io.IOException
saves the Document to an OutputStream

Throws:
java.io.IOException

validateDocument

private boolean validateDocument()
validates the jdom document input

Returns: