- DatasetExtension.php save also Reference for datacite and dublin_core transformations
- oai:datacite.xslt für relatedIdentifiers - oai: dc: datasetxml2oai-pmh.xslt für dc:relation - dataset.php correct hasEmbargoPassed() method
This commit is contained in:
parent
fd98c6c09d
commit
c0022e3c1c
|
@ -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',
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -354,6 +354,8 @@
|
|||
<xsl:apply-templates select="@Language" mode="oai_dc" />
|
||||
<!-- dc:rights -->
|
||||
<xsl:apply-templates select="Licence" mode="oai_dc" />
|
||||
<!-- dc:relation -->
|
||||
<xsl:apply-templates select="Reference" mode="oai_dc" />
|
||||
<!-- dc:coverage -->
|
||||
<xsl:apply-templates select="Coverage" mode="oai_dc" />
|
||||
</oai_dc:dc>
|
||||
|
@ -401,6 +403,7 @@
|
|||
<xsl:value-of select="@Value"/>
|
||||
</dc:title>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="TitleAdditional" mode="oai_dc">
|
||||
<dc:title>
|
||||
<xsl:value-of select="@Value"/>
|
||||
|
@ -435,6 +438,14 @@
|
|||
</dc:subject>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Reference" mode="oai_dc">
|
||||
<dc:relation>
|
||||
<xsl:value-of select="@Value" />
|
||||
</dc:relation>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template match="PersonAuthor|PersonEditor" mode="oai_dc">
|
||||
<dc:creator>
|
||||
<xsl:value-of select="@LastName" />
|
||||
|
|
|
@ -77,6 +77,11 @@
|
|||
<xsl:text>Dataset</xsl:text>
|
||||
<!-- <xsl:value-of select="@Type" /> -->
|
||||
</resourceType>
|
||||
<xsl:if test="Reference">
|
||||
<relatedIdentifiers>
|
||||
<xsl:apply-templates select="Reference" mode="oai_datacite" />
|
||||
</relatedIdentifiers>
|
||||
</xsl:if>
|
||||
<rightsList>
|
||||
<xsl:apply-templates select="Licence" mode="oai_datacite" />
|
||||
</rightsList>
|
||||
|
@ -195,6 +200,18 @@
|
|||
</subject>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Reference" mode="oai_datacite">
|
||||
<relatedIdentifier>
|
||||
<xsl:attribute name="relatedIdentifierType">
|
||||
<xsl:value-of select="@Type" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="relationType">
|
||||
<xsl:value-of select="@Relation" />
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@Value" />
|
||||
</relatedIdentifier>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="PersonContributor" mode="oai_datacite">
|
||||
<contributor>
|
||||
<contributorName>
|
||||
|
|
Loading…
Reference in New Issue
Block a user