85 | | job.add("uri", classes[i].getClassURI()); |
86 | | job.add("display", classes[i].getClassURI()); |
87 | | //jab.add(classes[i].getClassURI()); |
| 85 | String uri = classes[i].getClassURI(); |
| 86 | job.add("uri", uri); |
| 87 | Label[] labels = classes[i].getLabels(); |
| 88 | String label = null; |
| 89 | for ( int j = 0 ; j < labels.length; j++ ){ |
| 90 | if ( labels[j].getLanguage() == null ){ |
| 91 | label = labels[j].getLabel(); break; |
| 92 | }else if ( labels[j].getLanguage().equals("en") ){ |
| 93 | label = labels[j].getLabel(); break; |
| 94 | } |
| 95 | } |
| 96 | if ( label == null ){ |
| 97 | String[] uris = uri.split("/"); |
| 98 | String tmplabel = uris[uris.length-1]; |
| 99 | String[] tmplabel2 = tmplabel.split("#"); |
| 100 | label = tmplabel2[tmplabel2.length-1]; |
| 101 | } |
| 102 | |
| 103 | StringBuilder displaybuilder = new StringBuilder(label); |
| 104 | displaybuilder.append(" ("); |
| 105 | displaybuilder.append(classes[i].getNumOfInstances()); |
| 106 | displaybuilder.append(")"); |
| 107 | job.add("display", displaybuilder.toString()); |