@@ -91,35 +91,29 @@ protected void serialize(final Organization organization) {
91
91
protected void serialize (final TagClass tagClass ) {
92
92
93
93
StringBuffer result = new StringBuffer (350 );
94
+ Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],SN .getTagClassURI (tagClass .id ), RDFS .label , Turtle .createLiteral (Dictionaries .tags .getClassLabel (tagClass .id )));
95
+ Turtle .createTripleSPO (result , SN .getTagClassURI (tagClass .id ), RDF .type , SNVOC .TagClass );
96
+
94
97
if (tagClass .name .equals ("Thing" )) {
95
- Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],"<http://www.w3.org/2002/07/owl#Thing>" , RDFS .label , Turtle .createLiteral (Dictionaries .tags .getClassLabel (tagClass .id )));
96
- Turtle .createTripleSPO (result , "<http://www.w3.org/2002/07/owl#Thing>" , RDF .type , SNVOC .TagClass );
97
- Turtle .createTripleSPO (result , "<http://www.w3.org/2002/07/owl#Thing>" , SNVOC .id , Long .toString (tagClass .id ));
98
- writers [FileNames .SOCIAL_NETWORK .ordinal ()].write (result .toString ());
99
- } else {
100
- Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],DBPOWL .prefixed (Dictionaries .tags .getClassName (tagClass .id )), RDFS .label ,
101
- Turtle .createLiteral (Dictionaries .tags .getClassLabel (tagClass .id )));
102
- Turtle .createTripleSPO (result , DBP .fullPrefixed (Dictionaries .tags .getClassName (tagClass .id )), RDF .type , SNVOC .TagClass );
103
- Turtle .createTripleSPO (result , DBP .fullPrefixed (Dictionaries .tags .getClassName (tagClass .id )), SNVOC .id , Long .toString (tagClass .id ));
104
- writers [FileNames .SOCIAL_NETWORK .ordinal ()].write (result .toString ());
105
- }
98
+ Turtle .createTripleSPO (result , SN .getTagClassURI (tagClass .id ), SNVOC .url , "<http://www.w3.org/2002/07/owl#Thing>" );
99
+ } else {
100
+ Turtle .createTripleSPO (result , SN .getTagClassURI (tagClass .id ), SNVOC .url , DBPOWL .prefixed (Dictionaries .tags .getClassName (tagClass .id )));
101
+ }
102
+
103
+ Turtle .createTripleSPO (result , SN .getTagClassURI (tagClass .id ), SNVOC .id , Long .toString (tagClass .id ));
104
+ writers [FileNames .SOCIAL_NETWORK .ordinal ()].write (result .toString ());
105
+
106
106
Integer parent = Dictionaries .tags .getClassParent (tagClass .id );
107
107
if (parent != -1 ) {
108
- String parentPrefix ;
109
- if (Dictionaries .tags .getClassName (parent ).equals ("Thing" )) {
110
- parentPrefix = "<http://www.w3.org/2002/07/owl#Thing>" ;
111
- } else {
112
- parentPrefix = DBPOWL .prefixed (Dictionaries .tags .getClassName (parent ));
113
- }
114
- Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],DBPOWL .prefixed (Dictionaries .tags .getClassName (tagClass .id )), RDFS .subClassOf , parentPrefix );
108
+ Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],SN .getTagClassURI (tagClass .id ), RDFS .subClassOf , SN .getTagClassURI (parent ));
115
109
}
116
110
}
117
111
118
112
protected void serialize (final Tag tag ) {
119
113
StringBuffer result = new StringBuffer (350 );
120
114
Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],DBP .fullPrefixed (tag .name ), FOAF .Name , Turtle .createLiteral (tag .name ));
121
115
Integer tagClass = tag .tagClass ;
122
- Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],DBP .fullPrefixed (tag .name ), RDF .type , DBPOWL . prefixed ( Dictionaries . tags . getClassName ( tagClass ) ));
116
+ Turtle .writeDBPData (writers [FileNames .SOCIAL_NETWORK .ordinal ()],DBP .fullPrefixed (tag .name ), RDF .type , SN . getTagClassURI ( tagClass ));
123
117
Turtle .createTripleSPO (result , DBP .fullPrefixed (tag .name ), SNVOC .id , Turtle .createLiteral (Long .toString (tag .id )));
124
118
writers [FileNames .SOCIAL_NETWORK .ordinal ()].write (result .toString ());
125
119
}
0 commit comments