Content Manager OnDemand V8.5 WEK APIs

com.ibm.edms.od
Class ODHit

java.lang.Object
  extended by com.ibm.edms.od.ODHit
All Implemented Interfaces:
java.io.Serializable

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

A class representing a document within OnDemand.

(c) Copyright IBM Corp. 1993, 2003. All Rights Reserved

See Also:
Serialized Form

Method Summary
 void addNote(ODNote note)
          Add a note to this document.
 boolean canBeAddedToCFSOD()
          Check if this ODHit can be added to an OnDemand CFSOD definition.
 boolean canBeAddedToHold()
          Check if this ODHit can be added to an OnDemand Hold.
 void deleteNote(ODNote note)
          Delete a note from this document.
 boolean docRequiresResources()
          Check to see if this hit has any resources that will need to be retrieved for document viewing.
 long getAnnotationAddMask()
          Get the mask to determine which types of annotations can be added.
 java.lang.String getApplGrpName()
          Get the Application Group name associated with this Hit.
 java.lang.String getApplName()
          Get the Application name associated with this Hit.
 char getCarriageControl()
          Get the Carriage Control setting for the line data 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.util.Hashtable getDisplayValuesTable()
          Get the documents display values.
 int getDocCodepage()
          Get the document codepage for the line data document.
 java.lang.String getDocId()
          Get a unique id for this document.
 int getDocLocation()
          Get the document location.
 int getDocLocation(boolean allow_unknown)
          Get the document location.
 char getDocRotation()
          Get the document rotation for AFP document.
 char getDocType()
          Get the document type.
 byte[] getDocument()
          Get the document data for this hit.
 byte[] getDocument(long off, long len)
          Get a portion of the the document data for this hit.
 void getDocument(java.lang.String filename, boolean allsegs)
          Get the document data for this hit, with the option of getting all segments.
 java.lang.String getDocumentName()
          Get the document name.
 int getDocumentSize()
          Get the document size in bytes.
 java.lang.String getFileExt()
          Get the extension of the document data as stored on the OnDemand server.
 java.lang.String getFolderName()
          Get the Folder name associated with this Hit.
 java.util.Vector getHolds()
          Get a Vector containing ODHold objects that are defined for this ODHit.
 ODLogicalView getLogicalView(java.lang.String name)
          Get a ODLogicalView object.
 java.util.Enumeration getLogicalViewNames()
          Get a list of Logical Views that are defined for this hit.
 java.lang.String getMimeType()
          Get the mimetype of the document data as stored on the OnDemand server.
 java.util.Vector getNotes()
          Get the notes associated with this document.
 int getNoteStatus()
          Get the status of notes associated with this document.
 int getNumPages()
          Get the number of pages in this document.
 int getNumPagesInLastSegment()
          Get the number of pages in the last segment for the document.
 int getNumPagesInSegment()
          Get the number of pages in a segment for the document.
 int getNumSegments()
          Get the number of segments in a document.
 java.lang.String[] getPrinterNames()
          Return a list of server printers defined for this hit.
 char getPRMode()
          Get the PRMode setting for the line data document.
 ODHitProperties getProperties()
          Return the OnDemand internal properties for this hit.
 java.lang.String getRecordDelimiter()
          Get the Record Delimiter for the line data document.
 char getRecordFormat()
          Get the Record Format for the line data document.
 int getRecordLength()
          Get the Record Length for the line data document.
 java.lang.String getResourceFileName()
          Get a unique resourceID for the AFP resources required to view/transform the document.
 java.lang.String getResourceID()
          Get a unique resourceID for the AFP resources required to view/transform the document.
 byte[] getResources()
          Get the AFP Resources for this Hit.
 void getResources(java.lang.String filename)
          Get the AFP Resources for this Hit.
 int getViewerType()
          Get the viewer type for the document data.
 java.lang.String getViewExt()
          Get the view extension of the document data.
 java.lang.String getViewExt(java.lang.String viewer)
          Get the view extension of the document data.
 java.lang.String getViewMimeType()
          Get the view mimetype of the document data.
 boolean hasPermToAddNotes()
          Check the add notes permissions.
 boolean hasPermToCopyFromDoc()
          Check the copy from doc permissions.
 boolean hasPermToCopyFromNotes()
          Check the copy from Note permissions.
 boolean hasPermToDeleteDoc()
          Check the user permissions to delete the hit.
 boolean hasPermToDeleteNotes()
          Check the delete notes permissions.
 boolean hasPermToPrintDoc()
          Check the print doc permissions.
 boolean hasPermToPrintNotes()
          Check the user permissions to print the note.
 boolean hasPermToUpdateDoc()
          Check the update doc permissions.
 boolean hasPermToUpdateNotes()
          Check the update hit permissions.
 boolean hasPermToViewDoc()
          Check the user permissions to view the document associated with this Hit.
 boolean hasPermToViewNotes()
          Check the view notes permissions.
 boolean hasRetrievableDoc()
          Check to see if a viewable document is available for retrieval
 boolean isCFSODFed()
          Check if this Hit is defined for CFSOD Federation.
 boolean isCFSODRecord()
          Check if this Hit is defined for CFSOD Record definition.
 boolean isImpliedHold()
          Check if this Hit is defined as Implied Hold
 boolean isLargeObject()
          Check if document for this Hit is Large Object.
 boolean isOnHold()
          Check if this Hit is defined for OnDemand Hold definition.
 boolean isOnHoldOrCFSODRM()
          Check if this Hit is defined to a Hold and/or CFSODRM definition.
 boolean isTrcPresent()
           
 byte[] retrieve(java.lang.String viewer)
          Retrieve document data.
 void retrieve(java.lang.String viewer, java.lang.String filename)
          Retrieve document data to file.
 byte[] retrieveSegment(int segment)
          Retrieve data for a specific segment of a Large Object document.
 void retrieveSegment(int segment, java.lang.String filename)
          Retrieve data for a specific segment of a Large Object document to file.
 void serverPrint(java.lang.String printer, int copies, java.lang.String pageRange)
          Print this document to a OnDemand Server Printer.
 void updateValuesForHit(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. This value can include any of the native ODWEK Viewer types, as well as those document transforms defined in the ODWEK Generic Transform interface. The value defined in the 'Transform_Name' XML Element from the ODWEK Generic definitions would be used here in that case.
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 web application to request the data. Make sure you have specified the proper applicationName in the ODServer or ODConfig 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), ODServer.initialize(String applicationName), ODTransform#getTransform_Name(), ODHit.hasRetrievableDoc()

