diff --git a/app/Library/Xml/DatasetExtension.php b/app/Library/Xml/DatasetExtension.php
index d52e12b..0747b36 100644
--- a/app/Library/Xml/DatasetExtension.php
+++ b/app/Library/Xml/DatasetExtension.php
@@ -5,6 +5,7 @@ use App\Models\Title;
use App\Models\License;
use App\Models\Person;
use App\Models\File;
+use App\Models\GeolocationBox;
/**
* DatasetExtension short summary.
@@ -19,7 +20,7 @@ trait DatasetExtension
protected $externalFields = array(
'TitleMain' => array(
'model' => Title::class,
- 'options' => array('type' => 'main'),
+ 'options' => array('type' => ['main', 'alternative', 'subtitle', 'other']),
'fetch' => 'eager'
),
'TitleAbstract' => array(
@@ -56,6 +57,11 @@ trait DatasetExtension
'relation' => 'files',
'fetch' => 'eager'
),
+ 'GeolocationBox' => array(
+ 'model' => GeolocationBox::class,
+ 'relation' => 'geolocation',
+ 'fetch' => 'eager'
+ ),
);
protected $internalFields = array();
@@ -229,7 +235,15 @@ trait DatasetExtension
if (isset($this->externalFields[$fieldname]['options'])) {
$options = $this->externalFields[$fieldname]['options'];
foreach ($options as $column => $value) {
- $select = $select->where($column, $value);
+ // $searchString = ',';
+ // if (strpos($value, $searchString) !== false) {
+ // $arr = explode(",", $value);
+ if (is_array($value)) {
+ $arr = $value;
+ $select->whereIn($column, $arr);
+ } else {
+ $select = $select->where($column, $value);
+ }
}
}
diff --git a/app/Models/Dataset.php b/app/Models/Dataset.php
index ac57892..a9e5818 100644
--- a/app/Models/Dataset.php
+++ b/app/Models/Dataset.php
@@ -12,6 +12,7 @@ use App\Models\XmlCache;
use App\Models\File;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
+use App\Models\GeolocationBox;
class Dataset extends Model
{
@@ -51,6 +52,14 @@ class Dataset extends Model
// $this->_init();
}
+ /**
+ * Get the user that owns the phone.
+ */
+ public function geolocation()
+ {
+ return $this->belongsTo(GeolocationBox::class, 'dataset_id', 'id');
+ }
+
/**
* Get the project that the dataset belongs to.
*/
diff --git a/app/Models/GeolocationBox.php b/app/Models/GeolocationBox.php
new file mode 100644
index 0000000..43973e0
--- /dev/null
+++ b/app/Models/GeolocationBox.php
@@ -0,0 +1,25 @@
+ 'float',
+ 'xmax' => 'float',
+ 'ymin' => 'float',
+ 'ymax' => 'float'
+ ];
+
+ public function dataset()
+ {
+ return $this->belongsTo(Dataset::class, 'dataset_id', 'id');
+ }
+}
diff --git a/composer.lock b/composer.lock
index 76f72d4..efb65dd 100755
--- a/composer.lock
+++ b/composer.lock
@@ -279,16 +279,16 @@
},
{
"name": "egulias/email-validator",
- "version": "2.1.6",
+ "version": "2.1.7",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
- "reference": "0578b32b30b22de3e8664f797cf846fc9246f786"
+ "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0578b32b30b22de3e8664f797cf846fc9246f786",
- "reference": "0578b32b30b22de3e8664f797cf846fc9246f786",
+ "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/709f21f92707308cdf8f9bcfa1af4cb26586521e",
+ "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e",
"shasum": ""
},
"require": {
@@ -332,7 +332,7 @@
"validation",
"validator"
],
- "time": "2018-09-25T20:47:26+00:00"
+ "time": "2018-12-04T22:38:24+00:00"
},
{
"name": "erusev/parsedown",
@@ -1747,7 +1747,7 @@
},
{
"name": "symfony/console",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
@@ -1816,16 +1816,16 @@
},
{
"name": "symfony/contracts",
- "version": "v1.0.1",
+ "version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/contracts.git",
- "reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f"
+ "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/contracts/zipball/3edf0ab943d1985a356721952cba36ff31bd6e5f",
- "reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f",
+ "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
+ "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"shasum": ""
},
"require": {
@@ -1880,11 +1880,11 @@
"interoperability",
"standards"
],
- "time": "2018-11-24T09:35:08+00:00"
+ "time": "2018-12-05T08:06:11+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v4.2.0",
+ "version": "v4.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@@ -1937,16 +1937,16 @@
},
{
"name": "symfony/debug",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "2016b3eec2e49c127dd02d0ef44a35c53181560d"
+ "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/2016b3eec2e49c127dd02d0ef44a35c53181560d",
- "reference": "2016b3eec2e49c127dd02d0ef44a35c53181560d",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/a2233f555ddf55e5600f386fba7781cea1cb82d3",
+ "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3",
"shasum": ""
},
"require": {
@@ -1989,20 +1989,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2018-11-11T19:48:54+00:00"
+ "time": "2018-11-27T12:43:10+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a"
+ "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d365fc4416ec4980825873962ea5d1b1bca46f1a",
- "reference": "d365fc4416ec4980825873962ea5d1b1bca46f1a",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc35e84adbb15c26ae6868e1efbf705a917be6b5",
+ "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5",
"shasum": ""
},
"require": {
@@ -2052,11 +2052,11 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2018-11-26T10:17:44+00:00"
+ "time": "2018-11-30T18:07:24+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
@@ -2105,7 +2105,7 @@
},
{
"name": "symfony/http-foundation",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
@@ -2159,16 +2159,16 @@
},
{
"name": "symfony/http-kernel",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "78528325d90e5ad54a6e9eca750fe176932bc4fa"
+ "reference": "31f20eb6e00467ae85501dd98770aef17cd9aba7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/78528325d90e5ad54a6e9eca750fe176932bc4fa",
- "reference": "78528325d90e5ad54a6e9eca750fe176932bc4fa",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/31f20eb6e00467ae85501dd98770aef17cd9aba7",
+ "reference": "31f20eb6e00467ae85501dd98770aef17cd9aba7",
"shasum": ""
},
"require": {
@@ -2244,7 +2244,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2018-11-26T14:04:48+00:00"
+ "time": "2018-12-06T14:59:33+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -2424,7 +2424,7 @@
},
{
"name": "symfony/process",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
@@ -2473,16 +2473,16 @@
},
{
"name": "symfony/routing",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "86eb1a581279b5e40ca280a4f63a15e37d51d16c"
+ "reference": "94a3dd89bda078bef0c3bf79eb024fe136dd58f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/86eb1a581279b5e40ca280a4f63a15e37d51d16c",
- "reference": "86eb1a581279b5e40ca280a4f63a15e37d51d16c",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/94a3dd89bda078bef0c3bf79eb024fe136dd58f9",
+ "reference": "94a3dd89bda078bef0c3bf79eb024fe136dd58f9",
"shasum": ""
},
"require": {
@@ -2546,25 +2546,25 @@
"uri",
"url"
],
- "time": "2018-11-26T08:40:22+00:00"
+ "time": "2018-12-03T13:20:34+00:00"
},
{
"name": "symfony/translation",
- "version": "v4.2.0",
+ "version": "v4.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9"
+ "reference": "c0e2191e9bed845946ab3d99767513b56ca7dcd6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/ff9a878c9b8f8bcd4d9138e2d32f508c942773d9",
- "reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/c0e2191e9bed845946ab3d99767513b56ca7dcd6",
+ "reference": "c0e2191e9bed845946ab3d99767513b56ca7dcd6",
"shasum": ""
},
"require": {
"php": "^7.1.3",
- "symfony/contracts": "^1.0",
+ "symfony/contracts": "^1.0.2",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
@@ -2619,11 +2619,11 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2018-11-27T07:20:32+00:00"
+ "time": "2018-12-06T10:45:32+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.4.19",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
diff --git a/public/datasetxml2oai-pmh.xslt b/public/datasetxml2oai-pmh.xslt
index 9e9a3e2..631b28a 100644
--- a/public/datasetxml2oai-pmh.xslt
+++ b/public/datasetxml2oai-pmh.xslt
@@ -11,6 +11,9 @@
+
+
+
@@ -157,7 +160,6 @@
http://www.openarchives.org/OAI/2.0/oai_dc/
-
oai_datacite
@@ -169,7 +171,6 @@
http://datacite.org/schema/kernel-4
-
@@ -276,7 +277,6 @@
-
@@ -290,7 +290,6 @@
-
@@ -301,59 +300,6 @@
-
-
-
-
-
- oai:
-
- :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
- (
-
- )
-
-
-
-
-
-
-
-
-
- GBA
-
-
-
@@ -361,7 +307,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -381,7 +337,6 @@
-
@@ -400,7 +355,7 @@
-
+
@@ -453,6 +408,7 @@
+
@@ -488,6 +444,4 @@
-
-
-
+
\ No newline at end of file
diff --git a/public/prefixes/oai_datacite.xslt b/public/prefixes/oai_datacite.xslt
new file mode 100644
index 0000000..2607f18
--- /dev/null
+++ b/public/prefixes/oai_datacite.xslt
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ oai:
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dataset
+
+
+
+
+
+
+
+
+ datasets
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+
+
+
+ (
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GBA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/web.config b/public/web.config
index 4c7b047..5564467 100644
--- a/public/web.config
+++ b/public/web.config
@@ -18,7 +18,7 @@
-
+