64 | | builder.getOWLClasses(null, keyword, false); |
| 64 | |
| 65 | builder.getOWLClasses(null,keyword,"en",false); |
| 66 | /* |
| 67 | SClass[] clz = builder.getOWLClasses(graphURIs, keyword, false); |
| 68 | for (SClass cls : clz) { |
| 69 | System.out.println(cls); |
| 70 | } |
| 71 | clz = builder.countInstances(null, clz); |
| 72 | for (SClass cls : clz) { |
| 73 | System.out.println(cls); |
| 74 | } |
| 75 | */ |
| 76 | |
| 77 | |
| 78 | builder.getOWLClasses(null, keyword, "en", false); |
166 | | queryStr.append("?keywords").append(".\n"); |
167 | | queryStr.append(" filter("); |
168 | | |
169 | | for (int i = 0; i < keywords.length; i++) { |
170 | | if (i > 0) |
171 | | queryStr.append(" or \n "); |
172 | | |
173 | | queryStr.append("regex(str(").append("?keywords") |
174 | | .append("),\""); |
175 | | queryStr.append(keywords[i]); |
176 | | queryStr.append("\", \"i\" )"); |
177 | | } |
178 | | queryStr.append(")\n"); |
179 | | |
| 183 | queryStr.append("?keywords") |
| 184 | .append(".\n"); |
| 185 | queryStr.append(" filter((LANG(?keywords) = \'") |
| 186 | .append(language); |
| 187 | queryStr.append("\') && \n ("); |
| 188 | |
| 189 | // (LANG(?keywords) = 'en') && |
| 190 | |
| 191 | for (int i=0;i<keywords.length;i++) |
| 192 | { |
| 193 | if (i>0) queryStr.append(" or \n "); |
| 194 | |
| 195 | |
| 196 | queryStr.append("regex(str(") |
| 197 | .append("?keywords") |
| 198 | .append("),\""); |
| 199 | queryStr.append(keywords[i]); |
| 200 | queryStr.append("\", \"i\" )"); |
| 201 | |
| 202 | } |
| 203 | queryStr.append("))\n"); |
| 204 | |