Package com.openkm.sdk4j.impl
Class ConversionImpl
- java.lang.Object
-
- com.openkm.sdk4j.impl.ClientImpl
-
- com.openkm.sdk4j.impl.ConversionImpl
-
- All Implemented Interfaces:
BaseConversion,Serializable
public class ConversionImpl extends ClientImpl implements BaseConversion, Serializable
ConversionImpl- Author:
- sochoa
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConversionImpl(String host)ConversionImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbarcode2txt(InputStream is, String fileName)Extracts the barcode text from the uploaded image.InputStreamdoc2pdf(InputStream is, String fileName)Retrieve the uploaded document converted to PDF format.Stringdoc2txt(InputStream is, String fileName)Extracts the text from the upload document.InputStreamhtml2pdf(String url)Retrieve the PDF of an URL.InputStreamimageConvert(InputStream is, String fileName, String params, String dstMimeType)Retrieve the uploaded image with transformation.Stringimg2txt(InputStream is, String fileName)Extracts the text from the uploaded image.protected voidsetAuthorizationToken(String authorizationToken)setAuthenticationToken-
Methods inherited from class com.openkm.sdk4j.impl.ClientImpl
getClient, getWebTarget, setAuthorizationHeader, setJsessionIdHeader
-
-
-
-
Constructor Detail
-
ConversionImpl
public ConversionImpl(String host)
ConversionImpl
-
-
Method Detail
-
setAuthorizationToken
protected void setAuthorizationToken(String authorizationToken)
setAuthenticationToken
-
doc2pdf
public InputStream doc2pdf(InputStream is, String fileName) throws ConversionException, WebserviceException, UnknownException
Description copied from interface:BaseConversionRetrieve the uploaded document converted to PDF format.- Specified by:
doc2pdfin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- InputStream input stream
- Throws:
ConversionException- the conversion exceptionWebserviceException- the webservice exceptionUnknownException- the unknown exception
-
imageConvert
public InputStream imageConvert(InputStream is, String fileName, String params, String dstMimeType) throws WebserviceException, UnknownException
Description copied from interface:BaseConversionRetrieve the uploaded image with transformation.- Specified by:
imageConvertin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file nameparams- the paramsdstMimeType- the dst mime type- Returns:
- InputStream input stream
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
html2pdf
public InputStream html2pdf(String url) throws ConversionException, WebserviceException, UnknownException
Description copied from interface:BaseConversionRetrieve the PDF of an URL.- Specified by:
html2pdfin interfaceBaseConversion- Parameters:
url- the url- Returns:
- InputStream input stream
- Throws:
ConversionException- the conversion exceptionWebserviceException- the webservice exceptionUnknownException- the unknown exception
-
doc2txt
public String doc2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
Description copied from interface:BaseConversionExtracts the text from the upload document.- Specified by:
doc2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
img2txt
public String img2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
Description copied from interface:BaseConversionExtracts the text from the uploaded image.- Specified by:
img2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- The filename- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
barcode2txt
public String barcode2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
Description copied from interface:BaseConversionExtracts the barcode text from the uploaded image.- Specified by:
barcode2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
-