[ARVADOS] updated: c6c3d3d23d1cca50381570d0558470d47e71fd95

git at public.curoverse.com git at public.curoverse.com
Mon May 5 13:25:12 EDT 2014


Summary of changes:
 doc/_config.yml                        |    2 +
 doc/sdk/index.html.textile.liquid      |    3 +-
 doc/sdk/java/index.html.textile.liquid |  130 ++++++++++++++++++++++++++++++++
 sdk/java/README                        |   30 ++++---
 4 files changed, 151 insertions(+), 14 deletions(-)
 create mode 100644 doc/sdk/java/index.html.textile.liquid

       via  c6c3d3d23d1cca50381570d0558470d47e71fd95 (commit)
      from  67fef1f4bec2d314c9d37bb05c55ff1067ba7b49 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c6c3d3d23d1cca50381570d0558470d47e71fd95
Author: radhika <radhika at curoverse.com>
Date:   Mon May 5 13:24:20 2014 -0400

    2525: Add java SDK to documentation site.

diff --git a/doc/_config.yml b/doc/_config.yml
index fc26cc9..9fc097b 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -56,6 +56,8 @@ navbar:
       - sdk/perl/index.html.textile.liquid
     - Ruby:
       - sdk/ruby/index.html.textile.liquid
+    - Java:
+      - sdk/java/index.html.textile.liquid
     - CLI:
       - sdk/cli/index.html.textile.liquid
   api:
diff --git a/doc/sdk/index.html.textile.liquid b/doc/sdk/index.html.textile.liquid
index 061e964..1b1e18a 100644
--- a/doc/sdk/index.html.textile.liquid
+++ b/doc/sdk/index.html.textile.liquid
@@ -9,9 +9,10 @@ This section documents how to access the Arvados API and Keep using various prog
 * "Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html
 * "Perl SDK":{{site.baseurl}}/sdk/perl/index.html
 * "Ruby SDK":{{site.baseurl}}/sdk/ruby/index.html
+* "Java SDK":{{site.baseurl}}/sdk/java/index.html
 * "Command line SDK":{{site.baseurl}}/sdk/cli/index.html ("arv")
 
 SDKs not yet implemented:
 
 * Rails SDK: Workbench uses an ActiveRecord-like interface to Arvados. This hasn't yet been extracted from Workbench and packaged as a gem.
-* R and Java: We plan to support these, but they have not been implemented yet.
+* R: We plan to support this, but it has not been implemented yet.
diff --git a/doc/sdk/java/index.html.textile.liquid b/doc/sdk/java/index.html.textile.liquid
new file mode 100644
index 0000000..f2280d2
--- /dev/null
+++ b/doc/sdk/java/index.html.textile.liquid
@@ -0,0 +1,130 @@
+---
+layout: default
+navsection: sdk
+navmenu: Java
+title: "Java SDK"
+
+...
+
+The Java SDK provides a generic set of wrappers so you can make API calls in java.
+
+h3. Introdution
+
+* The Java SDK requires Java 6 or later
+  
+* The Java SDK is implemented as a maven project. Hence, you would need a working
+maven environment to be able to build the source code. If you do not have maven setup,
+you may find the following link useful. 
+
+<code class="userinput">http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html</code>
+
+* In this document $ARVADOS_HOME is used to refer to the directory where
+arvados code is cloned in your system. For ex: $ARVADOS_HOME = $HOME/arvados
+
+
+h3. Setting up the environment
+
+* The SDK requires a running Arvados API server. The information about the
+  	  API server needs to be passed to the SDK using environment variables or
+  	  during the construction of the Arvados instance.
+  	  
+* Below are the details about the environment variables and example setup
+  	  statements for a .bashrc file.
+  	
+<notextile>
+<pre>
+ARVADOS_API_TOKEN: API client token to be used to authorize with API server.
+$ <code class="userinput">export ARVADOS_API_TOKEN=z40gplmla6i58rsg96jhg5u41ewdl5rj4g1py2s6e2lsc3</code>
+
+ARVADOS_API_HOST: Host name of the API server.
+$ <code class="userinput">export ARVADOS_API_HOST=localhost:3001</code>
+
+ARVADOS_API_HOST_INSECURE: Set this to true if you are using self-signed
+certificates and would like to bypass certificate validations.
+$ <code class="userinput">export ARVADOS_API_HOST_INSECURE=true</code>
+</pre>
+</notextile>
+
+
+h3. Building the Arvados SDK
+
+<notextile>
+<pre>
+$ <code class="userinput">cd $ARVADOS_HOME/sdk/java</code>
+
+$ <code class="userinput">mvn clean package</code>
+  This will generate arvados sdk jar file in the target directory
+</pre>
+</notextile>
+
+
+h3. Implementing your code to use SDK
+
+<code class="userinput">$ARVADOS_HOME/sdk/java/ArvadosSDKJavaExample.java</code> serves as a sample
+implementation using the SDK.
+
+Please use this file to see how you would want use the SDK from your java program.
+
+Also, refer to <code class="userinput">$ARVADOS_HOME/arvados/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java</code>
+for more sample API invocation examples.
+
+Below are the steps to compile and run this java program.
+
+* <code class="userinput">ArvadosSDKJavaExample.java</code> creates an instance of Arvados SDK class and uses it to
+make various <code class="userinput">call</code> requests.
+
+* To compile ArvadosSDKJavaExample.java
+<notextile>
+<pre>
+$ <code class="userinput">javac -cp $ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar \
+ArvadosSDKJavaExample.java</code>
+This results in the generation of the ArvadosSDKJavaExample.class file
+in the same directory as the java file
+</pre>
+</notextile>
+
+* To run the sample
+<notextile>
+<pre>
+$ <code class="userinput">java -cp .:$ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar \
+ArvadosSDKJavaExample</code>
+</pre>
+</notextile>
+
+
+h3. Viewing and Managing SDK logging
+
+* SDK uses log4j logging
+
+* The default location of the log file is
+  <code class="userinput">$ARVADOS_HOME/sdk/java/log/arvados_sdk_java.log</code>
+
+* Update <code class="userinput">log4j.properties</code> file to change name and location of the log file.
+
+<notextile>
+<pre>
+<code class="userinput">$ nano $ARVADOS_HOME/sdk/java/src/main/resources/log4j.properties</code>
+and modify the <code class="userinput">log4j.appender.fileAppender.File</code> property as needed.
+
+Rebuild the SDK:
+<code class="userinput">$ mvn clean package</code>
+</pre>
+</notextile>
+
+
+h3. Using the SDK in eclipse
+
+* To develop in eclipse, you can use the provided <code class="userinput">eclipse project</code>
+
+* Install <code class="userinput">m2eclipse</code> plugin in your eclipse
+* Set <code class="userinput">M2_REPO</code> in eclipse to your <code class="userinput">.m2/repository</code> directory
+
+* Open the SDK project in eclipse
+<notextile>
+<pre>
+File -> Import -> Existing Projects into Workspace -> Next -> Browse
+and select $ARVADOS_HOME/sdk/java
+</pre>
+</notextile>
+
+
diff --git a/sdk/java/README b/sdk/java/README
index e4cc203..b81252a 100644
--- a/sdk/java/README
+++ b/sdk/java/README
@@ -9,16 +9,16 @@
 
   - The Java SDK requires Java 6 or later
   