retrieve

public void retrieve(java.lang.String viewer,
                     java.lang.String filename)
              throws java.lang.Exception
Retrieve document data to file.

Parameters:
viewer - Specifies if any conversion is to be applied to the data.
filename - Data will be written to this file.
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), ODServer.initialize(String applicationName), ODHit.hasRetrievableDoc()

retrieveSegment

public byte[] retrieveSegment(int segment)
                       throws java.lang.Exception
Retrieve data for a specific segment of a Large Object document.
NOTE: ODHit.retrieve(java.lang.String) method must be called before this call can be made, and will return segment[0].

Parameters:
segment - Identifies the segment number to retrieve. Segment number 0 is always retrieved via ODHit.retrieve().
Returns:
A byte array containing the segment data.
Throws:
java.lang.Exception
See Also:
ODHit.retrieve(java.lang.String), ODHit.getNumSegments(), ODHit.getNumPagesInSegment(), ODHit.getNumPagesInLastSegment()

retrieveSegment

public void retrieveSegment(int segment,
                            java.lang.String filename)
                     throws java.lang.Exception
Retrieve data for a specific segment of a Large Object document to file.
NOTE: ODHit.retrieve(java.lang.String) method must be called before this call can be made, and will return segment[0].

Parameters:
segment - Identifies the segment number to retrieve. Segment number 0 is always retrievied via ODHit.retrieve().
filename - Data will be written to this file.
Throws:
java.lang.Exception
See Also:
ODHit.retrieve(java.lang.String), ODHit.getNumSegments(), ODHit.getNumPagesInSegment(), ODHit.getNumPagesInLastSegment()

