Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Add view citation_classified_rdf. Part of issue #12.
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradHoeffner committed Mar 5, 2021
1 parent a373f1c commit c168b40
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,24 @@ SELECT citation_has_classified.citation_suffix,

'http://hitontology.eu/ontology/' ||
LOWER(SUBSTRING(CAST(citation.type AS varchar) FOR 1)) ||
SUBSTRING(CAST(citation.type AS varchar)FROM 2) AS property

FROM citation INNER JOIN citation_has_classified
ON citation.suffix = citation_has_classified.citation_suffix;
SUBSTRING(CAST(citation.type AS varchar) FROM 2) AS property
FROM citation INNER JOIN citation_has_classified
ON citation.suffix = citation_has_classified.citation_suffix;

CREATE VIEW swp_citation_rdf AS
SELECT 'http://hitontology.eu/ontology/' || swp_suffix AS subject,
'http://hitontology.eu/ontology/' ||
LOWER(SUBSTRING(CAST(citation.type AS varchar) FOR 1)) ||
SUBSTRING(CAST(citation.type AS varchar) FROM 2) AS property,
SUBSTRING(CAST(citation.type AS varchar) FROM 2) AS predicate,
uri AS object
FROM citation;

FROM citation;
CREATE VIEW citation_classified_rdf AS
SELECT citation.uri AS subject,
'http://hitontology.eu/ontology/' ||
LOWER(SUBSTRING(CAST(citation.type AS varchar) FOR 1)) ||
SUBSTRING(CAST(citation.type AS varchar) FROM 2) AS predicate,
'http://hitontology.eu/ontology/' || citation_has_classified.classified_suffix AS object
FROM citation INNER JOIN citation_has_classified
ON citation.suffix = citation_has_classified.citation_suffix;

0 comments on commit c168b40

Please sign in to comment.