-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2023, Silvio Peroni <[email protected]>, Ivan Heibi <[email protected]> | ||
# Copyright (c) 2023, Silvio Peroni <[email protected]> | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for any purpose | ||
# with or without fee is hereby granted, provided that the above copyright notice | ||
|
@@ -134,6 +134,7 @@ def __call_tp_for_citations(omid_l): | |
} GROUP BY ?cited | ||
""" | ||
try: | ||
headers={"Accept": "application/sparql-results+json", "Content-Type": "application/sparql-query"} | ||
response = post(sparql_endpoint, headers=headers, data=sparql_query, timeout=45) | ||
if response.status_code == 200: | ||
r = loads(response.text) | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
#version Version 1.1.1 (2022-12-22) | ||
#contacts [[email protected]](mailto:[email protected]) | ||
#license This document is licensed with a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/legalcode), while the REST API itself has been created using [RAMOSE](https://github.com/opencitations/ramose), the *Restful API Manager Over SPARQL Endpoints* created by [Silvio Peroni](https://orcid.org/0000-0003-0530-4305), which is licensed with an [ISC license](https://opensource.org/licenses/ISC). | ||
#endpoint http://127.0.0.1/meta/sparql | ||
#endpoint http://127.0.0.1:8990/sparql | ||
#method post | ||
#addon metaapi | ||
|
||
|
@@ -214,9 +214,9 @@ WHERE { | |
?res frbr:partOf+ ?resVolume. | ||
?resVolume a fabio:JournalVolume; | ||
fabio:hasSequenceIdentifier ?volume. | ||
} | ||
} | ||
} GROUP BY ?res ?title ?author_ ?editor_ ?publisher_ ?type ?issue ?volume ?pub_date ?page ?venueName ?venueMetaid ORDER BY DESC(?totAuthor) DESC(?totEditor) DESC(?totPublisher) | ||
} | ||
} | ||
BIND(CONCAT(?ids, IF(STR(?ids) != "", " ", ""), "omid:br/", STRAFTER(STR(?res), "/br/")) AS ?id) | ||
BIND(IF(STR(?venue_ids) != "", CONCAT(" [", ?venue_ids, " ", ?venueMetaid, "]"), "") AS ?venueIdentifiers) | ||
BIND(CONCAT(?venueName, ?venueIdentifiers) AS ?venue) | ||
|
@@ -458,9 +458,9 @@ WHERE { | |
?res frbr:partOf+ ?resVolume. | ||
?resVolume a fabio:JournalVolume; | ||
fabio:hasSequenceIdentifier ?volume. | ||
} | ||
} | ||
} GROUP BY ?res ?title ?author_ ?editor_ ?publisher_ ?type ?issue ?volume ?pub_date ?page ?venueName ?venueMetaid ORDER BY DESC(?totAuthor) DESC(?totEditor) DESC(?totPublisher) | ||
} | ||
} | ||
BIND(CONCAT(?ids, IF(STR(?ids) != "", " ", ""), "omid:br/", STRAFTER(STR(?res), "/br/")) AS ?id) | ||
BIND(IF(STR(?venue_ids) != "", CONCAT(" [", ?venue_ids, " ", ?venueMetaid, "]"), "") AS ?venueIdentifiers) | ||
BIND(CONCAT(?venueName, ?venueIdentifiers) AS ?venue) | ||
|
@@ -676,10 +676,10 @@ WHERE { | |
?res frbr:partOf+ ?resVolume. | ||
?resVolume a fabio:JournalVolume; | ||
fabio:hasSequenceIdentifier ?volume. | ||
} | ||
} | ||
} GROUP BY ?res ?title ?author_ ?editor_ ?publisher_ ?type ?issue ?volume ?pub_date ?page ?venueName ?venueMetaid ORDER BY DESC(?totAuthor) DESC(?totEditor) DESC(?totPublisher) | ||
} | ||
} | ||
BIND(CONCAT(?ids, IF(STR(?ids) != "", " ", ""), "omid:br/", STRAFTER(STR(?res), "/br/")) AS ?id) | ||
BIND(IF(STR(?venue_ids) != "", CONCAT(" [", ?venue_ids, " ", ?venueMetaid, "]"), "") AS ?venueIdentifiers) | ||
BIND(CONCAT(?venueName, ?venueIdentifiers) AS ?venue) | ||
} GROUP BY ?id ?title ?type ?issue ?volume ?venue ?pub_date ?page | ||
} GROUP BY ?id ?title ?type ?issue ?volume ?venue ?pub_date ?page |