| 13 | | public void setAcqiredRDFFiles(File data){ |
| 14 | | if( data.isDirectory() ){ |
| 15 | | // read files |
| 16 | | File[] files = data.listFiles(); |
| 17 | | acquiredRDFFiles = new HashMap<String, String>(); |
| 18 | | for(File file: files){ |
| 19 | | String uri = null; |
| 20 | | try{ |
| 21 | | JenaModelGenerator jmGene = new JenaModelGenerator(file.getAbsolutePath()); |
| 22 | | uri = jmGene.getEndpointURI(); |
| 23 | | }catch(Exception ex){ |
| 24 | | // |
| 25 | | } |
| 26 | | if( uri != null ){ |
| 27 | | acquiredRDFFiles.put(uri, data.getAbsolutePath()); |
| 28 | | } |
| 29 | | } |
| 30 | | }else{ |
| 31 | | if( data.isFile() ){ |
| 32 | | String uri = null; |
| 33 | | try{ |
| 34 | | JenaModelGenerator jmGene = new JenaModelGenerator(data.getAbsolutePath()); |
| 35 | | uri = jmGene.getEndpointURI(); |
| 36 | | }catch(Exception ex){ |
| 37 | | // |
| 38 | | } |
| 39 | | if( uri != null ){ |
| 40 | | acquiredRDFFiles = new HashMap<String, String>(); |
| 41 | | acquiredRDFFiles.put(uri, data.getAbsolutePath()); |
| 42 | | } |
| 43 | | } |
| 44 | | } |
| | 13 | public void setAcqiredRDFFiles(File data) throws Exception{ |
| | 14 | StructureCrawler sc = new StructureCrawler(data); |
| | 15 | acquiredRDFFiles = sc.getAcquiredStructureFiles(); |