public class ODHit
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
addNote(ODNote note)
Add a note to this document.
|
void |
buildAutoFindStrForHit(java.lang.String[] srchInfo)
Build the AutoFindString that is passed to the applet for this hit.
|
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.
|
void |
deleteNotes(java.util.Vector notes)
Delete a notes from this document.
|
boolean |
docRequiresResources()
Check to see if this hit has any resources that will need to be retrieved for document viewing.
|
java.util.Hashtable |
getAllValuesTable()
Get the document's criteria values.
|
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 document's display value for the specified folder criteria
name.
|
java.util.Enumeration |
getDisplayValues()
Get the document's display values.
|
java.util.Hashtable |
getDisplayValuesTable()
Get the document's 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.
|
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 |
getHighlightOffsetLength()
Get the offset(s) and length(s) for matches of the supplied search value within
a Full Text Search highlight field
|
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 |
getOpenDocId()
Get a unique id for this document that is not tied to a user's permissions.
|
void |
getPageInfo(java.lang.String filename)
Retrieve Page Information for a document to an XML file.
|
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 resources required to view/transform the document.
|
java.lang.String |
getResourceID()
Get a unique resourceID for the resources required to view/transform the document.
|
byte[] |
getResources()
Get the resources for this Hit.
|
void |
getResources(java.lang.String filename)
Get the resources for this Hit.
|
long |
getResourceSize()
Get the uncompressed size of the resource file.
|
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)
Deprecated.
|
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()
Check to see if a TRC is present in the document
|
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.
|
public byte[] retrieve(java.lang.String viewer)
throws java.lang.Exception
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
SOA Transform interface. The value defined in the 'Transform_Name' XML Element from the ODWEK SOA
definitions would be used here in that case.java.lang.ExceptionODConstant.APPLET,
ODConstant.ASCII,
ODConstant.HTML,
ODConstant.NATIVE,
ODConstant.PDF,
ODConstant.PLUGIN,
ODConstant.XENOS,
ODServer.viewerPassthru(java.lang.String, java.io.InputStream),
ODServer.initialize(String applicationName),
ODTransform.getTransformName(),
ODHit.hasRetrievableDoc()public void retrieve(java.lang.String viewer,
java.lang.String filename)
throws java.lang.Exception
viewer - Specifies if any conversion is to be applied to the data.filename - Data will be written to this file.
java.lang.ExceptionODConstant.APPLET,
ODConstant.ASCII,
ODConstant.HTML,
ODConstant.NATIVE,
ODConstant.PDF,
ODConstant.PLUGIN,
ODConstant.XENOS,
ODServer.viewerPassthru(java.lang.String, java.io.InputStream),
ODServer.initialize(String applicationName),
ODHit.hasRetrievableDoc()public byte[] retrieveSegment(int segment)
throws java.lang.Exception
ODHit.retrieve(java.lang.String) method must be called before this call can be made, and will return segment[0].segment - Identifies the segment number to retrieve. Segment number 0 is always retrieved via ODHit.retrieve().java.lang.ExceptionODHit.retrieve(java.lang.String),
ODHit.getNumSegments(),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()public void retrieveSegment(int segment,
java.lang.String filename)
throws java.lang.Exception
ODHit.retrieve(java.lang.String) method must be called before this call can be made, and will return segment[0].segment - Identifies the segment number to retrieve. Segment number 0 is always retrieved via ODHit.retrieve().filename - Data will be written to this file.java.lang.ExceptionODHit.retrieve(java.lang.String),
ODHit.getNumSegments(),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()public int getNumSegments()
ODHit.retrieve(java.lang.String) method must be called before this call can be made.ODHit.retrieveSegment(int),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()public int getNumPagesInSegment()
ODHit.retrieve(java.lang.String) method must be called before this call can be made.ODHit.retrieveSegment(int),
ODHit.getNumSegments(),
ODHit.getNumPagesInLastSegment()public int getNumPagesInLastSegment()
ODHit.retrieve(java.lang.String) method must be called before this call can be made.ODHit.retrieveSegment(int),
ODHit.getNumSegments(),
ODHit.getNumPagesInSegment()public int getNoteStatus()
ODConstant.NoteStatusUnknown,
ODConstant.NoteStatusYes,
ODConstant.NoteStatusNo,
ODConstant.NoteStatusErrorpublic java.util.Vector getNotes()
throws java.lang.Exception
java.lang.ExceptionODHit.hasPermToViewNotes()public void addNote(ODNote note) throws java.lang.Exception
note - An ODNote object.java.lang.ExceptionODHit.hasPermToAddNotes(),
ODHit.hasRetrievableDoc()public void deleteNote(ODNote note) throws java.lang.Exception
note - An ODNote object.java.lang.ExceptionODHit.hasPermToDeleteNotes()public void deleteNotes(java.util.Vector notes)
throws java.lang.Exception
notes - A vector of ODNote objects.java.lang.ExceptionODHit.hasPermToDeleteNotes()public void updateValuesForHit(java.util.Hashtable newValues)
throws java.lang.Exception
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.newValues - This hashtable contains the criteria names
to update along with the new values.java.lang.ExceptionODHit.getDocId(),
ODCriteria.getDBFixedValuesMapping(String agName),
ODHit.hasPermToUpdateDoc()public java.lang.String getDocId()
public java.lang.String getOpenDocId()
ODFolder#recreateHit(String)},
ODHit.getDocId()public char getDocType()
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,
ODConstant.FileTypeXMLpublic int getDocLocation()
ODConstant.DocLocationUnknown,
ODConstant.DocLocationCache,
ODConstant.DocLocationArchive,
ODConstant.DocLocationExternal,
ODConstant.DocLocationDASD,
ODConstant.DocLocationOptical,
ODConstant.DocLocationOpticalShelf,
ODConstant.DocLocationTape,
ODConstant.DocLocationTapeShelf,
ODConstant.DocLocationCloudpublic int getDocLocation(boolean allow_unknown)
throws java.lang.Exception
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.java.lang.ExceptionODConstant.DocLocationUnknown,
ODConstant.DocLocationCache,
ODConstant.DocLocationArchive,
ODConstant.DocLocationExternal,
ODConstant.DocLocationDASD,
ODConstant.DocLocationOptical,
ODConstant.DocLocationOpticalShelf,
ODConstant.DocLocationTape,
ODConstant.DocLocationTapeShelf,
ODConstant.DocLocationCloudpublic java.lang.String getViewMimeType()
ODHit.retrieve(String Viewer),
ODHit.getViewerType()public java.lang.String getViewExt()
ODHit.getViewerType()public java.lang.String getViewExt(java.lang.String viewer)
ODHit.getViewExt()viewer - The final viewer for the datapublic java.lang.String getMimeType()
public java.lang.String getFileExt()
public int getViewerType()
ODHit.getViewerType(),
ODConstant.VIEWER_BROWSER,
ODConstant.VIEWER_AFPPLUGIN,
ODConstant.VIEWER_LINEAPPLET,
ODConstant.VIEWER_HTMLAPPLETpublic java.util.Enumeration getDisplayValues()
public java.lang.String getDisplayValue(java.lang.String name)
name - The name of the Criteriapublic java.util.Hashtable getDisplayValuesTable()
public java.util.Hashtable getAllValuesTable()
public boolean hasPermToViewDoc()
public boolean hasPermToDeleteDoc()
public boolean hasPermToUpdateDoc()
public boolean hasPermToPrintDoc()
public boolean hasPermToCopyFromDoc()
public boolean hasPermToPrintNotes()
public boolean hasPermToUpdateNotes()
public boolean hasPermToDeleteNotes()
public boolean hasPermToViewNotes()
public boolean hasPermToAddNotes()
public boolean hasPermToCopyFromNotes()
public java.lang.String getApplName()
public java.lang.String getApplGrpName()
public java.lang.String getFolderName()
public java.lang.String[] getPrinterNames()
throws java.lang.Exception
java.lang.Exceptionpublic boolean docRequiresResources()
public byte[] getResources()
throws java.lang.Exception
java.lang.ExceptionODHit.getDocument(),
ODServer.cancel()public void getResources(java.lang.String filename)
throws java.lang.Exception
ODHit.getResourceFileName().filename - Resource Data will be written to filename specified.ODException - if file exists (id 114), Java.io.IOException if invalid path specified.exceptionjava.lang.ExceptionODHit.getResourceID(),
ODHit.getDocument(),
ODServer.cancel(),
ODHit.getResourceFileName(),
ODHit.docRequiresResources()public java.lang.String getResourceFileName()
throws java.lang.Exception
akira-1440-1209-9.res
akira.boulder.ibm.com-1440-1209-9.res
9.17.00.201-1209-9.res
java.lang.ExceptionODHit.getResources(),
ODHit.getResources(String)public java.lang.String getResourceID()
throws java.lang.Exception
akira-1209-9
akira.boulder.ibm.com-1209-9
9.17.00.201-1209-9
java.lang.ExceptionODHit.getResources(),
ODHit.getResources(String)public byte[] getDocument()
throws java.lang.Exception
java.lang.ExceptionODHit.getResources(),
ODHit.getResources(String),
ODHit.retrieveSegment(int),
ODHit.getDocument(String,boolean),
ODServer.cancel()public void getDocument(java.lang.String filename,
boolean allsegs)
throws java.lang.Exception
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.ODException - if file exists or Java.io.Exception if path is invalid.java.lang.ExceptionODHit.getResources(),
ODHit.getResources(String),
ODHit.isLargeObject(),
ODServer.cancel()public boolean isLargeObject()
java.lang.ExceptionODHit.retrieveSegment( int segment ),
ODHit.getDocument( String filename, boolean allsegs )public ODHitProperties getProperties() throws ODException
java.lang.ExceptionODExceptionpublic java.util.Enumeration getLogicalViewNames()
throws java.lang.Exception
java.lang.Exceptionpublic ODLogicalView getLogicalView(java.lang.String name) throws java.lang.Exception
ODLogicalView object.name - the Logical View Namejava.lang.Exceptionpublic long getAnnotationAddMask()
System.out.println( " Can Add Public Annotations = " +
((annAddMask & ODConstant.OD_SYSTEM_ANN_ADD_PUB_NOT_ALLOWED )== 0 ? false : true ));
public java.lang.String getDocumentName()
public boolean canBeAddedToHold()
throws java.lang.Exception
java.lang.ExceptionODFolderpublic boolean canBeAddedToCFSOD()
throws java.lang.Exception
java.lang.ExceptionODFolderpublic boolean isOnHoldOrCFSODRM()
ODHit.isOnHold(),
ODHit.isCFSODFed()public boolean isOnHold()
throws ODException
ODExceptionpublic boolean isCFSODFed()
throws ODException
ODExceptionpublic boolean isCFSODRecord()
throws ODException
ODExceptionpublic boolean isImpliedHold()
throws ODException
ODExceptionpublic java.util.Vector getHolds()
throws java.lang.Exception
java.lang.ExceptionODHoldpublic char getRecordFormat()
ODConstant.OD_DOCRECFMT_FIXED,
ODConstant.OD_DOCRECFMT_VARIABLE,
ODConstant.OD_DOCRECFMT_STREAMpublic int getRecordLength()
public char getCarriageControl()
ODConstant.OD_DOC_CC_NONE,
ODConstant.OD_DOC_CC_ANSI,
ODConstant.OD_DOC_CC_MACHINEpublic char getPRMode()
ODConstant.OD_PRMODE_NONE,
ODConstant.OD_PRMODE_SOSI1,
ODConstant.OD_PRMODE_SOSI2,
ODConstant.OD_PRMODE_SOSI3,
ODConstant.OD_PRMODE_ADMINpublic boolean isTrcPresent()
public char getDocRotation()
ODConstant.OD_DOC_ROTATION_0,
ODConstant.OD_DOC_ROTATION_90,
ODConstant.OD_DOC_ROTATION_180,
ODConstant.OD_DOC_ROTATION_270public java.lang.String getRecordDelimiter()
ODHit.getRecordFormat()public int getDocCodepage()
public int getNumPages()
throws java.lang.Exception
java.lang.ExceptionODHit.getNumSegments(),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()public int getDocumentSize()
throws java.lang.Exception
java.lang.ExceptionODHit.getNumSegments(),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()public void serverPrint(java.lang.String printer,
int copies,
java.lang.String pageRange)
throws java.lang.Exception
printer - The name of a server printer defined within OnDemand.copies - Number of copies to be printedpageRange - 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.java.lang.Exceptionpublic boolean hasRetrievableDoc()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.Vector getHighlightOffsetLength()
ODCriteria.getSubType()public void buildAutoFindStrForHit(java.lang.String[] srchInfo)
throws ODException
ODException - If the srchInfo String[] or any of the values in the array are nullODFolder.setSearchInfoForAutofind(),
ODFolder.search(),
ODHit.retrieve(String)public long getResourceSize()
throws java.lang.Exception
ODException - if an error occurs or document does not require resources.java.lang.ExceptionODHit.docRequiresResources()public void getPageInfo(java.lang.String filename)
throws java.lang.Exception
<?xml version="1.0" encoding="UTF-8"?>
<ODDocumentPageLevelInfo>
<PageNum page_num="n" page_id="viii">
<PageValue name="name" value="value"></PageValue>
<PageValue name="..." value="..."></PageValue>
</PageNum>
<PageNum ...>
...
</PageNum>
</ODDocumentPageLevelInfo>
filename - Data will be written to this file in XML format.java.lang.ExceptionODHit.isLargeObject(),
ODHit.getNumSegments(),
ODHit.getNumPagesInSegment(),
ODHit.getNumPagesInLastSegment()(c)Copyright International Business Machines Corporation 2001, 2020. IBM Corp. All rights reserved.