Project

General

Profile

« Previous | Next » 

Revision 49016

getting rid of person entities

View differences:

oaf2hbase.xml
147 147
										</ROW>
148 148
									</xsl:if>
149 149
								</xsl:for-each>
150

  
151
								<xsl:for-each select="//*[local-name()='creator']">
152

  
153
									<xsl:if test="string-length(normalize-space(.)) &gt; 0">
154
										<xsl:variable name="originalPersonId">
155
											<xsl:choose>
156
												<xsl:when test="string-length(@nameIdentifier) &gt; 0">
157
													<xsl:value-of select="normalize-space(@nameIdentifier)"/>
158
												</xsl:when>
159
												<xsl:otherwise>
160
													<xsl:value-of select="concat($originalid, '::', normalize-space(.))"/>
161
												</xsl:otherwise>
162
											</xsl:choose>
163
										</xsl:variable>
164

  
165
										<xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, $originalPersonId)"/>
166
										<xsl:variable name="position" select="position()"/>
167

  
168
										<xsl:variable name="person"
169
										              select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname,
170
			                                  $originalPersonId, $dateofcollection, $dateoftransformation, normalize-space(.), @nameIdentifier, @nameIdentifierScheme)"/>
171
										<xsl:variable name="personresult"
172
										              select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf',
173
								              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
174
										<xsl:variable name="resultperson"
175
										              select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor',
176
								              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
177

  
178
										<xsl:if test="string-length($personId) &gt; 0">
179
											<ROW key="{$personId}" columnFamily="person">
180
												<QUALIFIER name="body" type="base64">
181
													<xsl:value-of select="$person"/>
182
												</QUALIFIER>
183
											</ROW>
184
											<ROW key="{$personId}" columnFamily="personResult_authorship_isAuthorOf">
185
												<QUALIFIER name="{$resultId}" type="base64">
186
													<xsl:value-of select="$personresult"/>
187
												</QUALIFIER>
188
											</ROW>
189
											<ROW key="{$resultId}" columnFamily="personResult_authorship_hasAuthor">
190
												<QUALIFIER name="{$personId}" type="base64">
191
													<xsl:value-of select="$resultperson"/>
192
												</QUALIFIER>
193
											</ROW>
194
										</xsl:if>
195

  
196
										<!-- COAUTHORS -->
197
										<xsl:if test="$writeCoAuthors = true()">
198
											<xsl:for-each select="../dc:creator">
199
												<xsl:if test="$position != position()">
200

  
201
													<xsl:variable name="originalCoauthorId">
202
														<xsl:choose>
203
															<xsl:when test="string-length(@nameIdentifier) &gt; 0">
204
																<xsl:value-of select="normalize-space(@nameIdentifier)"/>
205
															</xsl:when>
206
															<xsl:otherwise>
207
																<xsl:value-of select="concat($originalid, '::', normalize-space(.))"/>
208
															</xsl:otherwise>
209
														</xsl:choose>
210
													</xsl:variable>
211

  
212
													<xsl:variable name="coauthorId"
213
													              select="dnet:oafId('person', $namespaceprefix, $originalCoauthorId)"/>
214

  
215
													<xsl:variable name="personperson"
216
													              select="dnet:rel($personId, $coauthorId, 'personPerson', 'coauthorship', 'isCoAuthorOf',
217
											              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
218

  
219
													<ROW key="{$personId}" columnFamily="personPerson_coAuthorship_isCoAuthorOf">
220
														<QUALIFIER name="{$coauthorId}" type="base64">
221
															<xsl:value-of select="$personperson"/>
222
														</QUALIFIER>
223
													</ROW>
224
												</xsl:if>
225
											</xsl:for-each>
226
										</xsl:if>
227
										<!-- / COAUTHORS -->
228
									</xsl:if>
229
								</xsl:for-each>
230

  
231 150
							</ROWS>
232 151
						</xsl:otherwise>
233 152
					</xsl:choose>

Also available in: Unified diff