com.ibm.edms.od
Class ODHit

java.lang.Object
  |
  +--com.ibm.edms.od.ODHit

public class ODHit
extends java.lang.Object

A class representing a document within OnDemand.

(C) Copyright IBM Corp. 1993, 2002. All Rights Reserved


Method Summary
 void addNote(ODNote note)
          Add a note to this document.
 java.lang.String getDisplayValue(java.lang.String name)
          Get the documents display value for the specified folder criteria name.
 java.util.Enumeration getDisplayValues()
          Get the documents display values.
 java.lang.String getDocId()
 Get a persistent id for this document.
 int getDocLocation()
          Get the document location.
 char getDocType()
          Get the document type.
 java.lang.String getMimeType()
          Get the mimetype of the data returned by a call to retrieve.
 java.util.Vector getNotes()
          Get the notes associated with this document.
 byte[] retrieve(java.lang.String viewer)
          Retrieve document data.
 void update(java.util.Hashtable newValues)
          Update this documents criteria values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

retrieve

public byte[] retrieve(java.lang.String viewer)
                throws java.lang.Exception
Retrieve document data.
Parameters:
viewer - Specifies if any conversion is to be applied to the data.
Returns:
A byte array containing the document data. Note: If using ODWEK applets to view documents the data returned from this call is an html page containing a reference to the ODWEK applet. You should return this data without modification to the browser. Once the applet is loaded it will call back to your servlet/cgi to request the data. Make sure you have specified the proper applicationName in the ODServer object.
Throws:
java.lang.Exception -  
See Also:
ODConstant.APPLET, ODConstant.ASCII, ODConstant.HTML, ODConstant.NATIVE, ODConstant.PDF, ODConstant.PLUGIN, ODConstant.XENOS, ODServer.viewerPassthru(java.lang.String)

getNotes

public java.util.Vector getNotes()
                          throws java.lang.Exception
Get the notes associated with this document.

Note: This requires the proper permissions to be set within the OnDemand administrator.
Returns:
A vector containing ODNote objects.
Throws:
java.lang.Exception -  

addNote

public void addNote(ODNote note)
             throws java.lang.Exception
Add a note to this document.

Note: This requires the proper permissions to be set within the OnDemand administrator.
Parameters:
note - An ODNote object.
Throws:
java.lang.Exception -  

update

public void update(java.util.Hashtable newValues)
            throws java.lang.Exception
Update this documents criteria values.

Note: This requires the proper permissions to be set within the OnDemand administrator.
Parameters:
newValues - This hashtable contains the criteria names to update along with the new values.
Throws:
java.lang.Exception -  

getDocId

public java.lang.String getDocId()
Get a persistent id for this document.
Returns:
A document id.

getDocType

public char getDocType()
Get the document type.
Returns:
document type
See Also:
ODConstant.FileTypeAFP, ODConstant.FileTypeBMP, ODConstant.FileTypeEMAIL, ODConstant.FileTypeGIF, ODConstant.FileTypeJFIF, ODConstant.FileTypeLINE, ODConstant.FileTypeMETA, ODConstant.FileTypeNONE, ODConstant.FileTypePCX, ODConstant.FileTypePDF, ODConstant.FileTypePNG, ODConstant.FileTypeTIFF, ODConstant.FileTypeUSRDEF

getDocLocation

public int getDocLocation()
Get the document location.
Returns:
The document location.
See Also:
ODConstant.DocLocationUnknown, ODConstant.DocLocationCache, ODConstant.DocLocationArchive, ODConstant.DocLocationExternal

getMimeType

public java.lang.String getMimeType()
Get the mimetype of the data returned by a call to retrieve. Note: This will only be the mimetype of the document if NATIVE was specified for the retrieve.
Returns:
The mimetype.

getDisplayValues

public java.util.Enumeration getDisplayValues()
Get the documents display values.
Returns:
Enumeration containing folder criteria names

getDisplayValue

public java.lang.String getDisplayValue(java.lang.String name)
Get the documents display value for the specified folder criteria name.
Returns:
criteria value