getNumSegments

public int getNumSegments()
Get the number of segments in a document. This method returns meaningful information only after ODHit.retrieve has been called. The value will always be zero if 'applet' was specified for the viewer on ODHit.retrieve.

NOTE: ODHit.retrieve(java.lang.String) method must be called before this call can be made.

Returns:
The number of segments in a Large Object document.
See Also:
ODHit.retrieveSegment(int), ODHit.getNumPagesInSegment(), ODHit.getNumPagesInLastSegment()

getNumPagesInSegment

public int getNumPagesInSegment()
Get the number of pages in a segment for the document. This method returns meaningful information only after ODHit.retrieve has been called. The value will always be zero if 'applet' was specified for the viewer on ODHit.retrieve.

NOTE: ODHit.retrieve(java.lang.String) method must be called before this call can be made.

Returns:
The number of pages in a segment of a Large Object document.
See Also:
ODHit.retrieveSegment(int), ODHit.getNumSegments(), ODHit.getNumPagesInLastSegment()

getNumPagesInLastSegment

public int getNumPagesInLastSegment()
Get the number of pages in the last segment for the document. This method returns meaningful information only after ODHit.retrieve has been called. The value will always be zero if 'applet' was specified for the viewer on ODHit.retrieve.

NOTE: ODHit.retrieve(java.lang.String) method must be called before this call can be made.

Returns:
The number of pages in the last segment of a Large Object document.
See Also:
ODHit.retrieveSegment(int), ODHit.getNumSegments(), ODHit.getNumPagesInSegment()

getNoteStatus

public int getNoteStatus()
Get the status of notes associated with this document. This method can return NoteStatus = ODConstant.NoteStatusUnknown based on how the OnDemand Server was configured to retrieve the notes. If your application requires the true status of the note, speak with your OnDemand System Admin to have the folder configuration changed on the OnDemand Server.

Returns:
The status of notes associated with this document.
See Also:
ODConstant.NoteStatusUnknown, ODConstant.NoteStatusYes, ODConstant.NoteStatusNo, ODConstant.NoteStatusError

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. This vector will be empty if hit contains no notes.
Throws:
java.lang.Exception
See Also:
ODHit.hasPermToViewNotes()

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.
NOTE: A note may not be added to an ODHit that does not have a retrievable document associated with it.

Parameters:
note - An ODNote object.
Throws:
java.lang.Exception
See Also:
ODHit.hasPermToAddNotes()

deleteNote

public void deleteNote(ODNote note)
                throws java.lang.Exception
Delete a note from this document.


NOTE: This requires the proper permissions to be set within the OnDemand administrator.

Parameters:
note - An ODNote object.
Throws:
java.lang.Exception
See Also:
ODHit.hasPermToDeleteNotes()

updateValuesForHit

public void updateValuesForHit(java.util.Hashtable newValues)
                        throws java.lang.Exception
Update this documents criteria values. This requires the proper permissions to be set within the OnDemand administrator.

WARNING: If you are caching the DOCID for this hit in your application, you will need to refresh that DOCID after this process has successfully completed with the new DOCID this call will generate in the ODHit.
NOTE: Use ODCriteria#getDBFixedValuesMapping(String agName) to get the valid update values for a Fixed Choice field. (ODCriteria.getType() == ODConstant.InputTypeChoice) If the fixed choice field is mapped to an Application ID field, then this criteria field cannot be updated.

Parameters:
newValues - This hashtable contains the criteria names to update along with the new values.
Throws:
java.lang.Exception
See Also:
ODHit.getDocId(), ODCriteria.getDBFixedValuesMapping(String agName), ODHit.hasPermToUpdateDoc()

getDocId

public java.lang.String getDocId()
Get a unique id for this document.
NOTE: Depending on OnDemand System administration, this Docid can change, and may not be persistent. For example, If an Admin would extract and reload the same document, the system generates a new identifier for the document, and the old identifier does not reference the new 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, ODConstant.FileTypeSCS_EXT, ODConstant.FileTypeDJDE, ODConstant.FileTypeSCS

getDocLocation

public int getDocLocation()
Get the document location.

