@@ -208,6 +208,9 @@ public void serialize(UserInfo info) {
208
208
String prefix = SN .getPersonURI (info .user .getAccountId ());
209
209
AddTriple (result , true , false , prefix , RDF .type , SNVOC .Person );
210
210
211
+ AddTriple (result , false , false , prefix , SNVOC .id ,
212
+ createLiteral (Long .toString (info .user .getAccountId ())));
213
+
211
214
AddTriple (result , false , false , prefix , SNVOC .firstName ,
212
215
createLiteral (info .extraInfo .getFirstName ()));
213
216
@@ -289,6 +292,10 @@ public void serialize(Post post) {
289
292
String prefix = SN .getPostURI (post .getMessageId ());
290
293
291
294
AddTriple (result , true , false , prefix , RDF .type , SNVOC .Post );
295
+
296
+ AddTriple (result , false , false , prefix , SNVOC .id ,
297
+ createLiteral (SN .formId (post .getMessageId ())));
298
+
292
299
AddTriple (result , false , false , prefix , SNVOC .creationDate ,
293
300
createDataTypeLiteral (dateString , XSD .DateTime ));
294
301
if (post .getIpAddress () != null ) {
@@ -360,6 +367,10 @@ public void serialize(Photo photo) {
360
367
361
368
String prefix = SN .getPostURI (photo .getMessageId ());
362
369
AddTriple (result , true , false , prefix , RDF .type , SNVOC .Post );
370
+
371
+ AddTriple (result , false , false , prefix , SNVOC .id ,
372
+ createLiteral (SN .formId (photo .getMessageId ())));
373
+
363
374
AddTriple (result , false , false , prefix , SNVOC .hasImage , createLiteral (photo .getContent ()));
364
375
date .setTimeInMillis (photo .getCreationDate ());
365
376
String dateString = DateGenerator .formatDateDetail (date );
@@ -398,6 +409,10 @@ public void serialize(Comment comment) {
398
409
String dateString = DateGenerator .formatDateDetail (date );
399
410
400
411
AddTriple (result , true , false , prefix , RDF .type , SNVOC .Comment );
412
+
413
+ AddTriple (result , false , false , prefix , SNVOC .id ,
414
+ createLiteral (SN .formId (comment .getMessageId ())));
415
+
401
416
AddTriple (result , false , false , prefix , SNVOC .creationDate , createDataTypeLiteral (dateString , XSD .DateTime ));
402
417
if (comment .getIpAddress () != null ) {
403
418
AddTriple (result , false , false , prefix , SNVOC .ipaddress ,
@@ -442,6 +457,10 @@ public void serialize(Group group) {
442
457
443
458
String forumPrefix = SN .getForumURI (group .getGroupId ());
444
459
AddTriple (result , true , false , forumPrefix , RDF .type , SNVOC .Forum );
460
+
461
+ AddTriple (result , false , false , forumPrefix , SNVOC .id ,
462
+ createLiteral (SN .formId (group .getGroupId ())));
463
+
445
464
AddTriple (result , false , false , forumPrefix , SNVOC .title , createLiteral (group .getGroupName ()));
446
465
AddTriple (result , false , true , forumPrefix , SNVOC .creationDate ,
447
466
createDataTypeLiteral (dateString , XSD .DateTime ));
@@ -511,6 +530,7 @@ public void serialize(Organization organization) {
511
530
StringBuffer result = new StringBuffer (19000 );
512
531
writeDBPData (DBP .fullPrefixed (organization .name ), RDF .type , DBPOWL .Organisation );
513
532
writeDBPData (DBP .fullPrefixed (organization .name ), FOAF .Name , createLiteral (organization .name ));
533
+ writeDBPData (DBP .fullPrefixed (organization .name ), SNVOC .id , createLiteral (Long .toString (organization .id )));
514
534
createTripleSPO (result , DBP .fullPrefixed (organization .name ),
515
535
SNVOC .locatedIn , DBP .fullPrefixed (locationDic .getLocationName (organization .location )));
516
536
toWriter (result .toString ());
@@ -520,6 +540,7 @@ public void serialize(Organization organization) {
520
540
public void serialize (Tag tag ) {
521
541
StringBuffer result = new StringBuffer (350 );
522
542
writeDBPData (DBP .fullPrefixed (tag .name ), FOAF .Name , createLiteral (tag .name ));
543
+ writeDBPData (DBP .fullPrefixed (tag .name ), SNVOC .id , createLiteral (Long .toString (tag .id )));
523
544
Integer tagClass = tag .tagClass ;
524
545
writeDBPData (DBP .fullPrefixed (tag .name ), RDF .type , DBPOWL .prefixed (tagDic .getClassName (tagClass )));
525
546
}
@@ -539,6 +560,7 @@ public void serialize(Location location) {
539
560
writeDBPData (DBP .fullPrefixed (name ), RDF .type , DBPOWL .Place );
540
561
writeDBPData (DBP .fullPrefixed (name ), RDF .type , type );
541
562
writeDBPData (DBP .fullPrefixed (name ), FOAF .Name , createLiteral (name ));
563
+ writeDBPData (DBP .fullPrefixed (name ), SNVOC .id , createLiteral (Long .toString (location .getId ())));
542
564
if (location .getType () != Location .CONTINENT ) {
543
565
String countryName = locationDic .getLocationName (locationDic .belongsTo (location .getId ()));
544
566
createTripleSPO (result , DBP .fullPrefixed (name ), SNVOC .isPartOf , DBP .fullPrefixed (countryName ));
0 commit comments