Revision 43514
Added by Claudio Atzori over 7 years ago
odf2insertActions.xml | ||
---|---|---|
52 | 52 |
</xsl:when> |
53 | 53 |
<xsl:otherwise> |
54 | 54 |
|
55 |
<xsl:variable name="resultId"
|
|
56 |
select="dnet:oafSimpleId('result', //dri:objIdentifier)"/>
|
|
55 |
<xsl:variable name="datasetId"
|
|
56 |
select="dnet:oafSimpleId('dataset', //dri:objIdentifier)"/>
|
|
57 | 57 |
|
58 |
<xsl:if test="string-length($resultId) > 0">
|
|
58 |
<xsl:if test="string-length($datasetId) > 0">
|
|
59 | 59 |
<xsl:variable name="originalids" |
60 | 60 |
select="//*[local-name() = 'resource']/*[local-name()='identifier'] | //*[local-name() = 'resource']//*[local-name()='alternateIdentifier']"/> |
61 | 61 |
<xsl:variable name="creators" select="//*[local-name() = 'creator']"/> |
... | ... | |
99 | 99 |
<xsl:variable name="pids" |
100 | 100 |
select="//*[local-name() = 'resource']//*[local-name()='identifier'or local-name()='alternateIdentifier']"/> |
101 | 101 |
|
102 |
<xsl:variable name="result"
|
|
103 |
select="dnet:odfResult($resultId, $about, $metadata, $titles, $subjects, $publisher, $descriptions,
|
|
102 |
<xsl:variable name="dataset"
|
|
103 |
select="dnet:odfDataset($datasetId, $about, $metadata, $titles, $subjects, $publisher, $descriptions,
|
|
104 | 104 |
$dates, $dateaccepted, $resourceType, $formats, $sizes, $language, $cobjcategory, $contributor, $rights, |
105 | 105 |
$version, $pids, $provenance, $trust, $hostedbyid, $hostedbyname, $collectedfromid, |
106 | 106 |
$collectedfromname, $originalids, $instanceURI, $dateOfCollection, $dateoftransformation)"/> |
107 | 107 |
|
108 | 108 |
<ROWS> |
109 |
<ROW key="{$resultId}" columnFamily="result">
|
|
109 |
<ROW key="{$datasetId}" columnFamily="dataset">
|
|
110 | 110 |
<QUALIFIER name="body" type="base64"> |
111 |
<xsl:value-of select="$result"/>
|
|
111 |
<xsl:value-of select="$dataset"/>
|
|
112 | 112 |
</QUALIFIER> |
113 | 113 |
</ROW> |
114 | 114 |
<xsl:for-each select="//*[local-name() = 'creator']"> |
... | ... | |
135 | 135 |
select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname, |
136 | 136 |
$originalPersonId, $dateOfCollection, $dateoftransformation, normalize-space(./*[local-name() = 'creatorName']), |
137 | 137 |
./*[local-name() = 'nameIdentifier'], ./*[local-name() = 'nameIdentifier']/@nameIdentifierScheme)"/> |
138 |
<xsl:variable name="personresult"
|
|
139 |
select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf', $provenance, $trust, $about)"/>
|
|
140 |
<xsl:variable name="resultperson"
|
|
141 |
select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor', $provenance, $trust, $about)"/>
|
|
138 |
<xsl:variable name="persondataset"
|
|
139 |
select="dnet:personDataset_Authorship($personId, $datasetId, $position, 'isAuthorOf', $provenance, $trust, $about)"/>
|
|
140 |
<xsl:variable name="datasetperson"
|
|
141 |
select="dnet:personDataset_Authorship($datasetId, $personId, $position, 'hasAuthor', $provenance, $trust, $about)"/>
|
|
142 | 142 |
|
143 | 143 |
<ROW key="{$personId}" columnFamily="person"> |
144 | 144 |
<QUALIFIER name="body" type="base64"> |
145 | 145 |
<xsl:value-of select="$person"/> |
146 | 146 |
</QUALIFIER> |
147 | 147 |
</ROW> |
148 |
<ROW key="{$personId}" columnFamily="personResult_authorship_isAuthorOf">
|
|
149 |
<QUALIFIER name="{$resultId}" type="base64">
|
|
150 |
<xsl:value-of select="$personresult"/>
|
|
148 |
<ROW key="{$personId}" columnFamily="personDataset_authorship_isAuthorOf">
|
|
149 |
<QUALIFIER name="{$datasetId}" type="base64">
|
|
150 |
<xsl:value-of select="$persondataset"/>
|
|
151 | 151 |
</QUALIFIER> |
152 | 152 |
</ROW> |
153 |
<ROW key="{$resultId}" columnFamily="personResult_authorship_hasAuthor">
|
|
153 |
<ROW key="{$datasetId}" columnFamily="personDataset_authorship_hasAuthor">
|
|
154 | 154 |
<QUALIFIER name="{$personId}" type="base64"> |
155 |
<xsl:value-of select="$resultperson"/>
|
|
155 |
<xsl:value-of select="$datasetperson"/>
|
|
156 | 156 |
</QUALIFIER> |
157 | 157 |
</ROW> |
158 | 158 |
</xsl:if> |
... | ... | |
163 | 163 |
<xsl:variable name="projectId" |
164 | 164 |
select="dnet:oafSplitId('project', normalize-space(.))"/> |
165 | 165 |
|
166 |
<xsl:variable name="resultproject"
|
|
167 |
select="dnet:rel($resultId, $projectId, 'resultProject', 'outcome', 'isProducedBy', $provenance, $trust, $about)"/>
|
|
168 |
<xsl:variable name="projectresult"
|
|
169 |
select="dnet:rel($projectId, $resultId, 'resultProject', 'outcome', 'produces', $provenance, $trust, $about)"/>
|
|
166 |
<xsl:variable name="datasetproject"
|
|
167 |
select="dnet:rel($datasetId, $projectId, 'datasetProject', 'outcome', 'isProducedBy', $provenance, $trust, $about)"/>
|
|
168 |
<xsl:variable name="projectdataset"
|
|
169 |
select="dnet:rel($projectId, $datasetId, 'datasetProject', 'outcome', 'produces', $provenance, $trust, $about)"/>
|
|
170 | 170 |
|
171 | 171 |
<xsl:if test="string-length($projectId) > 0"> |
172 |
<ROW key="{$resultId}" columnFamily="resultProject_outcome_isProducedBy">
|
|
172 |
<ROW key="{$datasetId}" columnFamily="datasetProject_outcome_isProducedBy">
|
|
173 | 173 |
<QUALIFIER name="{$projectId}" type="base64"> |
174 |
<xsl:value-of select="$resultproject"/>
|
|
174 |
<xsl:value-of select="$datasetproject"/>
|
|
175 | 175 |
</QUALIFIER> |
176 | 176 |
</ROW> |
177 |
<ROW key="{$projectId}" columnFamily="resultProject_outcome_produces">
|
|
178 |
<QUALIFIER name="{$resultId}" type="base64">
|
|
179 |
<xsl:value-of select="$projectresult"/>
|
|
177 |
<ROW key="{$projectId}" columnFamily="datasetProject_outcome_produces">
|
|
178 |
<QUALIFIER name="{$datasetId}" type="base64">
|
|
179 |
<xsl:value-of select="$projectdataset"/>
|
|
180 | 180 |
</QUALIFIER> |
181 | 181 |
</ROW> |
182 | 182 |
</xsl:if> |
... | ... | |
186 | 186 |
select="//*[local-name()='relatedIdentifier' and ./@relatedIdentifierType='OPENAIRE' and ./@relationType='IsSupplementTo']"> |
187 | 187 |
|
188 | 188 |
<!-- relatedDataset ids must be in the openaire format --> |
189 |
<xsl:variable name="targetId" select="dnet:oafSimpleId('result', normalize-space(.))"/>
|
|
189 |
<xsl:variable name="targetId" select="dnet:oafSimpleId('dataset', normalize-space(.))"/>
|
|
190 | 190 |
|
191 | 191 |
<xsl:if test="string-length($targetId) > 0"> |
192 | 192 |
|
193 |
<xsl:variable name="resultDataset"
|
|
194 |
select="dnet:rel($resultId, $targetId, 'resultResult', 'supplement', 'isSupplementTo', $provenance, $trust, $about)"/>
|
|
195 |
<xsl:variable name="datasetResult"
|
|
196 |
select="dnet:rel($targetId, $resultId, 'resultResult', 'supplement', 'isSupplementedBy', $provenance, $trust, $about)"/>
|
|
193 |
<xsl:variable name="datasetDataset"
|
|
194 |
select="dnet:rel($datasetId, $targetId, 'datasetDataset', 'supplement', 'isSupplementTo', $provenance, $trust, $about)"/>
|
|
195 |
<xsl:variable name="datasetDataset"
|
|
196 |
select="dnet:rel($targetId, $datasetId, 'datasetDataset', 'supplement', 'isSupplementedBy', $provenance, $trust, $about)"/>
|
|
197 | 197 |
|
198 |
<ROW key="{$resultId}" columnFamily="resultResult_supplement_isSupplementTo">
|
|
198 |
<ROW key="{$datasetId}" columnFamily="datasetDataset_supplement_isSupplementTo">
|
|
199 | 199 |
<QUALIFIER name="{$targetId}" type="base64"> |
200 |
<xsl:value-of select="$resultDataset"/>
|
|
200 |
<xsl:value-of select="$datasetDataset"/>
|
|
201 | 201 |
</QUALIFIER> |
202 | 202 |
</ROW> |
203 |
<ROW key="{$targetId}" columnFamily="resultResult_supplement_isSupplementedBy">
|
|
204 |
<QUALIFIER name="{$resultId}" type="base64">
|
|
205 |
<xsl:value-of select="$datasetResult"/>
|
|
203 |
<ROW key="{$targetId}" columnFamily="datasetDataset_supplement_isSupplementedBy">
|
|
204 |
<QUALIFIER name="{$datasetId}" type="base64">
|
|
205 |
<xsl:value-of select="$datasetDataset"/>
|
|
206 | 206 |
</QUALIFIER> |
207 | 207 |
</ROW> |
208 | 208 |
</xsl:if> |
... | ... | |
212 | 212 |
select="//*[local-name()='relatedIdentifier' and ./@relatedIdentifierType='OPENAIRE' and ./@relationType='IsPartOf']"> |
213 | 213 |
|
214 | 214 |
<!-- relatedDataset ids must be in the openaire format --> |
215 |
<xsl:variable name="datasetId" select="dnet:oafSimpleId('result', normalize-space(.))"/>
|
|
215 |
<xsl:variable name="datasetId" select="dnet:oafSimpleId('dataset', normalize-space(.))"/>
|
|
216 | 216 |
|
217 | 217 |
<xsl:if test="string-length($datasetId) > 0"> |
218 | 218 |
|
219 | 219 |
<xsl:variable name="childParent" |
220 |
select="dnet:rel($resultId, $datasetId, 'resultResult', 'part', 'isPartOf', $provenance, $trust, $about)"/>
|
|
220 |
select="dnet:rel($datasetId, $datasetId, 'datasetDataset', 'part', 'isPartOf', $provenance, $trust, $about)"/>
|
|
221 | 221 |
<xsl:variable name="parentChild" |
222 |
select="dnet:rel($datasetId, $resultId, 'resultResult', 'part', 'hasPart', $provenance, $trust, $about)"/>
|
|
222 |
select="dnet:rel($datasetId, $datasetId, 'datasetDataset', 'part', 'hasPart', $provenance, $trust, $about)"/>
|
|
223 | 223 |
|
224 |
<ROW key="{$resultId}" columnFamily="resultResult_part_isPartOf">
|
|
224 |
<ROW key="{$datasetId}" columnFamily="datasetDataset_part_isPartOf">
|
|
225 | 225 |
<QUALIFIER name="{$datasetId}" type="base64"> |
226 | 226 |
<xsl:value-of select="$childParent"/> |
227 | 227 |
</QUALIFIER> |
228 | 228 |
</ROW> |
229 |
<ROW key="{$datasetId}" columnFamily="resultResult_part_hasPart">
|
|
230 |
<QUALIFIER name="{$resultId}" type="base64">
|
|
229 |
<ROW key="{$datasetId}" columnFamily="datasetDataset_part_hasPart">
|
|
230 |
<QUALIFIER name="{$datasetId}" type="base64">
|
|
231 | 231 |
<xsl:value-of select="$parentChild"/> |
232 | 232 |
</QUALIFIER> |
233 | 233 |
</ROW> |
Also available in: Unified diff
created dataset dedicated entities