diff --git a/app/Library/Xml/DatasetExtension.php b/app/Library/Xml/DatasetExtension.php index 40ab858..3f13033 100644 --- a/app/Library/Xml/DatasetExtension.php +++ b/app/Library/Xml/DatasetExtension.php @@ -6,9 +6,9 @@ use App\Models\Description; use App\Models\License; use App\Models\Person; use App\Models\File; -use App\Models\GeolocationBox; use App\Models\Coverage; use App\Models\Subject; +use App\Models\DatasetReference; /** * DatasetExtension short summary. @@ -65,6 +65,11 @@ trait DatasetExtension 'relation' => 'persons', 'fetch' => 'eager' ), + 'Reference' => array( + 'model' => DatasetReference::class, + 'relation' => 'references', + 'fetch' => 'eager' + ), 'Subject' => array( 'model' => Subject::class, 'relation' => 'subjects', diff --git a/app/Models/Dataset.php b/app/Models/Dataset.php index 7ed8f5c..3d741c5 100644 --- a/app/Models/Dataset.php +++ b/app/Models/Dataset.php @@ -306,7 +306,8 @@ class Dataset extends Model $embargoDate->minute = 59; $embargoDate->second = 59; - return ($embargoDate->gt($now) == true); + return ($embargoDate->lessThan($now)); + //return ($embargoDate->gt($now) == true); } public function getRemainingTimeAttribute() diff --git a/public/datasetxml2oai-pmh.xslt b/public/datasetxml2oai-pmh.xslt index 4e4fe75..f16dfbc 100644 --- a/public/datasetxml2oai-pmh.xslt +++ b/public/datasetxml2oai-pmh.xslt @@ -354,6 +354,8 @@ + + @@ -401,6 +403,7 @@ + @@ -435,6 +438,14 @@ + + + + + + + + diff --git a/public/prefixes/oai_datacite.xslt b/public/prefixes/oai_datacite.xslt index 769f7a1..58902bc 100644 --- a/public/prefixes/oai_datacite.xslt +++ b/public/prefixes/oai_datacite.xslt @@ -77,6 +77,11 @@ Dataset + + + + + @@ -195,6 +200,18 @@ + + + + + + + + + + + +