Skip to content

Commit

Permalink
[Fix] Fix Column and Row URIs in Cell properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rodionnv committed Oct 6, 2023
1 parent 46e68e9 commit 670025b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static Property extendedProperty(String local )
public static final String uriTemplate = uri + "uriTemplate";
public static final String TableSchemaUri = uri + "TableSchema";
public static final String aboutUrlUri = uri + "aboutUrl";
public static final String columnsUri = uri + "columns";
public static final String columnUri = uri + "column";
public static final String propertyUrlUri = uri + "propertyUrl";
public static final String valueUrlUri = uri + "valueUrl";
public static final String ColumnUri = uri + "Column";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ ExecutionContext executeSelf() {
for(int i = region.getFirstRow();i <= region.getLastRow();i++){
for(int j = region.getFirstColumn();j <= region.getLastColumn();j++) {
Cell cell = new Cell(sourceResource.getUri()+"#cell"+(cellsNum));
cell.setRowName(tableSchema.createAboutUrl(i));
cell.setColumnName(outputColumns.get(j).getUri().toString());
cell.setRow(tableSchema.createAboutUrl(i));
cell.setColumn(outputColumns.get(j).getUri().toString());
if(cellsNum != firstCellInRegionNum)
cell.setSameValueAsCell(sourceResource.getUri()+"#cell"+(firstCellInRegionNum));
em.merge(cell);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public Cell(String cellUri) {
@OWLAnnotationProperty(iri = CSVW.nameUri)
private String name;

@OWLAnnotationProperty(iri = CSVW.RowUri)
private String rowName;
@OWLAnnotationProperty(iri = CSVW.rowUri)
private String row;

@OWLAnnotationProperty(iri = CSVW.ColumnUri)
private String columnName;
@OWLAnnotationProperty(iri = CSVW.columnUri)
private String column;

@OWLAnnotationProperty(iri = KBSS_CSVW.sameValueAsUri)
private String sameValueAsCell;
Expand All @@ -51,20 +51,20 @@ public void setSameValueAsCell(String sameValueAsCell) {
this.sameValueAsCell = sameValueAsCell;
}

public void setRowName(String rowName) {
tabularModuleUtils.setVariable(this.rowName, rowName, value -> this.rowName = value, "rowName");
public void setRow(String row) {
tabularModuleUtils.setVariable(this.row, row, value -> this.row = value, "rowName");
}

public String getRowName() {
return rowName;
public String getRow() {
return row;
}

public void setColumnName(String columnName) {
tabularModuleUtils.setVariable(this.columnName, columnName, value -> this.columnName = value, "columnName");
public void setColumn(String column) {
tabularModuleUtils.setVariable(this.column, column, value -> this.column = value, "columnName");
}

public String getColumnName() {
return columnName;
public String getColumn() {
return column;
}

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<http://test-file#cell3>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
<http://www.w3.org/ns/csvw#column>
_:b0 ;
<http://www.w3.org/ns/csvw#Row>
<http://www.w3.org/ns/csvw#row>
<http://test-file#row-2> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://test-file#cell1> .
Expand Down Expand Up @@ -35,9 +35,9 @@ _:b2 a <http://www.w3.org/ns/csvw#Column> ;

<http://test-file#cell2>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
<http://www.w3.org/ns/csvw#column>
_:b1 ;
<http://www.w3.org/ns/csvw#Row>
<http://www.w3.org/ns/csvw#row>
<http://test-file#row-2> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://test-file#cell1> .
Expand All @@ -52,9 +52,9 @@ _:b2 a <http://www.w3.org/ns/csvw#Column> ;

<http://test-file#cell1>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
<http://www.w3.org/ns/csvw#column>
_:b2 ;
<http://www.w3.org/ns/csvw#Row>
<http://www.w3.org/ns/csvw#row>
<http://test-file#row-2> .

_:b0 a <http://www.w3.org/ns/csvw#Column> ;
Expand Down Expand Up @@ -122,16 +122,16 @@ _:b0 a <http://www.w3.org/ns/csvw#Column> ;

<http://test-file#cell5>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
<http://www.w3.org/ns/csvw#column>
_:b2 ;
<http://www.w3.org/ns/csvw#Row>
<http://www.w3.org/ns/csvw#row>
<http://test-file#row-4> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://test-file#cell4> .

<http://test-file#cell4>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
<http://www.w3.org/ns/csvw#column>
_:b2 ;
<http://www.w3.org/ns/csvw#Row>
<http://www.w3.org/ns/csvw#row>
<http://test-file#row-3> .

0 comments on commit 670025b

Please sign in to comment.