@@ -259,16 +259,31 @@ function process_file($infile) {
259
259
);
260
260
261
261
##########################################################################################
262
- #info
262
+ #identifiers
263
263
##########################################################################################
264
264
parent ::addRDF (
265
- parent ::triplifyString ($ study_id , parent ::getVoc ()."nct-id " , $ this ->getString ('//id_info/nct_id ' )).
266
- parent ::triplifyString ($ study_id , parent ::getVoc ()."org-study-id " , $ this ->getString ('//id_info/org_study_id ' )).
267
- parent ::triplifyString ($ study_id , parent ::getVoc ()."secondary-id " , $ this ->getString ('//id_info/secondary_id ' )). // this can be a list
268
- parent ::triplifyString ($ study_id , parent ::getVoc ()."nct-alias " , $ this ->getString ('//id_info/nct_alias ' )) // this can be a list
265
+ parent ::triplifyString ($ study_id , parent ::getVoc ()."nct-id " , $ this ->getString ('//id_info/nct_id ' ), "xsd:string " ).
266
+ parent ::triplifyString ($ study_id , parent ::getVoc ()."org-study-id " , $ this ->getString ('//id_info/org_study_id ' ), "xsd:string " )
269
267
);
270
268
271
269
270
+ $ sids = $ root ->xpath ('//id_info/secondary_id ' );
271
+ if (isset ($ sids )) {
272
+ foreach ($ sids AS $ id ) {
273
+ parent ::addRDF (
274
+ parent ::triplifyString ($ study_id , parent ::getVoc ()."secondary-id " , (string )$ id , "xsd:string " )
275
+ );
276
+ }
277
+ }
278
+ $ nctaliases = $ root ->xpath ('//id_info/nct-alias ' );
279
+ if (isset ($ nctaliases )) {
280
+ foreach ($ nctaliases AS $ id ) {
281
+ parent ::addRDF (
282
+ parent ::triplifyString ($ study_id , parent ::getVoc ()."nct-alias " , (string )$ id , "xsd:string " )
283
+ );
284
+ }
285
+ }
286
+
272
287
##########################################################################################
273
288
#titles
274
289
##########################################################################################
0 commit comments