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.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
DocumentConversion(String versionDate)
Instantiates a new document conversion.
|
DocumentConversion(String versionDate,
String username,
String password)
Instantiates a new document conversion by username and password.
|
| 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.
|
ServiceCall<String> |
indexDocument(IndexDocumentOptions indexDocumentOptions)
Converts and indexes the document and metadata provided.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, 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 DocumentConversion(String versionDate, String username, String password)
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.username - the usernamepassword - the passwordpublic 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 providedAnswersHttpMediaType for 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 conversionStringpublic ServiceCall<String> indexDocument(IndexDocumentOptions indexDocumentOptions)
indexDocumentOptions - Specifies the options for indexing the documentStringCopyright © 2015–2016 IBM Watson. All rights reserved.