File tree Expand file tree Collapse file tree 5 files changed +17
-16
lines changed
main/java/com/google/cloud/vision/samples/label
test/java/com/google/cloud/vision/samples/label Expand file tree Collapse file tree 5 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
# Google Cloud Vision API Java Image Labeling example
2
2
3
+ <a href =" https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples&page=editor&open_in_editor=vision/label/README.md " >
4
+ <img alt =" Open in Cloud Shell " src =" http://gstatic.com/cloudssh/images/open-btn.png " ></a >
5
+
3
6
## Download Maven
4
7
5
8
This sample uses the [ Apache Maven] [ maven ] build system. Before getting started, be
Original file line number Diff line number Diff line change 21
21
<groupId >com.google.cloud.vision.samples</groupId >
22
22
<artifactId >vision-label</artifactId >
23
23
24
- <!-- Parent defines shared plugins for linting and unit testing. -->
24
+ <!--
25
+ The parent pom defines common style checks and testing strategies for our samples.
26
+ Removing or replacing it should not affect the execution of the samples in anyway.
27
+ -->
25
28
<parent >
26
- <groupId >com.google.cloud</groupId >
27
- <artifactId >doc-samples</artifactId >
28
- <version >1.0.0</version >
29
- <relativePath >../..</relativePath >
29
+ <groupId >com.google.cloud.samples</groupId >
30
+ <artifactId >shared-configuration</artifactId >
31
+ <version >1.0.8</version >
30
32
</parent >
31
33
32
34
<properties >
Original file line number Diff line number Diff line change 17
17
package com .google .cloud .vision .samples .label ;
18
18
19
19
// [START import_libraries]
20
+
20
21
import com .google .api .client .googleapis .auth .oauth2 .GoogleCredential ;
21
22
import com .google .api .client .googleapis .javanet .GoogleNetHttpTransport ;
22
23
import com .google .api .client .json .JsonFactory ;
31
32
import com .google .api .services .vision .v1 .model .Feature ;
32
33
import com .google .api .services .vision .v1 .model .Image ;
33
34
import com .google .common .collect .ImmutableList ;
34
-
35
35
import java .io .IOException ;
36
36
import java .io .PrintStream ;
37
37
import java .nio .file .Files ;
Original file line number Diff line number Diff line change 21
21
22
22
import com .google .api .services .vision .v1 .model .EntityAnnotation ;
23
23
import com .google .common .collect .ImmutableSet ;
24
-
24
+ import java .io .IOException ;
25
+ import java .nio .file .Paths ;
26
+ import java .util .List ;
25
27
import org .junit .Before ;
26
28
import org .junit .Test ;
27
29
import org .junit .runner .RunWith ;
28
30
import org .junit .runners .JUnit4 ;
29
31
30
- import java .io .IOException ;
31
- import java .nio .file .Paths ;
32
- import java .util .List ;
33
-
34
32
/**
35
33
* Integration (system) tests for {@link LabelApp}.
36
34
*/
Original file line number Diff line number Diff line change 20
20
21
21
import com .google .api .services .vision .v1 .model .EntityAnnotation ;
22
22
import com .google .common .collect .ImmutableList ;
23
-
24
- import org .junit .Test ;
25
- import org .junit .runner .RunWith ;
26
- import org .junit .runners .JUnit4 ;
27
-
28
23
import java .io .ByteArrayOutputStream ;
29
24
import java .io .PrintStream ;
30
25
import java .nio .file .Paths ;
26
+ import org .junit .Test ;
27
+ import org .junit .runner .RunWith ;
28
+ import org .junit .runners .JUnit4 ;
31
29
32
30
/**
33
31
* Unit tests for {@link LabelApp}.
You can’t perform that action at this time.
0 commit comments