Skip to content

Commit 260d13a

Browse files
committed
Release 1.3.3
1 parent 652a8ae commit 260d13a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<groupId>edu.isi.kcap</groupId>
1212
<artifactId>ontapi</artifactId>
13-
<version>1.3.2</version>
13+
<version>1.3.3</version>
1414

1515
<scm>
1616
<connection>

src/main/java/edu/isi/kcap/ontapi/jena/KBAPIJena.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ private void initialize(OntSpec spec, final Dataset tdbstore) throws Exception {
137137

138138
submodels = new ArrayList<KBAPIJena>();
139139

140+
if(this.url != null) {
141+
// Fix Ontology URL changes
142+
this.url = getFixedOntologyUrl(this.url);
143+
}
144+
140145
OntDocumentManager.getInstance().setProcessImports(false);
141146
if (tdbstore == null || this.url == null)
142147
{
@@ -145,7 +150,7 @@ private void initialize(OntSpec spec, final Dataset tdbstore) throws Exception {
145150
readModel();
146151
}
147152
else
148-
{
153+
{
149154
// If there is a triple tdbstore
150155
this.tdbstore = tdbstore;
151156
Txn.executeWrite(tdbstore, ()->{
@@ -161,10 +166,22 @@ private void initialize(OntSpec spec, final Dataset tdbstore) throws Exception {
161166
});
162167
}
163168
}
169+
170+
private String getFixedOntologyUrl(String url) {
171+
String onturl = "http://www.wings-workflows.org/ontology";
172+
String newonturl = "https://wings-workflows.org/ontology";
173+
if (url.startsWith(onturl)) {
174+
return newonturl + url.substring(onturl.length());
175+
}
176+
return url;
177+
}
164178

165179
private void readModel() throws Exception {
166180
if (ontmodel != null) {
167181
if (this.url != null) {
182+
if (this.url.startsWith("urn:")) {
183+
return;
184+
}
168185
try {
169186
ontmodel.read(this.url);
170187
}

0 commit comments

Comments
 (0)