Returns:
The document location.
See Also:
ODConstant.DocLocationUnknown, ODConstant.DocLocationCache, ODConstant.DocLocationArchive, ODConstant.DocLocationExternal, ODConstant.DocLocationDASD, ODConstant.DocLocationOptical, ODConstant.DocLocationOpticalShelf, ODConstant.DocLocationTape, ODConstant.DocLocationTapeShelf

getDocLocation

public int getDocLocation(boolean allow_unknown)
                   throws java.lang.Exception
Get the document location.

Parameters:
allow_unknown - If false, the OnDemand server will be accessed to determine the doc location. If true, the doclocation as determined during search will be returned. NOTE: If this method is called by an ODHit created by an ODFolder.recreateHit(java.lang.String) call and allow_unknow is true, the return value will always be 0.
Returns:
The document location.
Throws:
java.lang.Exception
See Also:
ODConstant.DocLocationUnknown, ODConstant.DocLocationCache, ODConstant.DocLocationArchive, ODConstant.DocLocationExternal, ODConstant.DocLocationDASD, ODConstant.DocLocationOptical, ODConstant.DocLocationOpticalShelf, ODConstant.DocLocationTape, ODConstant.DocLocationTapeShelf

getViewMimeType

public java.lang.String getViewMimeType()
Get the view mimetype of the document data. This will return the mimetype of the data after doing any necessary conversions based on specified viewer. NOTE: If using Doc Transforms this method will return Null. Mimetypes for transforms should be set outside of ODWEK processing.

Returns:
The mimetype.
See Also:
ODHit.retrieve(String Viewer), ODHit.getViewerType()

getViewExt

public java.lang.String getViewExt()
Get the view extension of the document data. This will return the file extension of the data AFTER any requested conversion.

Returns:
The mimetype.
See Also:
ODHit.getViewerType()

getViewExt

public java.lang.String getViewExt(java.lang.String viewer)
Get the view extension of the document data. This will return the extension of the data AFTER any requested conversion as specified by the viewer parameter.

Parameters:
viewer - The final viewer for the data
Returns:
The mimetype.

getMimeType

public java.lang.String getMimeType()
Get the mimetype of the document data as stored on the OnDemand server.


NOTE: As of v7.1.2.4 this will be set when the ODHit is created.

Returns:
The mimetype.

getFileExt

public java.lang.String getFileExt()
Get the extension of the document data as stored on the OnDemand server.

Returns:
The file extension.

getViewerType

public int getViewerType()
Get the viewer type for the document data. This is determined based on the data type and viewer type specified.


NOTE: This function will require a native call to determine the viewer type, and should only be called for the specific hit you wish to retrieve and view.

Returns:
The viewer type for this data type
See Also:
ODHit.getViewerType(), ODConstant.VIEWER_BROWSER, ODConstant.VIEWER_AFPPLUGIN, ODConstant.VIEWER_LINEAPPLET, ODConstant.VIEWER_HTMLAPPLET

getDisplayValues

public java.util.Enumeration getDisplayValues()
Get the documents display values.

Returns:
Enumeration of String objects containing the display values for this Hit.

getDisplayValue

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

Returns:
criteria value

getDisplayValuesTable

public java.util.Hashtable getDisplayValuesTable()
Get the documents display values.

Returns:
Hashtable where the keys are the criteria names and the values are the hits metadata.

hasPermToViewDoc

public boolean hasPermToViewDoc()
Check the user permissions to view the document associated with this Hit.

Returns:
true or false.

hasPermToDeleteDoc

public boolean hasPermToDeleteDoc()
Check the user permissions to delete the hit.

Returns:
true or false.

hasPermToUpdateDoc

public boolean hasPermToUpdateDoc()
Check the update doc permissions.

Returns:
true or false.

hasPermToPrintDoc

public boolean hasPermToPrintDoc()
Check the print doc permissions.

Returns:
true or false.

hasPermToCopyFromDoc

public boolean hasPermToCopyFromDoc()
Check the copy from doc permissions.

Returns:
true or false.

hasPermToPrintNotes

public boolean hasPermToPrintNotes()
Check the user permissions to print the note.

