Skip to content

Commit

Permalink
Compatibility fixes with OODT-0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
IKCAP committed Nov 6, 2014
1 parent b5470c1 commit c893e50
Show file tree
Hide file tree
Showing 6 changed files with 260 additions and 221 deletions.
4 changes: 2 additions & 2 deletions oodt-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<parent>
<groupId>edu.isi.wings</groupId>
<artifactId>wings-core</artifactId>
<version>3.0-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
<relativePath>../core/pom.xml</relativePath>
</parent>

<properties>
<oodt.version>0.7-SNAPSHOT</oodt.version>
<oodt.version>0.8-SNAPSHOT</oodt.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,23 @@ private String query(String method, String op, Object... args) {
+ URLEncoder.encode(args[i+1].toString(), "UTF-8");
}

if("GET".equals(method)) {
URL urlobj = new URL(url + "?" + params);
return IOUtils.toString(urlobj);
}
else {
URL urlobj = new URL(url);
HttpURLConnection con = (HttpURLConnection) urlobj.openConnection();
con.setRequestMethod(method);
con.setDoOutput(true);
DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes(params);
out.flush();
out.close();

String result = IOUtils.toString(con.getInputStream());
con.disconnect();
return result;
URL urlobj = new URL(url);
if("GET".equals(method))
urlobj = new URL(url + "?" + params);
HttpURLConnection con = (HttpURLConnection) urlobj.openConnection();
con.setRequestMethod(method);
if(!"GET".equals(method)) {
con.setDoOutput(true);
DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes(params);
out.flush();
out.close();
}

String result = IOUtils.toString(con.getInputStream());
con.disconnect();
return result;

} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ public boolean moveDatatypeParent(String dtypeid, String fromtypeid, String toty
// Not currently supported
return false;
}

@Override
public boolean moveDataParent(String arg0, String arg1, String arg2) {
// Not currently supported
return false;
}

@Override
public boolean addData(String dataid, String dtypeid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ public boolean moveDatatypeParent(String dtypeid, String fromtypeid, String toty
// Not currently supported
return false;
}

@Override
public boolean moveDataParent(String arg0, String arg1, String arg2) {
// Not currently supported
return false;
}

@Override
public boolean addData(String dataid, String dtypeid) {
Expand Down
Loading

0 comments on commit c893e50

Please sign in to comment.