Skip to content

Commit 283aeaf

Browse files
authored
Merge pull request #1084 from mziccard/gcs-nio-examples-doc
Make examples' javadoc more homogenous and minor html fixes
2 parents e92a9c6 + d52d412 commit 283aeaf

File tree

9 files changed

+57
-67
lines changed

9 files changed

+57
-67
lines changed

gcloud-java-examples/src/main/java/com/google/cloud/examples/bigquery/BigQueryExample.java

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,29 @@
5858
*
5959
* <p>This example demonstrates a simple/typical BigQuery usage.
6060
*
61-
* <p>Steps needed for running the example:
62-
* <ol>
63-
* <li>log in using gcloud SDK - {@code gcloud auth login}.</li>
64-
* <li>compile using maven - {@code cd gcloud-java-examples;
65-
* mvn package appassembler:assemble -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true}
66-
* </li>
67-
* <li>run -
61+
* <p>See the
62+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
63+
* README</a> for compilation instructions. Run this code with
6864
* <pre>{@code target/appassembler/bin/BigQueryExample [<project_id>]
69-
* list datasets |
70-
* list tables <dataset> |
71-
* list jobs |
72-
* list data <dataset> <table> |
73-
* info dataset <dataset> |
74-
* info table <dataset> <table> |
75-
* info job <job> |
76-
* create dataset <dataset> |
77-
* create table <dataset> <table> (<fieldName>:<primitiveType>)+ |
78-
* create view <dataset> <table> <query> |
79-
* create external-table <dataset> <table> <format> (<fieldName>:<primitiveType>)+ <sourceUri> |
80-
* delete dataset <dataset> |
81-
* delete table <dataset> <table> |
82-
* cancel <job> |
83-
* copy <sourceDataset> <sourceTable> <destinationDataset> <destinationTable> |
84-
* load <dataset> <table> <format> <sourceUri>+ |
85-
* extract <dataset> <table> <format> <destinationUri>+ |
86-
* query <query> |
87-
* load-file <dataset> <table> <format> <filePath>"}</pre>
88-
* </li>
89-
* </ol>
65+
* list datasets |
66+
* list tables <dataset> |
67+
* list jobs |
68+
* list data <dataset> <table> |
69+
* info dataset <dataset> |
70+
* info table <dataset> <table> |
71+
* info job <job> |
72+
* create dataset <dataset> |
73+
* create table <dataset> <table> (<fieldName>:<primitiveType>)+ |
74+
* create view <dataset> <table> <query> |
75+
* create external-table <dataset> <table> <format> (<fieldName>:<primitiveType>)+ <sourceUri> |
76+
* delete dataset <dataset> |
77+
* delete table <dataset> <table> |
78+
* cancel <job> |
79+
* copy <sourceDataset> <sourceTable> <destinationDataset> <destinationTable> |
80+
* load <dataset> <table> <format> <sourceUri>+ |
81+
* extract <dataset> <table> <format> <destinationUri>+ |
82+
* query <query> |
83+
* load-file <dataset> <table> <format> <filePath>}</pre>
9084
*
9185
* <p>The first parameter is an optional {@code project_id} (logged-in project will be used if not
9286
* supplied). Second parameter is a BigQuery operation and can be used to demonstrate its usage. For

