Skip to content

Commit

Permalink
add image Filters
Browse files Browse the repository at this point in the history
  • Loading branch information
geektortoise committed Aug 20, 2015
1 parent 054de95 commit bf1c777
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main/java/be/cytomine/client/Cytomine.java
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ public SoftwareProject addSoftwareProject(Long idSoftware, Long idProject) throw
return saveModel(softwareProject);
}

public SoftwareCollection getSoftwareByProject(Long idProject) throws CytomineException {
public SoftwareCollection getSoftwaresByProject(Long idProject) throws CytomineException {
SoftwareCollection softwares = new SoftwareCollection(offset, max);
softwares.addFilter("project", idProject + "");
return fetchCollection(softwares);
Expand All @@ -1014,6 +1014,20 @@ public SoftwareCollection getSoftwares() throws CytomineException {
return fetchCollection(softwares);
}

public ProcessingServer addProcessingServer(String url) throws CytomineException {
ProcessingServer processingServer = new ProcessingServer();
processingServer.set("url", url);
return saveModel(processingServer);
}

public ImageFilter addImageFilter(String name, String baseUrl, String processingServer) throws CytomineException {
ImageFilter imageFilter = new ImageFilter();
imageFilter.set("name", name);
imageFilter.set("baseUrl", baseUrl);
imageFilter.set("processingServer", processingServer);
return saveModel(imageFilter);
}

public JobData getJobData(Long id) throws CytomineException {
JobData jobData = new JobData();
jobData.set("id", id);
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/be/cytomine/client/models/ImageFilter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package be.cytomine.client.models;

/*
* Copyright (c) 2009-2015. Authors: see NOTICE file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* User: rhoyoux
* Date: 19/08/15
* GIGA-ULg
*/
public class ImageFilter extends Model {

public String getDomainName() {
return "imagefilter";
}

}
30 changes: 30 additions & 0 deletions src/main/java/be/cytomine/client/models/ProcessingServer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package be.cytomine.client.models;

/*
* Copyright (c) 2009-2015. Authors: see NOTICE file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* User: rhoyoux
* Date: 19/08/15
* GIGA-ULg
*/
public class ProcessingServer extends Model {

public String getDomainName() {
return "processing_server";
}

}

0 comments on commit bf1c777

Please sign in to comment.