com.plumtree.server
Interface IPTAccessor


public interface IPTAccessor

An IPTAccessor is an external component that knows how to parse a particular type of document and return metadata found in the document

Author:
michaels
See Also:
IPTDataSourceProvider

Method Summary
 void AttachToDocument(com.plumtree.openfoundation.util.IXPPropertyBag pBagDocumentLocation, IPTSession pSession)
          Attaches this Accessor to the document identified by information in the PropertyBag
 java.lang.String DocumentSummary()
          Returns a human readable summary of the document
 java.lang.String GetAccessorCLSID()
          Returns the CLSID associated with this accessor
 java.lang.Object[][] GetCommonFields()
          Returns names and descriptions of fields that are commonly returned from GetFields, for use in a mapping UI.
 java.lang.String GetDescription()
          Returns a description of this Accessor
 java.lang.String GetDocumentImageUUID()
          Returns the UUID for the image that should be used to represent the document in the UI
 int GetDocumentLocationFormatID()
          Each Accessor knows how to deal with a particular format of document (for example, some Accessors parse files, while others know how to extract metadata from Lotus Notes.) This identifier documents the type of document that this Accessor knows how to deal with.
 java.lang.Object[][] GetFields()
          Returns a 2D array containing the metadata found in the document.
 java.lang.String GetFileExtension()
          Returns the file extension (e.g.
 java.lang.String GetImageUUID()
          Returns the UUID for the image that's used to represent this Accessor in the UI
 java.lang.String GetName()
          Returns the name of this Accessor
 java.lang.String GetSuggestedCardName()
          Returns a suggested name for the Card to be made, which is typically generated from a field in the document
 java.lang.Object[][] GetSuggestedDocumentTypeMapEntries()
          Returns suggested entries for the Document Type Map.
 java.lang.String GetURLInfo()
          Returns additional URL info that helps the UI perform clickthrough on the document
 int QueryCapability(int QueryCapability)
          Used to determine if the Accessor supports certain operations.
 void WriteIndexingFile(java.lang.String sFullFilePath)
          Writes an indexing file to the specified path.
 

Method Detail

AttachToDocument

void AttachToDocument(com.plumtree.openfoundation.util.IXPPropertyBag pBagDocumentLocation,
                      IPTSession pSession)
Attaches this Accessor to the document identified by information in the PropertyBag

Parameters:
pBagDocumentLocation - the location of the document. The information contained in this PropertyBag may vary depending on the repository type. For example, files on the file system are identified by UNC path, while Notes within a Lotus Notes database are identified by NoteID.
pSession - the Plumtree session of the current user

GetFields

java.lang.Object[][] GetFields()
Returns a 2D array containing the metadata found in the document. The first column contains the name of the field, as a string. The second column contains the value of the field. This matrix is row-major: name = fields[row][0] value = fields[row][1]

Returns:
the fields found in the document

GetDocumentImageUUID

java.lang.String GetDocumentImageUUID()
Returns the UUID for the image that should be used to represent the document in the UI

Returns:
the UUID as a string

GetURLInfo

java.lang.String GetURLInfo()
Returns additional URL info that helps the UI perform clickthrough on the document

Returns:
the URL info

GetFileExtension

java.lang.String GetFileExtension()
Returns the file extension (e.g. "xls" for Excel files) to be used when writing the indexing file

Returns:
the file extension

WriteIndexingFile

void WriteIndexingFile(java.lang.String sFullFilePath)
Writes an indexing file to the specified path. Typically, this copies the file to the indicated location, but some Accessors may write a "custom" indexing file which contains more or less information than that contained in the original document.

Parameters:
sFullFilePath - the path to which the file should be written

DocumentSummary

java.lang.String DocumentSummary()
Returns a human readable summary of the document

Returns:
the summary

GetSuggestedCardName

java.lang.String GetSuggestedCardName()
Returns a suggested name for the Card to be made, which is typically generated from a field in the document

Returns:
the suggested Card name

GetName

java.lang.String GetName()
Returns the name of this Accessor

Returns:
the name of this Accessor

GetDescription

java.lang.String GetDescription()
Returns a description of this Accessor

Returns:
a description of this Accessor

GetAccessorCLSID

java.lang.String GetAccessorCLSID()
Returns the CLSID associated with this accessor

Returns:
the CLSID, as a string

QueryCapability

int QueryCapability(int QueryCapability)
Used to determine if the Accessor supports certain operations. Pass in a value from PT_ACCESSOR_CAPABILITIES

Parameters:
QueryCapability - a value from PT_ACCESSOR_CAPABILITIES
Returns:
zero if unsupported, non-zero if supported

GetCommonFields

java.lang.Object[][] GetCommonFields()
Returns names and descriptions of fields that are commonly returned from GetFields, for use in a mapping UI. The columns correspond to PT_FIELDARRAY_INDICES values.

Returns:
the common fields

GetImageUUID

java.lang.String GetImageUUID()
Returns the UUID for the image that's used to represent this Accessor in the UI

Returns:
the image UUID

GetDocumentLocationFormatID

int GetDocumentLocationFormatID()
Each Accessor knows how to deal with a particular format of document (for example, some Accessors parse files, while others know how to extract metadata from Lotus Notes.) This identifier documents the type of document that this Accessor knows how to deal with.

Returns:
the document location format ID

GetSuggestedDocumentTypeMapEntries

java.lang.Object[][] GetSuggestedDocumentTypeMapEntries()
Returns suggested entries for the Document Type Map. This should only be called by the installer.

Returns:
the suggested entries