public String groupSkos(String idGroup, String idTheso) { ExportFromBDD exportFromBDD = new ExportFromBDD(); exportFromBDD.setServerAdress(serverAdress); exportFromBDD.setServerArk(serverArk); exportFromBDD.setArkActive(arkActive); return exportFromBDD.exportThisGroup(connect.getPoolConnexion(), idTheso, idGroup).toString(); }
public String groupJsonLd(String idGroup, String idTheso) { ExportFromBDD exportFromBDD = new ExportFromBDD(); exportFromBDD.setServerAdress(serverAdress); exportFromBDD.setServerArk(serverArk); exportFromBDD.setArkActive(arkActive); StringBuffer skos_local = exportFromBDD.exportThisGroup(connect.getPoolConnexion(), idTheso, idGroup); JsonHelper jsonHelper = new JsonHelper(); SKOSXmlDocument sKOSXmlDocument = jsonHelper.readSkosDocument(skos_local); StringBuffer jsonLd = jsonHelper.getJsonLd(sKOSXmlDocument); return jsonLd.toString(); }
/** * Cette fonction permet de retourner pour téléchargement un groupe en SKOS * * @param idGroup * @param idTheso * @return */ public StreamedContent thisGroupToSkos(String idGroup, String idTheso) { ExportFromBDD exportFromBDD = new ExportFromBDD(); exportFromBDD.setServerAdress(serverAdress); exportFromBDD.setServerArk(serverArk); exportFromBDD.setArkActive(arkActive); StringBuffer skos_local = exportFromBDD.exportThisGroup(connect.getPoolConnexion(), idTheso, idGroup); InputStream stream; try { stream = new ByteArrayInputStream(skos_local.toString().getBytes("UTF-8")); file = new DefaultStreamedContent(stream, "application/xml", idGroup + "_Group_skos.xml"); } catch (UnsupportedEncodingException ex) { Logger.getLogger(DownloadBean.class.getName()).log(Level.SEVERE, null, ex); } return file; }