| | 1 | | using ValidateLib.ErrorsAndWarnings.Errors; |
| | 2 | | using ValidateLib.Metadata.Properties; |
| | 3 | | using ValidateLib.TabularData.Datatypes; |
| | 4 | |
|
| | 5 | | namespace ValidateLib.TabularData.AnnotatedTabularDataModel |
| | 6 | | { |
| | 7 | | public enum CellType |
| | 8 | | { |
| | 9 | | SIMPLE_VALUE, |
| | 10 | | LIST, |
| | 11 | | NULL |
| | 12 | | } |
| | 13 | | public class Cell |
| | 14 | | { |
| 1 | 15 | | public URITemplateProperty? aboutURL { get; set; } = null; |
| | 16 | | // null is when we exceed the number of columns defined by the metadata document |
| 1 | 17 | | public Column? column { get; set; } |
| 1 | 18 | | public bool ordered { get; set; } = false; |
| 1 | 19 | | public URITemplateProperty? propertyURL { get; set; } = null; |
| 1 | 20 | | public string stringValue { get; set; } |
| 1 | 21 | | public Table table { get; set; } |
| 1 | 22 | | public string textDirection { get; set; } = "auto"; |
| 1 | 23 | | public BaseDT? value { get; set; } = null; |
| 1 | 24 | | public URITemplateProperty? valueURL { get; set; } = null; |
| 1 | 25 | | public List<Error> errors { get; set; } = new List<Error>(); |
| 1 | 26 | | public Row row { get; set; } |
| | 27 | |
|
| | 28 | | // We need this for the nulls and structured columns |
| 1 | 29 | | public CellType cellType { get; set; } |
| | 30 | | // This we keep for the malformed CSV that do not adhere to the 1NF and have structured data in one column |
| 1 | 31 | | public List<BaseDT> cellValues { get; set; } = new List<BaseDT>(); |
| | 32 | |
|
| 1 | 33 | | public Cell(Table table, Column? column, string stringValue, Row row) |
| | 34 | | { |
| 1 | 35 | | this.table = table; |
| 1 | 36 | | this.column = column; |
| 1 | 37 | | this.stringValue = stringValue; |
| 1 | 38 | | this.row = row; |
| 1 | 39 | | } |
| | 40 | | } |
| | 41 | | } |