public class DocumentConversion extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
static String |
VERSION_DATE_2015_12_01
The Constant VERSION_DATE_2015_12_01.
|
MESSAGE_CODE, MESSAGE_ERROR, VERSION| Constructor and Description |
|---|
DocumentConversion(String versionDate)
Instantiates a new document conversion.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<Answers> |
convertDocumentToAnswer(File document)
Converts a document to Answer Units.
|
ServiceCall<Answers> |
convertDocumentToAnswer(File document,
String mediaType)
Converts a document to Answer Units.
|
ServiceCall<Answers> |
convertDocumentToAnswer(File document,
String mediaType,
com.google.gson.JsonObject customConfig)
Converts a document to Answer Units using a custom configuration.
|
ServiceCall<String> |
convertDocumentToHTML(File document)
Converts a document to HTML.
|
ServiceCall<String> |
convertDocumentToHTML(File document,
String mediaType)
Converts a document to HTML.
|
ServiceCall<String> |
convertDocumentToHTML(File document,
String mediaType,
com.google.gson.JsonObject customConfig)
Converts a document to HTML using a custom configuration.
|
ServiceCall<String> |
convertDocumentToText(File document)
Converts a document to Text.
|
ServiceCall<String> |
convertDocumentToText(File document,
String mediaType)
Converts a document to Text.
|
ServiceCall<String> |
convertDocumentToText(File document,
String mediaType,
com.google.gson.JsonObject customConfig)
Converts a document to Text using a custom configuration.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic static final String VERSION_DATE_2015_12_01
public DocumentConversion(String versionDate)
versionDate - The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
will keep your API calls from failing when the service introduces breaking changes.public ServiceCall<Answers> convertDocumentToAnswer(File document)
convertDocumentToAnswer(File, String) if you want to specify the
media typedocument - the documentAnswerspublic ServiceCall<Answers> convertDocumentToAnswer(File document, String mediaType)
document - the documentmediaType - the document media type. It will use the file extension if not providedAnswersfor available media typespublic ServiceCall<Answers> convertDocumentToAnswer(File document, String mediaType, com.google.gson.JsonObject customConfig)
document - the documentmediaType - the document media type. It will use the file extension if not provided.customConfig - the configuration parameters to customize the conversionStringpublic ServiceCall<String> convertDocumentToHTML(File document)
convertDocumentToHTML(File, String) if you want to specify the
media type.document - the documentStringpublic ServiceCall<String> convertDocumentToHTML(File document, String mediaType)
document - the documentmediaType - the document media type. It will use the file extension if not provided.Stringfor available media typespublic ServiceCall<String> convertDocumentToHTML(File document, String mediaType, com.google.gson.JsonObject customConfig)
document - the documentmediaType - the document media type. It will use the file extension if not provided.customConfig - the configuration parameters to customize the conversionStringpublic ServiceCall<String> convertDocumentToText(File document)
convertDocumentToText(File, String) if you want to specify the
media type.document - the documentStringpublic ServiceCall<String> convertDocumentToText(File document, String mediaType)
document - the documentmediaType - the document media type. It will use the file extension if not provided.Stringfor available media typespublic ServiceCall<String> convertDocumentToText(File document, String mediaType, com.google.gson.JsonObject customConfig)
document - the documentmediaType - the document media type. It will use the file extension if not provided.customConfig - the configuration parameters to customize the conversionStringCopyright © 2015–2016. All rights reserved.