-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature #71] Add entities for Table
- Loading branch information
1 parent
37a31af
commit 9f67862
Showing
5 changed files
with
126 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/model/Row.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package cz.cvut.spipes.modules.model; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.OWLAnnotationProperty; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLClass; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLDataProperty; | ||
import cz.cvut.spipes.constants.CSVW; | ||
|
||
@OWLClass(iri = CSVW.RowUri) | ||
public class Row extends AbstractEntity { | ||
|
||
@OWLAnnotationProperty(iri = CSVW.URL) | ||
private String url; | ||
|
||
@OWLDataProperty(iri = CSVW.rowNumUri) | ||
private Integer rownum; | ||
|
||
@OWLAnnotationProperty(iri = CSVW.describesUri) | ||
private String describes; | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public Integer getRownum() { | ||
return rownum; | ||
} | ||
|
||
public void setRownum(Integer rownum) { | ||
this.rownum = rownum; | ||
} | ||
|
||
public String getDescribes() { | ||
return describes; | ||
} | ||
|
||
public void setDescribes(String describes) { | ||
this.describes = describes; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/model/Table.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package cz.cvut.spipes.modules.model; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.*; | ||
import cz.cvut.spipes.constants.CSVW; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
|
||
@OWLClass(iri = CSVW.TableUri) | ||
public class Table extends AbstractEntity{ | ||
|
||
@OWLObjectProperty(iri = CSVW.tableSchemaUri, fetch = FetchType.EAGER, cascade = CascadeType.ALL) | ||
private TableSchema tableSchema; | ||
|
||
@OWLAnnotationProperty(iri = CSVW.URL) | ||
private String url; | ||
|
||
@OWLObjectProperty(iri = CSVW.rowUri, fetch = FetchType.EAGER, cascade = CascadeType.ALL) | ||
private Set<Row> rows = new HashSet<>(); | ||
|
||
public TableSchema getTableSchema() { | ||
return tableSchema; | ||
} | ||
|
||
public void setTableSchema(TableSchema tableSchema) { | ||
this.tableSchema = tableSchema; | ||
} | ||
|
||
public Set<Row> getRows() { | ||
return rows; | ||
} | ||
|
||
public void setRows(Set<Row> rows) { | ||
this.rows = rows; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/model/TableGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cz.cvut.spipes.modules.model; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.CascadeType; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLClass; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLObjectProperty; | ||
import cz.cvut.spipes.constants.CSVW; | ||
|
||
@OWLClass(iri = CSVW.tableGroupUri) | ||
public class TableGroup extends AbstractEntity{ | ||
|
||
@OWLObjectProperty(iri = CSVW.tableUri, cascade = CascadeType.ALL) | ||
private Table table; | ||
|
||
public Table getTable() { | ||
return table; | ||
} | ||
|
||
public void setTable(Table table) { | ||
this.table = table; | ||
} | ||
} |