-  - The Java SDK is used as a maven project. Hence, you would need a working
-      maven environment to be able to build the source code.
+  - The Java SDK is implemented as a maven project. Hence, you would need a
+      working maven environment to be able to build the source code.
 
       If you do not have maven setup, you may find the following link useful.
 
       http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
 
-  - In this document <ARVADOS_HOME> is used to refer to the directory where
+  - In this document $ARVADOS_HOME is used to refer to the directory where
       arvados code is cloned in your system.
-      For ex: <ARVADOS_HOME> = $HOME/arvados
+      For ex: $ARVADOS_HOME = $HOME/arvados
 
 
 == Setting up the environment
@@ -52,7 +52,7 @@
 
 == Building the Arvados SDK
 
-  - cd <ARVADOS_HOME/sdk/java
+  - cd $ARVADOS_HOME/sdk/java
 
   - mvn clean package
 
@@ -61,24 +61,28 @@
 
 == Implementing your code to use SDK
 
-  - <ARVADOS_HOME>/sdk/java/ArvadosSDKJavaExample.java serves as an example
+  - $ARVADOS_HOME/sdk/java/ArvadosSDKJavaExample.java serves as an example
       implementation using the java SDK. Please use this file to see how
       you would want use the SDK from your java program.
-      The steps below use this java class name.
+
+    Also, refer to $ARVADOS_HOME/arvados/sdk/java/src/test/java/org/arvados/sdk/java/ArvadosTest.java
+     for more sample API invocation examples.
+
+      Below are the steps to compile and run this java program.
 
   - ArvadosSDKJavaExample.java creates an instance of Arvados SDK class and
       uses it to make various "call" requests.
 
   - To compile ArvadosSDKJavaExample.java
 
-      javac -cp <ARVADOS_HOME>/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar ArvadosSDKJavaExample.java
+      javac -cp $ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar ArvadosSDKJavaExample.java
 
       This results in the generation of the ArvadosSDKJavaExample.class file
         in the same directory as the java file
 
   - To run the class file
 
-      java -cp .:<ARVADOS_HOME>/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar ArvadosSDKJavaExample
+      java -cp .:$ARVADOS_HOME/sdk/java/target/arvados-sdk-1.0-jar-with-dependencies.jar ArvadosSDKJavaExample
 
 
 == Viewing and managing SDK logging
@@ -86,19 +90,19 @@
   - SDK uses log4j logging
 
   - The default location of the log file is
-      <ARVADOS_HOME>/sdk/java/log/arvados_sdk_java.log
+      $ARVADOS_HOME/sdk/java/log/arvados_sdk_java.log
 
   - Update log4j.properties file to change name and location of the log file.
 
       Modify the "log4j.appender.fileAppender.File" property in log4j.properties
-        file located at <ARVADOS_HOME>/sdk/java/src/main/resources
+        file located at $ARVADOS_HOME/sdk/java/src/main/resources
 
       Rebuild by running "mvn clean package"
 
 
 == Using the SDK in eclipse
 
-  - To develop in eclipse, you can use the SDK eclipse project.
+  - To develop in eclipse, you can use the provided eclipse project.
 
   - Install "m2eclipse" plugin in your eclipse
   
@@ -107,4 +111,4 @@
   - Open the SDK project.
 
       File -> Import -> Existing Projects into Workspace -> Next -> Browse
-          and select <ARVADOS_HOME>/sdk/java
+          and select $ARVADOS_HOME/sdk/java

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list