Returns:
true or false.

hasPermToUpdateNotes

public boolean hasPermToUpdateNotes()
Check the update hit permissions.

Returns:
true or false.

hasPermToDeleteNotes

public boolean hasPermToDeleteNotes()
Check the delete notes permissions.

Returns:
true or false.

hasPermToViewNotes

public boolean hasPermToViewNotes()
Check the view notes permissions.

Returns:
true or false.

hasPermToAddNotes

public boolean hasPermToAddNotes()
Check the add notes permissions.

Returns:
true or false.

hasPermToCopyFromNotes

public boolean hasPermToCopyFromNotes()
Check the copy from Note permissions.

Returns:
true or false.

getApplName

public java.lang.String getApplName()
Get the Application name associated with this Hit.

Returns:
Application Name.

getApplGrpName

public java.lang.String getApplGrpName()
Get the Application Group name associated with this Hit.

Returns:
ApplicationGroup Name.

getFolderName

public java.lang.String getFolderName()
Get the Folder name associated with this Hit.

Returns:
ApplicationGroup Name.

getPrinterNames

public java.lang.String[] getPrinterNames()
                                   throws java.lang.Exception
Return a list of server printers defined for this hit. This method will query the server for defined OnDemand server printers specific to this hit.

Returns:
String[] An array containing the names of all OD server printers defined for this hit..
Throws:
java.lang.Exception

docRequiresResources

public boolean docRequiresResources()
Check to see if this hit has any resources that will need to be retrieved for document viewing.

Returns:
boolean true if document requires resources.

getResources

public byte[] getResources()
                    throws java.lang.Exception
Get the AFP Resources for this Hit. These resources can then be cached on the mid-tier for later use during document retrieval, conversion and viewing.

Returns:
byte[] A Byte array containing the resource data. Will Return NULL if document does not require resgroup.
Throws:
java.lang.Exception
See Also:
ODHit.getDocument(), ODServer.cancel(), ODHit.docRequiresResources()

getResources

public void getResources(java.lang.String filename)
                  throws java.lang.Exception
Get the AFP Resources for this Hit. These resources can then be cached on the mid-tier for later use during document retrieval, conversion and viewing. Will save the resources to the file specified. WARNING: This method does not include the OnDemand Server Port number. If you are accessing the OnDemand Server from a non-default port, use #getResourceFileName.

Parameters:
filename - Resource Data will be written to filename specified.
Throws:
ODException - if file exists (id 114), Java.io.IOException if invalid path specified.
exception
java.lang.Exception
See Also:
ODHit.getResourceID(), ODHit.getDocument(), ODServer.cancel(), ODHit.getResourceFileName(), ODHit.docRequiresResources()

getResourceFileName

public java.lang.String getResourceFileName()
                                     throws java.lang.Exception
Get a unique resourceID for the AFP resources required to view/transform the document. The resource ID will be constructed from the OD Server, OD Server Port,OD Application Group ID, and OD Resource ID and the extension ".res". Some examples of the values returned are
      akira-1440-1209-9.res
      akira.boulder.ibm.com-1440-1209-9.res
      9.17.00.201-1209-9.res
 

Returns:
String. Will return 'null' if resources are not found/invalid.
Throws:
java.lang.Exception
See Also:
ODHit.getResources(), ODHit.getResources(String)

getResourceID

public java.lang.String getResourceID()
                               throws java.lang.Exception
Get a unique resourceID for the AFP resources required to view/transform the document. The resource ID will be constructed from the OD Server, OD Application Group ID, and OD Resource ID. Some examples of the values returned are
      akira-1209-9
      akira.boulder.ibm.com-1209-9
      9.17.00.201-1209-9
 

Returns:
String. Will return 'null' if resources are not found/invalid.
Throws:
java.lang.Exception
See Also:
ODHit.getResources(), ODHit.getResources(String)

getDocument

public byte[] getDocument()
                   throws java.lang.Exception
Get the document data for this hit. This document will be returned in the Native format as stored at the OnDemand Server. If document is Large Object, only the first segment will be returned.

