public class DocumentConversion extends WatsonService
| Modifier and Type | Field and Description | 
|---|---|
| static String | VERSION_DATE_2015_12_01 | 
VERSION| Constructor and Description | 
|---|
| DocumentConversion()Deprecated. 
 | 
| DocumentConversion(String versionDate) | 
| Modifier and Type | Method and Description | 
|---|---|
| Answers | convertDocumentToAnswer(File document)Converts a document to Answer Units. | 
| Answers | convertDocumentToAnswer(File document,
                       String mediaType)Converts a document to Answer Units. | 
| Answers | convertDocumentToAnswer(File document,
                       String mediaType,
                       com.google.gson.JsonObject customConfig)Converts a document to Answer Units using a custom configuration. | 
| String | convertDocumentToHTML(File document)Converts a document to HTML. | 
| String | convertDocumentToHTML(File document,
                     String mediaType)Converts a document to HTML. | 
| String | convertDocumentToHTML(File document,
                     String mediaType,
                     com.google.gson.JsonObject customConfig)Converts a document to HTML using a custom configuration. | 
| String | convertDocumentToText(File document)Converts a document to Text. | 
| String | convertDocumentToText(File document,
                     String mediaType)Converts a document to Text. | 
| String | convertDocumentToText(File document,
                     String mediaType,
                     com.google.gson.JsonObject customConfig)Converts a document to Text using a custom configuration. | 
| com.google.gson.JsonObject | loadCustomConfig(InputStream customConfig)Loads a custom configuration from the input stream specified | 
configureHttpClient, execute, executeRequest, executeWithoutResponse, getApiKey, getEndPoint, getName, getToken, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic static final String VERSION_DATE_2015_12_01
@Deprecated public DocumentConversion()
DocumentConversion(String)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 Answers convertDocumentToAnswer(File document)
convertDocumentToAnswer(File, String) if you want to specify the
 media typedocument - the documentAnswerspublic 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 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 - a config used to customize the conversionStringpublic String convertDocumentToHTML(File document)
convertDocumentToHTML(File, String) if you want to specify the
 media type.document - the documentStringpublic 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 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 - a config used to customize the conversionStringpublic String convertDocumentToText(File document)
convertDocumentToText(File, String) if you want to specify the
 media type.document - the documentStringpublic 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 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 - a config used to customize the conversionStringpublic com.google.gson.JsonObject loadCustomConfig(InputStream customConfig)
customConfig - input stream for the custom configurationCopyright © 2015–2016. All rights reserved.