for (int i = 0; i < files.length; i++) {
System.out.println("File Name: "+ files[i].getPath() + " File Index:"+i);
try {
con.add(files[i].toURI().toURL(), baseURI, RDFFormat.TRIX);
System.out.println("Read File: "+ files[i].getPath());
con.commit();
} catch (Exception e) {
try{
con.add(files[i].toURI().toURL(), baseURI, RDFFormat.RDFXML);
System.out.println("Read File: "+ files[i].getPath());
con.commit();