jorarmarfin / laravel-dspace
Comunicación con Dspace
Requires
- php: >=5.6.4
Requires (Dev)
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2025-03-22 07:42:20 UTC
README
Installation
The LaravelYoutube service provider can be installed via composer by requiring the jorarmarfin/laravel_youtube
package in your project's composer.json.
Laravel 5.5+ will use the auto-discovery function.
{ "require": { "jorarmarfin/laravel-dspace": "0.0.1" } }
If you don't use auto-discovery you will need to include the service provider / facade in config/app.php
.
'providers' => [ //... JorarMarfin\LaravelDspace\LaravelDspaceServiceProvider::class, ]
Vendor publish
By default, LaravelDspace will connect to https://mydspace.com, you can change this and the other settings in the configuration file. You can add the elasticquent.php config file at /app/config/dspace.php, this package has a table (resource) where to harvest the information from the dspace that is why you must run the migration before using the method
php artisan vendor:publish --provider="JorarMarfin\LaravelDspace\LaravelDspaceServiceProvider"
<?php return[ /* |-------------------------------------------------------------------------- | url enlace del repositorio |-------------------------------------------------------------------------- | | Enlace de conexion al repositorio Dspace que desea cosechar | */ 'url' => env('DSPACE_URL', 'https://infohub.practicalaction.org/'), ];
php artisan migrate
How to use it
To gather information from dspace we must know the nomenclature of oai-pmh
Parameters
- verb [ListRecords,ListMetadataFormats]
- metadataPrefix [oai_dc,qdc,didl,mods,ore,mets,oai_dc,rdf,marc,xoai,dim,etdms]
- resumptionToken [oai_dc,qdc,didl,mods,ore,mets,oai_dc,rdf,marc,xoai,dim,etdms]
Methods
- getData : return data format json
- Harvest : retriv data to table resource, no acepta el parametro verb, por defecto cosecha del metadataPrefix etdms, but you can send this value to harvest from another metadataPrefix, also accepts the from and until parameters to harvest by dates
Example Command
dspace:harvest --set=com_11283_320273 --form=2020-02-02 --until=2020-02-02
Examples
use LaravelDspace; public function index() { $data = LaravelDspace::getData(['verb'=>'ListRecords','set'=>'com_11283_320273','metadataPrefix'=>'etdms']) $data1 = LaravelDspace::Harvest(['set'=>'com_11283_320273']); return $data; }