-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
228 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/org/cytoscape/rest/internal/model/CyColumnModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
@ApiModel(value="Cytoscape Column", description="A column definition in a Cytoscape table") | ||
public class CyColumnModel { | ||
@ApiModelProperty(value = "Column Name", required=true) | ||
public String name; | ||
@ApiModelProperty(value = "Column Data Type", allowableValues="Double,String,Boolean,Long,Integer,List", required=true) | ||
public String type; //"data type, Double, String, Boolean, Long, Integer", | ||
@ApiModelProperty(value="If the type of this column is list, this specifies the type of data in the list.", required=false) | ||
public Boolean listType; | ||
@ApiModelProperty(value="If true, this column is immutable.", required=true) | ||
public Boolean immutable; //": "Optional: boolean value to specify immutable or not", | ||
@ApiModelProperty(value="If true, this column acts as the primary key for this table.", required=true) | ||
public Boolean primaryKey;// "local": "Optional. If true, it will be a local column" | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/cytoscape/rest/internal/model/CyColumnValuesModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import java.util.List; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
@ApiModel(value="Cytoscape Column Values") | ||
public class CyColumnValuesModel { | ||
@ApiModelProperty(value = "Column Name", required=true) | ||
public String name; | ||
@ApiModelProperty(value = "Column Values", required=true) | ||
public List<?> values; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/org/cytoscape/rest/internal/model/CyColumnWithRowsModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import java.util.Collection; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
|
||
@ApiModel(value="Cytoscape Column with Rows", description="A definition of a column from a Cytoscape table, and a list of its rows.") | ||
public class CyColumnWithRowsModel extends CyColumnModel{ | ||
Collection<CyRowModel> rows; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/cytoscape/rest/internal/model/CyRowModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
|
||
@ApiModel(value="Row Data", description="A map of column name to value.\n\n" | ||
+ "```\n" | ||
+ "{\n" | ||
+ " \"id\": 12345,\n" | ||
+ " \"gene_name\": \"brca1\",\n" | ||
+ " \"exp1\": 0.11,\n" | ||
+ " \"exp2\": 0.2\n" | ||
+ "}\n" | ||
+ "```") | ||
public class CyRowModel{ | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/cytoscape/rest/internal/model/CyTableModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
@ApiModel(value="Cytoscape Table", description="A Cytoscape table definition", subTypes= {CyTableWithRowsModel.class}) | ||
public class CyTableModel { | ||
@ApiModelProperty(value = "Table SUID", required=true) | ||
public Long SUID; | ||
|
||
@ApiModelProperty(value = "Title", required=true) | ||
public String title; | ||
|
||
@ApiModelProperty(value = "Public", required=true) | ||
@SerializedName("public") | ||
@JsonProperty("public") | ||
public boolean _public; | ||
|
||
@ApiModelProperty(value = "Mutable", required=true) | ||
public String mutable; | ||
|
||
@ApiModelProperty(value = "Primary Key", required=true) | ||
public String primaryKey; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/org/cytoscape/rest/internal/model/CyTableWithRowsModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import java.util.List; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
@ApiModel(value="Cytoscape Column with Rows", description="A definition of a column from a Cytoscape table, and a list of its rows.", parent=CyTableModel.class) | ||
public class CyTableWithRowsModel extends CyTableModel{ | ||
@ApiModelProperty(value = "Rows", required=true) | ||
public List<CyRowModel> rows; | ||
} |
12 changes: 0 additions & 12 deletions
12
src/main/java/org/cytoscape/rest/internal/model/UpdateRow.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
src/main/java/org/cytoscape/rest/internal/model/UpdateTable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.cytoscape.rest.internal.model; | ||
|
||
import java.util.List; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
@ApiModel(value="Table Update Data") | ||
public class UpdateTable { | ||
@ApiModelProperty(value = "The column in the target table to use as a key. If not specified, SUID will be used.", example="SUID") | ||
public String key; | ||
@ApiModelProperty(value = "The field in the row data to use as a key. If not specified, SUID will be used.", example="id") | ||
public String dataKey; | ||
@ApiModelProperty(value = "The row data with which to update the table.\n\nEach row entry should consist of pairs of keys and values, including one that supplies a value for the `dataKey` key. \n" | ||
+ "```\n" | ||
+ "[\n" | ||
+ " {\n" | ||
+ " \"id\": 12345,\n" | ||
+ " \"gene_name\": \"brca1\",\n" | ||
+ " \"exp1\": 0.11,\n" | ||
+ " \"exp2\": 0.2\n" | ||
+ " },...\n" | ||
+ "]\n" | ||
+ "```\n", required=true) | ||
public List<CyRowModel> data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.