Skip to content

Commit dd8ff11

Browse files
committed
Update CSV2RDF.java
1 parent 42c46ab commit dd8ff11

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

CSVToRDF/src/main/java/edu/isi/csvtordf/CSV2RDF.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ read label, try to find one in the svo file (there should be).
131131
}
132132
}
133133

134-
private void processFile(String path){
134+
private void processFile(String path) throws Exception{
135135
String[] colHeaders = null;
136136
String[] values;
137137
System.out.println("\nProcessing: "+path);
@@ -281,8 +281,9 @@ else if(p.toString().contains("hasSoftwareImage")){
281281
}
282282
}
283283

284-
} catch (IOException e) {
284+
} catch (Exception e) {
285285
System.err.println("Error (likely the property has not been recognized) "+e.getMessage());
286+
//throw e;
286287
}
287288
}
288289

@@ -333,7 +334,7 @@ public static void exportRDFFile(String outFile, OntModel model, String mode){
333334
}
334335
}
335336

336-
public static void processDataFolder(String path, boolean test, CSV2RDF instance){
337+
public static void processDataFolder(String path, boolean test, CSV2RDF instance)throws Exception{
337338
File folderInstances = new File(path);
338339
if(instance == null){
339340
System.err.println("Not initialized");
@@ -350,7 +351,7 @@ public static void processDataFolder(String path, boolean test, CSV2RDF instance
350351
}
351352
}
352353

353-
public static void processFile(String path, boolean test, CSV2RDF instance){
354+
public static void processFile(String path, boolean test, CSV2RDF instance)throws Exception{
354355
if(test){
355356
instance.checkFile(path);
356357
}else{
@@ -364,14 +365,21 @@ public static void main(String[] args){
364365
// String pathToInstancesDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data";
365366
// String pathToTransformationsDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\Transformations";
366367

367-
String pathToInstancesDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\MINT";
368-
String [] graphs = {"mint@isi.edu", "texas@isi.edu", "coertel@mitre.org", "brandon@starsift.com",
369-
"hvarg@isi.edu"};
368+
//MINT
369+
String version = "1.6.0";
370+
String pathToInstancesDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\MINT\\"+version;
371+
String [] graphs = {"mint@isi.edu"};//, "texas@isi.edu", "coertel@mitre.org", "brandon@starsift.com","hvarg@isi.edu"};
372+
//end mint
370373
//COVID models example
371374
// pathToInstancesDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\COVID";
372375
// processDataFolder(pathToInstancesDataFolder, false, catalog);
373376
// exportRDFFile("modelCatalogCovid.ttl", catalog.instances, "TTL");
374377
//END COVID
378+
379+
//wifire
380+
// String pathToInstancesDataFolder = "C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\Wifire";
381+
// String [] graphs = {"wifire@isi.edu"};
382+
//end wifire
375383
for (String graph:graphs){
376384
//a new catalog should be made per graph; otherwise graphs will be aggregated.
377385
CSV2RDF catalog = new CSV2RDF("C:\\Users\\dgarijo\\Documents\\GitHub\\ModelCatalog\\Data\\Units\\dict.json",

0 commit comments

Comments
 (0)