11/**
22 * Copyright 2015 IBM Corp. All Rights Reserved.
3- *
3+ *
44 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55 * in compliance with the License. You may obtain a copy of the License at
6- *
6+ *
77 * http://www.apache.org/licenses/LICENSE-2.0
8- *
8+ *
99 * Unless required by applicable law or agreed to in writing, software distributed under the License
1010 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111 * or implied. See the License for the specific language governing permissions and limitations under
3838/**
3939 * Watson service abstract common functionality of various Watson Services. It handle authentication
4040 * and default url
41- *
41+ *
4242 * @see <a href="http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/"> IBM Watson
4343 * Developer Cloud</a>
4444 */
@@ -53,7 +53,7 @@ public abstract class WatsonService {
5353
5454 /**
5555 * Instantiates a new Watson service.
56- *
56+ *
5757 * @param name the service name
5858 */
5959 public WatsonService (String name ) {
@@ -65,7 +65,7 @@ public WatsonService(String name) {
6565
6666 /**
6767 * Configure HTTP client.
68- *
68+ *
6969 * @return the okhttp client
7070 */
7171 private OkHttpClient configureHttpClient () {
@@ -83,9 +83,9 @@ private OkHttpClient configureHttpClient() {
8383
8484 /**
8585 * Execute the HTTP request.
86- *
86+ *
8787 * @param request the HTTP request
88- *
88+ *
8989 * @return the HTTP response
9090 */
9191 protected Response execute (Request request ) {
@@ -158,7 +158,7 @@ protected Response execute(Request request) {
158158
159159 /**
160160 * Executes the HTTP Request, reads and parses the HTTP Response.
161- *
161+ *
162162 * @param <T> the POJO class that represents the response
163163 * @param request the request
164164 * @param returnType the return type
@@ -172,7 +172,7 @@ protected <T extends GenericModel> T executeRequest(Request request, Class<T> re
172172 /**
173173 * Execute the HTTP request and discard the response. Use this when you don't want to get the
174174 * response but you want to make sure we read it so that the underline connection is released
175- *
175+ *
176176 * @param request the request
177177 */
178178 protected void executeWithoutResponse (Request request ) {
@@ -188,8 +188,8 @@ protected void executeWithoutResponse(Request request) {
188188
189189 /**
190190 * Gets the API key.
191- *
192- *
191+ *
192+ *
193193 * @return the API key
194194 */
195195 protected String getApiKey () {
@@ -198,8 +198,8 @@ protected String getApiKey() {
198198
199199 /**
200200 * Gets the API end point.
201- *
202- *
201+ *
202+ *
203203 * @return the API end point
204204 */
205205 public String getEndPoint () {
@@ -208,14 +208,14 @@ public String getEndPoint() {
208208
209209 /**
210210 * Gets the error message from a JSON response
211- *
211+ *
212212 * <pre>
213213 * {
214214 * code: 400
215215 * error: 'bad request'
216216 * }
217217 * </pre>
218- *
218+ *
219219 * @param response the HTTP response
220220 * @return the error message from the JSON object
221221 */
@@ -240,7 +240,7 @@ private String getErrorMessage(Response response) {
240240
241241 /**
242242 * Gets the name.
243- *
243+ *
244244 * @return the name
245245 */
246246 public String getName () {
@@ -250,17 +250,17 @@ public String getName() {
250250
251251 /**
252252 * Gets the user agent.
253- *
254- *
253+ *
254+ *
255255 * @return the user agent
256256 */
257257 private final String getUserAgent () {
258- return "watson-developer-cloud-java-wrapper -2.0.0" ;
258+ return "watson-developer-cloud-java-sdk -2.0.0" ;
259259 }
260260
261261 /**
262262 * Sets the API key.
263- *
263+ *
264264 * @param apiKey the new API key
265265 */
266266 public void setApiKey (String apiKey ) {
@@ -269,7 +269,7 @@ public void setApiKey(String apiKey) {
269269
270270 /**
271271 * Sets the authentication.
272- *
272+ *
273273 * @param builder the new authentication
274274 */
275275 protected void setAuthentication (Builder builder ) {
@@ -282,7 +282,7 @@ protected void setAuthentication(Builder builder) {
282282
283283 /**
284284 * Sets the end point.
285- *
285+ *
286286 * @param endPoint the new end point
287287 */
288288 public void setEndPoint (String endPoint ) {
@@ -291,7 +291,7 @@ public void setEndPoint(String endPoint) {
291291
292292 /**
293293 * Sets the username and password.
294- *
294+ *
295295 * @param username the username
296296 * @param password the password
297297 */
@@ -301,7 +301,7 @@ public void setUsernameAndPassword(String username, String password) {
301301
302302 /*
303303 * (non-Javadoc)
304- *
304+ *
305305 * @see java.lang.Object#toString()
306306 */
307307 @ Override
0 commit comments