Skip to content

Commit

Permalink
[Fix] Change cells URIs from example.org to sourceResourceUri
Browse files Browse the repository at this point in the history
  • Loading branch information
rodionnv committed Oct 3, 2023
1 parent a975370 commit 46e68e9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
<http://example.org/cell5>
<http://test-file#cell3>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
_:b0 ;
<http://www.w3.org/ns/csvw#Row>
<http://test-file#row-4> ;
<http://test-file#row-2> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://example.org/cell4> .
<http://test-file#cell1> .

_:b0 a <http://www.w3.org/ns/csvw#Column> ;
_:b1 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#name>
"bb" ;
<http://www.w3.org/ns/csvw#propertyUrl>
"http://onto.fel.cvut.cz/data/bb" ;
<http://www.w3.org/ns/csvw#title>
"bb" ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/property>
<http://onto.fel.cvut.cz/data/bb> .

_:b2 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#name>
"aa" ;
<http://www.w3.org/ns/csvw#propertyUrl>
Expand All @@ -23,27 +33,45 @@ _:b0 a <http://www.w3.org/ns/csvw#Column> ;
<http://onto.fel.cvut.cz/data/cc>
"gg" .

<http://example.org/cell4>
<http://test-file#cell2>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
_:b0 ;
_:b1 ;
<http://www.w3.org/ns/csvw#Row>
<http://test-file#row-3> .
<http://test-file#row-2> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://test-file#cell1> .

<http://test-file#row-3>
<http://onto.fel.cvut.cz/data/aa>
"merged rows" ;
<http://onto.fel.cvut.cz/data/bb>
"dd" ;
<http://onto.fel.cvut.cz/data/cc>
"ee" .

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

_:b0 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#name>
"cc" ;
<http://www.w3.org/ns/csvw#propertyUrl>
"http://onto.fel.cvut.cz/data/cc" ;
<http://www.w3.org/ns/csvw#title>
"cc" ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/property>
<http://onto.fel.cvut.cz/data/cc> .

[ a <http://www.w3.org/ns/csvw#TableGroup> ;
<http://www.w3.org/ns/csvw#table>
[ a <http://www.w3.org/ns/csvw#Table> ;
<http://www.w3.org/2000/01/rdf-schema#label>
"Sheet1" ;
<http://www.w3.org/ns/csvw#row>
[ a <http://www.w3.org/ns/csvw#Row> ;
<http://www.w3.org/ns/csvw#describes>
<http://test-file#row-2> ;
<http://www.w3.org/ns/csvw#rownum>
"1"^^<http://www.w3.org/2001/XMLSchema#int> ;
<http://www.w3.org/ns/csvw#url>
<http://test-file#row=2>
] ;
<http://www.w3.org/ns/csvw#row>
[ a <http://www.w3.org/ns/csvw#Row> ;
<http://www.w3.org/ns/csvw#describes>
Expand All @@ -62,76 +90,48 @@ _:b0 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#url>
<http://test-file#row=3>
] ;
<http://www.w3.org/ns/csvw#row>
[ a <http://www.w3.org/ns/csvw#Row> ;
<http://www.w3.org/ns/csvw#describes>
<http://test-file#row-2> ;
<http://www.w3.org/ns/csvw#rownum>
"1"^^<http://www.w3.org/2001/XMLSchema#int> ;
<http://www.w3.org/ns/csvw#url>
<http://test-file#row=2>
] ;
<http://www.w3.org/ns/csvw#tableSchema>
[ a <http://www.w3.org/ns/csvw#TableSchema> ;
<http://www.w3.org/ns/csvw#aboutUrl>
"http://test-file#row-{_row}"^^<http://www.w3.org/ns/csvw#uriTemplate> ;
<http://www.w3.org/ns/csvw#column>
_:b1 , _:b0 , _:b2 ;
_:b2 , _:b0 , _:b1 ;
<http://www.w3.org/ns/csvw#columns>
( _:b0
_:b2
( _:b2
_:b1
_:b0
)
] ;
<http://www.w3.org/ns/csvw#url>
<http://test-file>
]
] .

<http://test-file#row-3>
<http://onto.fel.cvut.cz/data/aa>
"merged rows" ;
<http://onto.fel.cvut.cz/data/bb>
"dd" ;
<http://onto.fel.cvut.cz/data/cc>
"ee" .

<http://example.org/cell3>
a <http://www.w3.org/ns/csvw#Cell> ;
<http://www.w3.org/ns/csvw#Column>
_:b1 ;
<http://www.w3.org/ns/csvw#Row>
<http://test-file#row-2> ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/same-value-as>
<http://example.org/cell1> .

<http://test-file#row-2>
<http://onto.fel.cvut.cz/data/aa>
"merged columns" .

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

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

_:b2 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#name>
"bb" ;
<http://www.w3.org/ns/csvw#propertyUrl>
"http://onto.fel.cvut.cz/data/bb" ;
<http://www.w3.org/ns/csvw#title>
"bb" ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/property>
<http://onto.fel.cvut.cz/data/bb> .

_:b1 a <http://www.w3.org/ns/csvw#Column> ;
<http://www.w3.org/ns/csvw#name>
"cc" ;
<http://www.w3.org/ns/csvw#propertyUrl>
"http://onto.fel.cvut.cz/data/cc" ;
<http://www.w3.org/ns/csvw#title>
"cc" ;
<https://onto.fel.cvut.cz/ontologies/extension/csvw/property>
<http://onto.fel.cvut.cz/data/cc> .
<http://test-file#row-3> .

0 comments on commit 46e68e9

Please sign in to comment.