Skip to content

Commit

Permalink
Put DICOM store working.
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiao committed Nov 4, 2015
1 parent bcf939c commit d75ca17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public Iterable<StorageInputStream> at(URI location) {
}

@Override
public URI store(DicomObject dicomObject) {
public URI store(DicomObject dicomObject, Object ... args) {
return null;
}

@Override
public URI store(DicomInputStream inputStream) throws IOException {
public URI store(DicomInputStream inputStream, Object ... args) throws IOException {
return null;
}

Expand Down
13 changes: 0 additions & 13 deletions dicoogle/src/main/java/pt/ua/dicoogle/server/ControlServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,6 @@ public int startStorage() throws IOException

int i;


//System.out.println(settings.getPath());
File f = new File(settings.getPath());

// Storage path must be defined before running the program
// Prompting the user if it isn't
if (!f.exists() || f.isFile())
{
//DebugManager.getInstance().debug("DICOM Storage not started. The server's storage path is not defined.");

return -1;
}

List l = list.getKeys();
String[] keys = new String[l.size()];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,15 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
switch (mType) {
case STORAGE:
boolean success = true;
if(running)
success = controlServices.startStorage() == 0;
int result = 0;
if(running) {
result = controlServices.startStorage();
success = (result == 0);
}
else
controlServices.stopStorage();

obj.element("success", true);
obj.element("success", success);
break;
case PLUGIN:
//TODO: START AND STOP PLUGINS
Expand Down

0 comments on commit d75ca17

Please sign in to comment.