Interface IOcrProvider

All Superinterfaces:
Serializable

public interface IOcrProvider extends Serializable
IOcrProvider : type document provider for automatic reading of documents
  • getKey( ) must return the unique key.
  • getDisplayedName( ) will be displayed in reference lists.
  • Method Summary

    Modifier and Type
    Method
    Description
    getConfigHtmlCode(fr.paris.lutece.util.ReferenceList listEntry, int nIdTargetEntry, String strResourceType)
    Gets the html template configuration
    Gets the displayed name
    fr.paris.lutece.util.ReferenceItem
    getFieldById(int idField)
    Gets the field by id.
    getHtmlCode(int nIdTargetEntry, String strResourceType)
    Gets the html template
    Gets the key.
    fr.paris.lutece.util.ReferenceList
    Gets the list field.
    getParameter(int nKey)
    returns the Parameter class contains all the parameters of the map
    process(fr.paris.lutece.portal.service.upload.MultipartItem fileUploaded, int nIdTargetEntry, String strResourceType)
    Call WS OCR with the uploaded file.
    fr.paris.lutece.util.ReferenceItem
    Builds a new ReferenceItem for the type document provider.
    key == getKey( ), value == getDisplayedName( )
  • Method Details

    • getKey

      String getKey()
      Gets the key. This key must be unique.
      Returns:
      the key;
    • getDisplayedName

      String getDisplayedName()
      Gets the displayed name
      Returns:
      the displayed name
    • getHtmlCode

      String getHtmlCode(int nIdTargetEntry, String strResourceType)
      Gets the html template
      Parameters:
      nIdTargetEntry - The File reading entry id
      strResourceType - the resource type
      Returns:
      the html template
    • getConfigHtmlCode

      String getConfigHtmlCode(fr.paris.lutece.util.ReferenceList listEntry, int nIdTargetEntry, String strResourceType)
      Gets the html template configuration
      Parameters:
      listEntry - The entry list to mapping for prefill
      nIdTargetEntry - The File reading entry id
      strResourceType - the resource type
      Returns:
      the the html template
    • toRefItem

      fr.paris.lutece.util.ReferenceItem toRefItem()
      Builds a new ReferenceItem for the type document provider.
      key == getKey( ), value == getDisplayedName( )
      Returns:
      the item created.
    • getParameter

      Object getParameter(int nKey)
      returns the Parameter class contains all the parameters of the map
      Returns:
      the Parameter
    • getListField

      fr.paris.lutece.util.ReferenceList getListField()
      Gets the list field.
      Returns:
      the list field
    • getFieldById

      fr.paris.lutece.util.ReferenceItem getFieldById(int idField)
      Gets the field by id.
      Parameters:
      idField - the id field
      Returns:
      the field by id
    • process

      List<Response> process(fr.paris.lutece.portal.service.upload.MultipartItem fileUploaded, int nIdTargetEntry, String strResourceType) throws Exception
      Call WS OCR with the uploaded file.
      Parameters:
      fileUploaded - fileUploaded
      nIdTargetEntry - The File reading entry id
      strResourceType - the resource type
      Returns:
      the Ocr result
      Throws:
      Exception