From 46e68e973432df8c13d94950eafb14b0fae218dc Mon Sep 17 00:00:00 2001 From: "Nazarov, Rodion" Date: Tue, 3 Oct 2023 22:32:45 +0200 Subject: [PATCH] [Fix] Change cells URIs from example.org to sourceResourceUri --- .../cz/cvut/spipes/modules/TabularModule.java | 4 +- .../resources/merged-xls-model-output.ttl | 124 +++++++++--------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/TabularModule.java b/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/TabularModule.java index 2049474a..2b194482 100644 --- a/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/TabularModule.java +++ b/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/TabularModule.java @@ -343,11 +343,11 @@ ExecutionContext executeSelf() { int firstCellInRegionNum = cellsNum; for(int i = region.getFirstRow();i <= region.getLastRow();i++){ for(int j = region.getFirstColumn();j <= region.getLastColumn();j++) { - Cell cell = new Cell("http://example.org/cell"+(cellsNum)); + Cell cell = new Cell(sourceResource.getUri()+"#cell"+(cellsNum)); cell.setRowName(tableSchema.createAboutUrl(i)); cell.setColumnName(outputColumns.get(j).getUri().toString()); if(cellsNum != firstCellInRegionNum) - cell.setSameValueAsCell("http://example.org/cell"+(firstCellInRegionNum)); + cell.setSameValueAsCell(sourceResource.getUri()+"#cell"+(firstCellInRegionNum)); em.merge(cell); cellsNum++; } diff --git a/s-pipes-modules/module-tabular/src/test/resources/merged-xls-model-output.ttl b/s-pipes-modules/module-tabular/src/test/resources/merged-xls-model-output.ttl index b872f274..f706f439 100644 --- a/s-pipes-modules/module-tabular/src/test/resources/merged-xls-model-output.ttl +++ b/s-pipes-modules/module-tabular/src/test/resources/merged-xls-model-output.ttl @@ -1,13 +1,23 @@ - + a ; _:b0 ; - ; + ; - . + . -_:b0 a ; +_:b1 a ; + + "bb" ; + + "http://onto.fel.cvut.cz/data/bb" ; + + "bb" ; + + . + +_:b2 a ; "aa" ; @@ -23,27 +33,45 @@ _:b0 a ; "gg" . - + a ; - _:b0 ; + _:b1 ; - . + ; + + . + + + + "merged rows" ; + + "dd" ; + + "ee" . + + + a ; + + _:b2 ; + + . + +_:b0 a ; + + "cc" ; + + "http://onto.fel.cvut.cz/data/cc" ; + + "cc" ; + + . [ a ; [ a ; "Sheet1" ; - - [ a ; - - ; - - "1"^^ ; - - - ] ; [ a ; @@ -62,16 +90,25 @@ _:b0 a ; ] ; + + [ a ; + + ; + + "1"^^ ; + + + ] ; [ a ; "http://test-file#row-{_row}"^^ ; - _:b1 , _:b0 , _:b2 ; + _:b2 , _:b0 , _:b1 ; - ( _:b0 - _:b2 + ( _:b2 _:b1 + _:b0 ) ] ; @@ -79,59 +116,22 @@ _:b0 a ; ] ] . - - - "merged rows" ; - - "dd" ; - - "ee" . - - - a ; - - _:b1 ; - - ; - - . - "merged columns" . - + a ; _:b2 ; - ; + ; - . + . - + a ; - _:b0 ; + _:b2 ; - . - -_:b2 a ; - - "bb" ; - - "http://onto.fel.cvut.cz/data/bb" ; - - "bb" ; - - . - -_:b1 a ; - - "cc" ; - - "http://onto.fel.cvut.cz/data/cc" ; - - "cc" ; - - . \ No newline at end of file + .