| { |
| "$schema": "http://json-schema.org/draft-03/schema#", |
| "id": "http://ns.taverna.org.uk/2010/activity/spreadsheet-import.schema.json", |
| "title": "Spreadsheet import activity configuration", |
| "type": "object", |
| "properties": { |
| "@context": { |
| "description": "JSON-LD context for interpreting the configuration as RDF", |
| "required": true, |
| "enum": ["http://ns.taverna.org.uk/2010/activity/spreadsheet-import.context.json"] |
| }, |
| "columnRange": { |
| "title": "Column Range", |
| "description": "The range of columns to be imported (e.g. columns 2 to 7)", |
| "type": "object", |
| "$ref": "#/definitions/range", |
| "default": {"start": 0, "end": 1}, |
| "required": true |
| }, |
| "rowRange": { |
| "title": "Row Range", |
| "description": "The range of rows to be imported (e.g. rows 1 to 15)", |
| "type": "object", |
| "$ref": "#/definitions/range", |
| "default": {"start": 0, "end": -1}, |
| "required": true |
| }, |
| "emptyCellValue": { |
| "title": "Empty Cell Value", |
| "description": "The value to use for empty cells. The default is \"\"", |
| "type": "string", |
| "default": "", |
| "required": true |
| }, |
| "columnNames": { |
| "title": "Column Name Mapping", |
| "description": "Mapping from column to port names", |
| "type": "array", |
| "elements": { |
| "type": "object", |
| "properties": { |
| "column": { |
| "title": "Column", |
| "description": "The name of the column", |
| "type": "string", |
| "required": true |
| }, |
| "port": { |
| "title": "Port", |
| "description": "The name of the port", |
| "type": "string", |
| "required": true |
| } |
| } |
| }, |
| "required": false |
| }, |
| "allRows": { |
| "title": "Import All Rows", |
| "description": "Imports all the rows containing data", |
| "type": "boolean", |
| "default": true, |
| "required": true |
| }, |
| "excludeFirstRow": { |
| "title": "Exclude First Row", |
| "description": "Excludes the first row from the import", |
| "type": "boolean", |
| "default": false, |
| "required": true |
| }, |
| "ignoreBlankRows": { |
| "title": "Ignore Blank Rows", |
| "description": "Excludes blank rows from the import", |
| "type": "boolean", |
| "default": false, |
| "required": true |
| }, |
| "emptyCellPolicy": { |
| "title": "Empty Cell Policy", |
| "description": "Policy for handling empty cells", |
| "enum": ["EMPTY_STRING", "USER_DEFINED", "GENERATE_ERROR"], |
| "default": "EMPTY_STRING", |
| "required": true |
| }, |
| "outputFormat": { |
| "title": "Output Format", |
| "description": "How the activity outputs are to be formatted", |
| "enum": ["PORT_PER_COLUMN", "SINGLE_PORT"], |
| "default": "PORT_PER_COLUMN", |
| "required": true |
| }, |
| "csvDelimiter": { |
| "title": "CSV Delimiter", |
| "description": "The delimiter to use for CSV input files. The default is ','", |
| "type": "string", |
| "default": ",", |
| "required": true |
| } |
| }, |
| "definitions": { |
| "range": { |
| "properties": { |
| "start": { |
| "title": "Start", |
| "description": "The start of the range", |
| "type": "integer", |
| "required": true |
| }, |
| "end": { |
| "title": "End", |
| "description": "The end of the range", |
| "type": "integer", |
| "required": true |
| }, |
| "excludes": { |
| "title": "Excludes Ranges", |
| "description": "The ranges to exclude from this range", |
| "type": "array", |
| "items": { "type": "object", "$ref": "#/definitions/range" }, |
| "required": false |
| } |
| } |
| } |
| } |
| } |