| | 119 | |
| | 120 | public static String getClassLabel(String classURI, SClass[] classes){ |
| | 121 | if ( classURI == null ){ |
| | 122 | return ""; |
| | 123 | } |
| | 124 | for ( int i = 0 ; i < classes.length; i++ ){ |
| | 125 | if ( classURI.equals(classes[i].getClassURI()) ){ |
| | 126 | Label[] labels = classes[i].getLabels(); |
| | 127 | for ( int j = 0 ; j < labels.length; j++ ){ |
| | 128 | if ( labels[j].getLanguage() == null ){ |
| | 129 | return labels[j].getLabel(); |
| | 130 | }else if ( labels[j].getLanguage().equals("en") ){ |
| | 131 | return labels[j].getLabel(); |
| | 132 | } |
| | 133 | } |
| | 134 | break; |
| | 135 | } |
| | 136 | } |
| | 137 | String[] url = classURI.split("/"); |
| | 138 | String tmplabel = url[url.length-1]; |
| | 139 | String[] tmplabel2 = tmplabel.split("#"); |
| | 140 | String label = tmplabel2[tmplabel2.length-1]; |
| | 141 | return label; |
| | 142 | } |