Returns:
Byte Array containing the document data.
Throws:
java.lang.Exception
See Also:
ODHit.getResources(), ODHit.getResources(String), ODHit.retrieveSegment(int), ODHit.getDocument(String,boolean), ODServer.cancel()

getDocument

public byte[] getDocument(long off,
                          long len)
                   throws java.lang.Exception
Get a portion of the the document data for this hit. The document data will be returned in the Native format as stored at the OnDemand Server. Only PDF documents are supported.

Parameters:
off - Byte offset into the document data
len - Number of bytes to return
Returns:
Byte Array containing the document data.
Throws:
java.lang.Exception
See Also:
ODServer.cancel()

getDocument

public void getDocument(java.lang.String filename,
                        boolean allsegs)
                 throws java.lang.Exception
Get the document data for this hit, with the option of getting all segments. This document will be returned in the Native format as stored at the OnDemand Server.

Parameters:
filename - fully qualified file name where data will be written.
allsegs - Boolean True if you want all segments of a large object document. False will only retrieve the first segment.
Throws:
ODException - if file exists or Java.io.Exception if path is invalid.
java.lang.Exception
See Also:
ODHit.getResources(), ODHit.getResources(String), ODHit.isLargeObject(), ODServer.cancel()

isLargeObject

public boolean isLargeObject()
Check if document for this Hit is Large Object.

Returns:
boolean true if the document is a segmented document.
Throws:
java.lang.Exception
See Also:
ODHit.retrieveSegment( int segment ), ODHit.getDocument( String filename, boolean allsegs )

getProperties

public ODHitProperties getProperties()
                              throws ODException
Return the OnDemand internal properties for this hit.

Returns:
ODHitProperties
Throws:
java.lang.Exception
ODException

getLogicalViewNames

public java.util.Enumeration getLogicalViewNames()
                                          throws java.lang.Exception
Get a list of Logical Views that are defined for this hit.

Returns:
Enumeration of String objects containing the LogicalView Names
Throws:
java.lang.Exception

getLogicalView

public ODLogicalView getLogicalView(java.lang.String name)
                             throws java.lang.Exception
Get a ODLogicalView object.

Parameters:
name - the Logical View Name
Returns:
ODLogicalView object
Throws:
java.lang.Exception

getAnnotationAddMask

public long getAnnotationAddMask()
Get the mask to determine which types of annotations can be added.
For Example:
      System.out.println( " Can Add Public Annotations = " +
             ((annAddMask & ODConstant.OD_SYSTEM_ANN_ADD_PUB_NOT_ALLOWED )== 0 ? false : true ));
 

See Also:
ODConstant.OD_SYSTEM_ANN_ADD_PUB_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_PRI_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_GRP_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_PUBLIC, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_PRIVATE, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_GROUP

getDocumentName

public java.lang.String getDocumentName()
Get the document name.
The document name will consist of one or more index values, and is configured by the OD Admin in the Folder via the "View Title" checkbox for a specified criteria.


canBeAddedToHold

public boolean canBeAddedToHold()
                         throws java.lang.Exception
Check if this ODHit can be added to an OnDemand Hold. This will take into account the user permissions, as well as the ApplicationGroup Hold configuration.

Returns:
boolean True if ODFolder Hold methods can be called with this ODHit.
Throws:
java.lang.Exception
See Also:
ODFolder

canBeAddedToCFSOD

public boolean canBeAddedToCFSOD()
                          throws java.lang.Exception
Check if this ODHit can be added to an OnDemand CFSOD definition. This will take into account the user permissions, as well as the ApplicationGroup Hold configuration.

Returns:
boolean True if ODFolder CFSOD methods can be called with this ODHit.
Throws:
java.lang.Exception
See Also:
ODFolder

isOnHoldOrCFSODRM

public boolean isOnHoldOrCFSODRM()
Check if this Hit is defined to a Hold and/or CFSODRM definition. This call has less overhead than the more detailed status methods.

See Also:
isOnHold, isCFSODFed

isOnHold

public boolean isOnHold()
                 throws ODException
Check if this Hit is defined for OnDemand Hold definition.

Throws:
ODException

isCFSODFed

