Skip to content

Commit

Permalink
fix IRI to file resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
melaasar committed Oct 18, 2022
1 parent 72cab4a commit bbef123
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
subprojects {
group = 'io.opencaesar.owl'
version = '1.0.9'
version = '1.0.10'

ext.versions = [
owl: '5.1.17',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public IRI getDocumentIRI(IRI originalIri) {
File f = new File(new URI(documentUri));
if (!f.exists() || !f.isFile()) {
String fileWithExtensionPath = f.toString()+".owl";
f = new File(fileWithExtensionPath);
if (f.exists() && f.isFile())
File f_ext = new File(fileWithExtensionPath);
if (f_ext.exists() && f_ext.isFile())
return IRI.create("file:" + fileWithExtensionPath);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public IRI getDocumentIRI(IRI originalIri) {
if (!f.exists() || !f.isFile()) {
for ( String ext : extensions ) {
String fileWithExtensionPath = (ext.startsWith(".")) ? f.toString()+ext : f.toString()+"." + ext;
f = new File(fileWithExtensionPath);
if (f.exists() && f.isFile())
File f_ext = new File(fileWithExtensionPath);
if (f_ext.exists() && f_ext.isFile())
return IRI.create("file:" + fileWithExtensionPath);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public IRI getDocumentIRI(IRI originalIri) {
if (!f.exists() || !f.isFile()) {
for ( String ext : extensions ) {
String fileWithExtensionPath = (ext.startsWith(".")) ? f.toString()+ext : f.toString()+"." + ext;
f = new File(fileWithExtensionPath);
if (f.exists() && f.isFile())
File f_ext = new File(fileWithExtensionPath);
if (f_ext.exists() && f_ext.isFile())
return IRI.create("file:" + fileWithExtensionPath);
}
}
Expand Down

0 comments on commit bbef123

Please sign in to comment.