LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  October 2015

HPS-SVN October 2015

Subject:

r3878 - in /java/trunk/datacat-client/src/main/java/org/hps/datacat/client: DatacatClientImpl.java DatacatConstants.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Thu, 22 Oct 2015 21:58:29 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (109 lines)

Author: [log in to unmask]
Date: Thu Oct 22 14:58:27 2015
New Revision: 3878

Log:
Change base URL for API requests.

Modified:
    java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatClientImpl.java
    java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatConstants.java

Modified: java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatClientImpl.java
 =============================================================================
--- java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatClientImpl.java	(original)
+++ java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatClientImpl.java	Thu Oct 22 14:58:27 2015
@@ -94,7 +94,7 @@
         parameters.put("fileFormat", fileFormat.toString());
         parameters.put("name", name);
         final JSONObject jsonDataset = JSONUtilities.createJSONDataset(parameters, metadata);
-        final String urlLocation = url + "/r/datasets.json/" + this.rootDir + "/" + folder;
+        final String urlLocation = url + "/datasets.json/" + this.rootDir + "/" + folder;
         LOGGER.info("addDataset: " + urlLocation);
         LOGGER.info("dataset JSON: " + jsonDataset.toString());
         return HttpUtilities.doPost(urlLocation, jsonDataset.toString());
@@ -113,7 +113,7 @@
     public int addMetadata(final String folder, final String name, final Map<String, Object> metaData) {
         final JSONObject object = new JSONObject();
         object.put("versionMetadata", JSONUtilities.createJSONMetadataArray(metaData));
-        final String patchUrl = this.url.toString() + "/r/datasets.json/" + this.rootDir + "/" + folder + "/" + name
+        final String patchUrl = this.url.toString() + "/datasets.json/" + this.rootDir + "/" + folder + "/" + name
                 + ";v=current;s=" + this.site;
         LOGGER.info("addMetadata: " + patchUrl);
         return HttpUtilities.doPatch(patchUrl, object.toString());
@@ -129,7 +129,7 @@
      */
     @Override
     public int deleteDataset(final String path) {
-        final String urlLocation = url.toString() + "/r/datasets.json/" + this.rootDir + path;
+        final String urlLocation = url.toString() + "/datasets.json/" + this.rootDir + path;
         LOGGER.info("deleting dataset: " + urlLocation);
         return HttpUtilities.doDelete(urlLocation);
     }
@@ -147,7 +147,7 @@
         if (path.length() == 0) {
             throw new IllegalArgumentException("The path is a blank string.");
         }
-        final String urlLocation = this.url + "/r/path.json/" + this.rootDir + "/" + path;
+        final String urlLocation = this.url + "/path.json/" + this.rootDir + "/" + path;
         final StringBuffer output = new StringBuffer();
         final int status = HttpUtilities.doGet(urlLocation, output);
         if (status > 400) {
@@ -170,7 +170,7 @@
     @Override
     public List<Dataset> findDatasets(final String directory, final String query, final Set<String> showMetadata) {
 
-        String urlLocation = this.url.toString() + "/r/search.json/" + this.rootDir + "/";
+        String urlLocation = this.url.toString() + "/search.json/" + this.rootDir + "/";
         if (directory != null) {
             urlLocation += directory;
         }
@@ -224,7 +224,7 @@
         if (site == null) {
             throw new IllegalArgumentException("The site is null.");
         }
-        String urlLocation = this.url + "/r/path.json/" + this.rootDir;
+        String urlLocation = this.url + "/path.json/" + this.rootDir;
         if (!path.startsWith("/")) {
             urlLocation += "/";
         }
@@ -247,7 +247,7 @@
         if (path.length() == 0) {
             throw new IllegalArgumentException("The path is a blank string.");
         }
-        final String urlLocation = this.url + "/r/path.json/" + this.rootDir + "/" + path;
+        final String urlLocation = this.url + "/path.json/" + this.rootDir + "/" + path;
         final StringBuffer output = new StringBuffer();
         final int status = HttpUtilities.doGet(urlLocation, output);
         if (status > 400) {
@@ -271,7 +271,7 @@
         parameters.put("name", name);
         parameters.put("_type", "folder");
         final JSONObject object = JSONUtilities.createJSONFromMap(parameters);
-        final String urlLocation = url + "/r/folders.json/" + this.rootDir;
+        final String urlLocation = url + "/folders.json/" + this.rootDir;
         LOGGER.info("making folder: " + urlLocation);
         LOGGER.info("folder JSON: " + object.toString());
         return HttpUtilities.doPost(urlLocation, object.toString());
@@ -287,7 +287,7 @@
      */
     @Override
     public int removeFolder(final String folder) {
-        final String fullUrl = url.toString() + "/r/folders.json/" + this.rootDir + folder;
+        final String fullUrl = url.toString() + "/folders.json/" + this.rootDir + folder;
         LOGGER.info("removing folder: " + fullUrl);
         return HttpUtilities.doDelete(fullUrl);
     }

Modified: java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatConstants.java
 =============================================================================
--- java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatConstants.java	(original)
+++ java/trunk/datacat-client/src/main/java/org/hps/datacat/client/DatacatConstants.java	Thu Oct 22 14:58:27 2015
@@ -15,5 +15,5 @@
     /**
      * The base URL of the datacat server.
      */
-    public static final String BASE_URL = "http://hpsweb.jlab.org/datacat";
+    public static final String BASE_URL = "http://hpsweb.jlab.org/datacat/r";
 }

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use