Skip to content

Commit bef94d9

Browse files
code formatting according to google style guide
1 parent b43b5d1 commit bef94d9

File tree

11 files changed

+48
-33
lines changed

11 files changed

+48
-33
lines changed

src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/model/DocumentPublicationDate.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.ibm.watson.developer_cloud.alchemy.v1.model;
217

318
import com.ibm.watson.developer_cloud.alchemy.v1.AlchemyLanguage;

src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/util/AlchemyEndPoints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public enum AlchemyAPI {
112112

113113
/**
114114
* Gets the path based on the operation and input type.
115-
*
115+
*
116116
* @param operation the operation
117117
* @param inputType the input type
118118
* @return the string that represent the path based on the operation and input type

src/main/java/com/ibm/watson/developer_cloud/document_conversion/v1/DocumentConversion.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ private InputStream convertDocument(final File document, final String mediaType,
102102
.addPart(Headers.of(HttpHeaders.CONTENT_DISPOSITION, "form-data; name=\"config\""),
103103
RequestBody.create(HttpMediaType.JSON, configJson.toString()))
104104
.addPart(Headers.of(HttpHeaders.CONTENT_DISPOSITION, "form-data; name=\"file\""),
105-
RequestBody.create(mType, document))
106-
.build();
105+
RequestBody.create(mType, document)).build();
107106

108107
final Request request = RequestBuilder.post(CONVERT_DOCUMENT_PATH).withBody(body).build();
109108

src/main/java/com/ibm/watson/developer_cloud/document_conversion/v1/util/ConversionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static Boolean isValidMediaType(final String mediaType) {
7676

7777
/**
7878
* Write input stream to output stream.
79-
*
79+
*
8080
* @param is the input stream
8181
* @return String
8282
*/

src/main/java/com/ibm/watson/developer_cloud/retrieve_and_rank/v1/RetrieveAndRank.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public SolrClusterList getSolrClusters() {
317317

318318
/**
319319
* This URL can be used with the SolrJ library to access Solr functionality.
320-
*
320+
*
321321
* @param solrClusterId the ID of the Solr cluster to connect to
322322
* @return URL to access Solr
323323
*/
@@ -327,7 +327,7 @@ public String getSolrUrl(String solrClusterId) {
327327

328328
/**
329329
* Gets and returns the ranked answers.
330-
*
330+
*
331331
* @param rankerID The ranker ID
332332
* @param answers The CSV file that contains the search results that you want to rank.
333333
* @param topAnswers The number of top answers needed, default is 10

src/main/java/com/ibm/watson/developer_cloud/retrieve_and_rank/v1/model/SolrClusterOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class SolrClusterOptions {
2929

3030
/**
3131
* Instantiates options to create a new Solr cluster of the specified size
32-
*
32+
*
3333
* @param clusterName the cluster name
3434
* @param clusterSize the cluster size
3535
*/
@@ -40,7 +40,7 @@ public SolrClusterOptions(String clusterName, Integer clusterSize) {
4040

4141
/**
4242
* Instantiates options to create a new free Solr cluster
43-
*
43+
*
4444
* @param clusterName the cluster name
4545
*/
4646
public SolrClusterOptions(String clusterName) {
@@ -50,7 +50,7 @@ public SolrClusterOptions(String clusterName) {
5050

5151
/**
5252
* Gets the cluster name.
53-
*
53+
*
5454
* @return the cluster name
5555
*/
5656
public String getClusterName() {
@@ -59,7 +59,7 @@ public String getClusterName() {
5959

6060
/**
6161
* Gets String representation of the cluster size.
62-
*
62+
*
6363
* @return the cluster size
6464
*/
6565
public Integer getClusterSize() {

src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public abstract class WatsonService {
5656

5757
/**
5858
* Instantiates a new Watson service.
59-
*
59+
*
6060
* @param name the service name
6161
*/
6262
public WatsonService(String name) {
@@ -309,6 +309,7 @@ public void setUsernameAndPassword(String username, String password) {
309309

310310
/**
311311
* Set the default headers to be used on every HTTP request.
312+
*
312313
* @param headers name value pairs of headers
313314
*/
314315
public void setDefaultHeaders(Map<String, String> headers) {
@@ -317,7 +318,7 @@ public void setDefaultHeaders(Map<String, String> headers) {
317318

318319
/*
319320
* (non-Javadoc)
320-
*
321+
*
321322
* @see java.lang.Object#toString()
322323
*/
323324
@Override

src/test/java/com/ibm/watson/developer_cloud/document_conversion/v1/DocumentConversionIntegrationTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public void setUp() throws Exception {
5858
*/
5959
@Test
6060
public void testConvertToAnswers() {
61-
for (File file : files) {
62-
Answers answers = service.convertDocumentToAnswer(file);
61+
for (final File file : files) {
62+
final Answers answers = service.convertDocumentToAnswer(file);
6363
Assert.assertNotNull(answers);
6464
Assert.assertNotNull(answers.getAnswerUnits());
6565
Assert.assertTrue(!answers.getAnswerUnits().isEmpty());
@@ -71,8 +71,8 @@ public void testConvertToAnswers() {
7171
*/
7272
@Test
7373
public void testConvertToHtml() {
74-
for (File file : files) {
75-
String html = service.convertDocumentToHTML(file);
74+
for (final File file : files) {
75+
final String html = service.convertDocumentToHTML(file);
7676
Assert.assertNotNull(html);
7777
Assert.assertNotEquals(html, "");
7878
}
@@ -83,8 +83,8 @@ public void testConvertToHtml() {
8383
*/
8484
@Test
8585
public void testConvertToText() {
86-
for (File file : files) {
87-
String text = service.convertDocumentToText(file);
86+
for (final File file : files) {
87+
final String text = service.convertDocumentToText(file);
8888
Assert.assertNotNull(text);
8989
Assert.assertNotEquals(text, "");
9090
}

src/test/java/com/ibm/watson/developer_cloud/natural_language_classifier/v1/NaturalLanguageClassifierIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class NaturalLanguageClassifierIntegrationTest extends WatsonServiceTest
4646
*/
4747
@Test
4848
public void createAndGetStatusForClassifier() throws Exception {
49-
File trainingData =
49+
final File trainingData =
5050
new File("src/test/resources/natural_language_classifier/weather_data_train.csv");
5151

5252
final String name = "itest-example";
@@ -76,7 +76,7 @@ public void createAndGetStatusForClassifier() throws Exception {
7676
*/
7777
@Test
7878
public void testClassify() throws Exception {
79-
Classification classification = service.classify(classifierId, "is it hot outside?");
79+
final Classification classification = service.classify(classifierId, "is it hot outside?");
8080
assertNotNull(classification);
8181
assertEquals("temperature", classification.getTopClass());
8282
}
@@ -102,7 +102,7 @@ public void setUp() throws Exception {
102102
*/
103103
@Test
104104
public void testGetClassifier() {
105-
Classifier classifier = service.getClassifier(classifierId);
105+
final Classifier classifier = service.getClassifier(classifierId);
106106
assertNotNull(classifier);
107107
assertEquals(classifierId, classifier.getId());
108108
}
@@ -112,7 +112,7 @@ public void testGetClassifier() {
112112
*/
113113
@Test
114114
public void testGetClassifiers() {
115-
Classifiers classifiers = service.getClassifiers();
115+
final Classifiers classifiers = service.getClassifiers();
116116
assertNotNull(classifiers);
117117
assertTrue(!classifiers.getClassifiers().isEmpty());
118118
}

src/test/java/com/ibm/watson/developer_cloud/retrieve_and_rank/v1/SolrClusterOptionsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
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
1212
* the License.
1313
*/
1414
package com.ibm.watson.developer_cloud.retrieve_and_rank.v1;
1515

16-
import static org.junit.Assert.*;
16+
import static org.junit.Assert.assertEquals;
1717

1818
import org.junit.Test;
1919

0 commit comments

Comments
 (0)