gcloud-java-examples/src/main/java/com/google/cloud/examples/compute/ComputeExample.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@
8383
*
8484
* <p>This example demonstrates a simple/typical Compute usage.
8585
*
86-
* <p>See the README for the steps needed for compiling and running the example.
87-
* <p>Possible command-line arguments are:
88-
* <pre>{@code [<project_id>]
86+
* <p>See the
87+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
88+
* README</a> for compilation instructions. Run this code with
89+
* <pre>{@code target/appassembler/bin/ComputeExample [<project_id>]
8990
* list networks |
9091
* list region-operations <region> |
9192
* list instances <zone>? |
@@ -147,7 +148,7 @@
147148
* stop <zone> <instance> |
148149
* reset <zone> <instance> |
149150
* set-tags <zone> <instance> <tag>* |
150-
* set-metadata <zone> <instance> <key value>*"}</pre>
151+
* set-metadata <zone> <instance> <key value>*}</pre>
151152
*
152153
* <p>The first parameter is an optional {@code project_id} (logged-in project will be used if not
153154
* supplied). Second parameter is a Compute operation and can be used to demonstrate its usage. For

gcloud-java-examples/src/main/java/com/google/cloud/examples/datastore/DatastoreExample.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,11 @@
4141
* <p>This example adds, displays or clears comments for a given user. This example also sets
4242
* contact information for a user.
4343
*
44-
* <p>Steps needed for running the example:<ol>
45-
* <li>login using gcloud SDK - {@code gcloud auth login}.</li>
46-
* <li>compile using maven - {@code cd gcloud-java-examples;
47-
* mvn package appassembler:assemble -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true}
48-
* </li>
49-
* <li>run - {@code target/appassembler/bin/DatastoreExample
50-
* [projectId] [user] [delete|display|add comment]}</li>
51-
* </ol>
44+
* <p>See the
45+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
46+
* README</a> for compilation instructions. Run this code with
47+
* <pre>{@code target/appassembler/bin/DatastoreExample
48+
* [projectId] [user] [delete|display|add comment]}</pre>
5249
*
5350
* <p>If no action is provided {@code display} is executed.
5451
*/

gcloud-java-examples/src/main/java/com/google/cloud/examples/dns/DnsExample.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@
4242
* <p>This example creates, deletes, gets, and lists zones. It also creates and deletes
4343
* record sets of type A, and lists record sets.
4444
*
45-
* <p>See the README for steps needed for running the example.
46-
* <p>The command-line arguments can be:
47-
* <pre>{@code [<project_id>]
45+
* <p>See the
46+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
47+
* README</a> for compilation instructions. Run this code with
48+
* <pre>{@code target/appassembler/bin/DnsExample [<project_id>]
4849
* create <zone_name> <dns_name> <description> |
4950
* get <zone_name> |
5051
* delete <zone_name> |

gcloud-java-examples/src/main/java/com/google/cloud/examples/nio/CountBytes.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
* This class also shows how to read all of the file's contents using NIO,
3838
* computes a MD5 hash, and reports how long it took.
3939
*
40-
* <p>See the README for compilation instructions. Run this code with
41-
* {@code target/appassembler/bin/CountBytes <file>}
40+
* <p>See the
41+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
42+
* README</a> for compilation instructions. Run this code with
43+
* <pre>{@code target/appassembler/bin/CountBytes <file>}</pre>
4244
*/
4345
public class CountBytes {
4446

gcloud-java-examples/src/main/java/com/google/cloud/examples/nio/ParallelCountBytes.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@
4343
* in order, using multithreaded NIO reads.
4444
* It prints a MD5 hash and reports how long it took.
4545
*
46-
* <p>See the README for compilation instructions. Run this code with
47-
* {@code target/appassembler/bin/ParallelCountBytes <file>}
46+
* <p>See the
47+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
48+
* README</a> for compilation instructions. Run this code with
49+
* <pre>{@code target/appassembler/bin/ParallelCountBytes <file>}</pre>
4850
*/
4951
public class ParallelCountBytes {
5052

gcloud-java-examples/src/main/java/com/google/cloud/examples/nio/Stat.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
* or you can directly pass in a GCS file name to use. In that case you have to
3636
* be logged in (using e.g. the gcloud auth command).
3737
*
38-
* <p>See the README for compilation instructions. Run this code with
39-
* {@code target/appassembler/bin/Stat --help | --check | --list | <file>}
38+
* <p>See the
39+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
40+
* README</a> for compilation instructions. Run this code with
41+
* <pre>{@code target/appassembler/bin/Stat --help | --check | --list | <file>}</pre>
4042
*
4143
* <p>In short, this version (in gcloud-java-examples) is in a package that lists gcloud-java-nio
4244
* as a dependency, so it will work directly without having to do any special work.

gcloud-java-examples/src/main/java/com/google/cloud/examples/resourcemanager/ResourceManagerExample.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@
3232
*
3333
* <p>This example creates, deletes, gets, and lists projects.
3434
*
35-
* <p>Steps needed for running the example:<ol>
36-
* <li>log in using gcloud SDK - {@code gcloud auth login}.</li>
37-
* <li>compile using maven - {@code cd gcloud-java-examples;
38-
* mvn package appassembler:assemble -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true}
39-
* </li>
40-
* <li>run - {@code target/appassembler/bin/ResourceManagerExample
41-
* [list | [create | delete | get] projectId]}</li>
42-
* </ol>
35+
* <p>See the
36+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
37+
* README</a> for compilation instructions. Run this code with
38+
* <pre>{@code target/appassembler/bin/ResourceManagerExample
39+
* [list | [create | delete | get] projectId]}</pre>
4340
*/
4441
public class ResourceManagerExample {
4542

gcloud-java-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@
6464
*
6565
* <p>This example demonstrates a simple/typical storage usage.
6666
*
67-
* <p>Steps needed for running the example:
68-
* <ol>
69-
* <li>log in using gcloud SDK - {@code gcloud auth login}.</li>
70-
* <li>compile using maven - {@code cd gcloud-java-examples;
71-
* mvn package appassembler:assemble -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true}
72-
* </li>
73-
* <li>run -
67+
* <p>See the
68+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
69+
* README</a> for compilation instructions. Run this code with
7470
* <pre>{@code target/appassembler/bin/StorageExample [<project_id>]
7571
* list [<bucket>] |
7672
* info [<bucket> [<file>]] |
@@ -84,9 +80,7 @@
8480
* add-acl domain <bucket> <path>? <domain> OWNER|READER|WRITER |
8581
* add-acl project <bucket> <path>? <projectId>:(OWNERS|EDITORS|VIEWERS) OWNER|READER|WRITER |
8682
* add-acl user <bucket> <path>? <userEmail>|allUsers|allAuthenticatedUsers OWNER|READER|WRITER |
87-
* add-acl group <bucket> <path>? <group> OWNER|READER|WRITER"}</pre>
88-
* </li>
89-
* </ol>
83+
* add-acl group <bucket> <path>? <group> OWNER|READER|WRITER}</pre>
9084
*
9185
* <p>The first parameter is an optional {@code project_id} (logged-in project will be used if not
9286
* supplied). Second parameter is a Storage operation (list, delete, compose,...) and can be used to

0 commit comments

Comments
 (0)