public boolean isCFSODFed()
                   throws ODException
Check if this Hit is defined for CFSOD Federation.

Throws:
ODException

isCFSODRecord

public boolean isCFSODRecord()
                      throws ODException
Check if this Hit is defined for CFSOD Record definition.

Throws:
ODException

isImpliedHold

public boolean isImpliedHold()
                      throws ODException
Check if this Hit is defined as Implied Hold

Throws:
ODException

getHolds

public java.util.Vector getHolds()
                          throws java.lang.Exception
Get a Vector containing ODHold objects that are defined for this ODHit.

Throws:
java.lang.Exception
See Also:
ODHold

getRecordFormat

public char getRecordFormat()
Get the Record Format for the line data document.

Returns:
char Record Format.
See Also:
ODConstant.OD_DOCRECFMT_FIXED, ODConstant.OD_DOCRECFMT_VARIABLE, ODConstant.OD_DOCRECFMT_STREAM

getRecordLength

public int getRecordLength()
Get the Record Length for the line data document.

Returns:
int Record Length

getCarriageControl

public char getCarriageControl()
Get the Carriage Control setting for the line data document.

Returns:
char Carriage Control
See Also:
ODConstant.OD_DOC_CC_NONE, ODConstant.OD_DOC_CC_ANSI, ODConstant.OD_DOC_CC_MACHINE

getPRMode

public char getPRMode()
Get the PRMode setting for the line data document.

Returns:
char PRMode
See Also:
='N', ODConstant.OD_PRMODE_SOSI1, ODConstant.OD_PRMODE_SOSI2, ODConstant.OD_PRMODE_SOSI3, ODConstant.OD_PRMODE_ADMIN

isTrcPresent

public boolean isTrcPresent()

getDocRotation

public char getDocRotation()
Get the document rotation for AFP document.

Returns:
char DocRotation.
See Also:
ODConstant.OD_DOC_ROTATION_0, ODConstant.OD_DOC_ROTATION_90, ODConstant.OD_DOC_ROTATION_180, ODConstant.OD_DOC_ROTATION_270

getRecordDelimiter

public java.lang.String getRecordDelimiter()
Get the Record Delimiter for the line data document.

Returns:
String Record Delimiter

getDocCodepage

public int getDocCodepage()
Get the document codepage for the line data document.

Returns:
int Codepage

getNumPages

public int getNumPages()
                throws java.lang.Exception
Get the number of pages in this document. This will return -1 if the Application Group does not have a "Page Count" field type defined.

Throws:
java.lang.Exception
See Also:
ODHit.getNumSegments(), ODHit.getNumPagesInSegment(), ODHit.getNumPagesInLastSegment()

getDocumentSize

public int getDocumentSize()
                    throws java.lang.Exception
Get the document size in bytes. This is the size of the document as it was stored in OnDemand, and does not account for any viewer conversions that may be applied during retrieval. AFP resources are stored seperately in OnDemand, so this value does not include the resources required for a fully composed AFP Document.

Returns:
int size. Will return -1 if the Application Group does not have a "Document Size" field type defined.
Throws:
java.lang.Exception
See Also:
ODHit.getNumSegments(), ODHit.getNumPagesInSegment(), ODHit.getNumPagesInLastSegment()

serverPrint

public void serverPrint(java.lang.String printer,
                        int copies,
                        java.lang.String pageRange)
                 throws java.lang.Exception
Print this document to a OnDemand Server Printer.

Parameters:
String - printer The name of a server printer defined within OnDemand.
Int - copies Number of copies to be printed
String - pageRange Comma seperated pages and ranges defined with a '-' without any spaces. ie: "2,4-15,20,25". A null str directs API to print entire document.
Throws:
java.lang.Exception

hasRetrievableDoc

public boolean hasRetrievableDoc()
                          throws java.lang.Exception
Check to see if a viewable document is available for retrieval

Returns:
boolean TRUE if a viewable document is available for this hit
Throws:
java.lang.Exception

CM OnDemand V8.5 WEK Java APIs

(c)Copyright International Business Machines Corporation 2001, 2013. IBM Corp. All rights reserved.