-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/composer/solarium/solarium-tw-6.2
- Loading branch information
Showing
134 changed files
with
11,101 additions
and
1,154 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
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,16 @@ | ||
name: "CodeQL Configuration" | ||
|
||
queries: | ||
- uses: security-and-quality | ||
|
||
query-filters: | ||
- exclude: | ||
problem.severity: | ||
- note | ||
|
||
paths-ignore: | ||
- Resources/Public/JavaScript/OpenLayers | ||
- Resources/Public/JavaScript/Toastify | ||
- Resources/Public/JavaScript/jPlayer | ||
- Resources/Public/JavaScript/jQuery | ||
- Resources/Public/JavaScript/jQueryUI |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Run the tests | ||
name: Unit and Functional Testing | ||
|
||
on: | ||
push: | ||
|
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,19 +1,18 @@ | ||
.buildpath | ||
.cache | ||
.idea/ | ||
.loadpath | ||
.metadata | ||
.project | ||
.settings/ | ||
.vscode | ||
.phpdoc | ||
Build/Documentation/_build | ||
Build/Documentation/venv | ||
Build/Documentation/dbdocs/var | ||
Build/Test/.env | ||
composer.lock | ||
Documentation-GENERATED-temp/ | ||
nbproject/ | ||
public/ | ||
var/ | ||
vendor/ | ||
/.buildpath | ||
/.cache | ||
/.idea/ | ||
/.loadpath | ||
/.metadata | ||
/.project | ||
/.settings/ | ||
/.vscode | ||
/.phpdoc | ||
/Build/Documentation/_build | ||
/Build/Documentation/venv | ||
/Build/Documentation/dbdocs/var | ||
/Build/Test/.env | ||
/Documentation-GENERATED-temp/ | ||
/nbproject/ | ||
/public/ | ||
/var/ | ||
/vendor/ |
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-159 KB
Build/Test/solr/contrib/ocrsearch/lib/solr-ocrhighlighting-0.7.1.jar
Binary file not shown.
Binary file added
BIN
+2.29 MB
Build/Test/solr/contrib/ocrsearch/lib/solr-ocrhighlighting-0.8.3-solr78.jar
Binary file not shown.
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,127 @@ | ||
<?php | ||
|
||
/** | ||
* (c) Kitodo. Key to digital objects e.V. <[email protected]> | ||
* | ||
* This file is part of the Kitodo and TYPO3 projects. | ||
* | ||
* @license GNU General Public License version 3 or later. | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Kitodo\Dlf\Api\Orcid; | ||
|
||
use Psr\Http\Message\RequestFactoryInterface; | ||
use TYPO3\CMS\Core\Http\RequestFactory; | ||
use TYPO3\CMS\Core\Log\LogManager; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
/** | ||
* ORCID API Client class | ||
* | ||
* @author Beatrycze Volk <[email protected]> | ||
* @package TYPO3 | ||
* @subpackage dlf | ||
* @access public | ||
**/ | ||
class Client | ||
{ | ||
/** | ||
* constants for API endpoint | ||
**/ | ||
const HOSTNAME = 'orcid.org'; | ||
const VERSION = '3.0'; | ||
|
||
/** | ||
* This holds the logger | ||
* | ||
* @var LogManager | ||
* @access protected | ||
*/ | ||
protected $logger; | ||
|
||
/** | ||
* The ORCID API endpoint | ||
* | ||
* @var string | ||
**/ | ||
private $endpoint = 'record'; | ||
|
||
/** | ||
* The ORCID API access level | ||
* | ||
* @var string | ||
**/ | ||
private $level = 'pub'; | ||
|
||
/** | ||
* The ORCID ID to search for | ||
* | ||
* @var string | ||
**/ | ||
private $orcid = null; | ||
|
||
/** | ||
* The request object | ||
* | ||
* @var RequestFactoryInterface | ||
**/ | ||
private $requestFactory = null; | ||
|
||
/** | ||
* Constructs a new instance | ||
* | ||
* @param string $orcid: the ORCID to search for | ||
* @param RequestFactory $requestFactory a request object to inject | ||
* @return void | ||
**/ | ||
public function __construct($orcid, RequestFactory $requestFactory) | ||
{ | ||
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); | ||
$this->orcid = $orcid; | ||
$this->requestFactory = $requestFactory; | ||
} | ||
|
||
/** | ||
* Sets API endpoint | ||
* | ||
* @param string $endpoint the shortname of the endpoint | ||
* | ||
* @return void | ||
*/ | ||
public function setEndpoint($endpoint) { | ||
$this->endpoint = $endpoint; | ||
} | ||
|
||
/** | ||
* Get the profile data | ||
* | ||
* @return object|bool | ||
**/ | ||
public function getData() | ||
{ | ||
$url = $this->getApiEndpoint(); | ||
try { | ||
$response = $this->requestFactory->request($url); | ||
} catch (\Exception $e) { | ||
$this->logger->warning('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.'); | ||
return false; | ||
} | ||
return $response->getBody()->getContents(); | ||
} | ||
|
||
/** | ||
* Creates the qualified API endpoint for retrieving the desired data | ||
* | ||
* @return string | ||
**/ | ||
private function getApiEndpoint() | ||
{ | ||
$url = 'https://' . $this->level . '.' . self::HOSTNAME; | ||
$url .= '/v' . self::VERSION . '/'; | ||
$url .= $this->orcid; | ||
$url .= '/' . $this->endpoint; | ||
return $url; | ||
} | ||
} |
Oops, something went wrong.