Skip to content

Commit

Permalink
Added Advanced search functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiao committed Jan 12, 2015
1 parent ac789f8 commit 3122f6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>pt.ua.ieeta</groupId>
<artifactId>Dicoogle-Java</artifactId>
<version>0.4-SNAPSHOT</version>
<version>0.4</version>
<packaging>jar</packaging>

<name>Dicoogle-Java</name>
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/pt/ua/ieeta/dicoogle/java/DicoogleClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,19 @@ public List<Object> searchAdvanced(String query, QueryLevel level, boolean deep)
ClientResource resource = new ClientResource(this.endPoint + EndPoints.DIM + "?advq=" + query);

// Customize the referrer property

XMLResponses xmlResponse = null ;
try {
// Write the response entity on the console
resource.get().write(System.out);
StringWriter writer = new StringWriter();
resource.get().write(writer);

xmlResponse = new XMLResponses(writer.getBuffer().toString(), level, deep);
} catch (IOException ex) {
Logger.getLogger(DicoogleClient.class.getName()).log(Level.SEVERE, null, ex);
}

return null;
return (List)xmlResponse.getImageResults();

}

}

0 comments on commit 3122f6b

Please sign in to comment.