Graph cache fix
This commit is contained in:
parent
963c04340f
commit
4da85f0d82
1 changed files with 2 additions and 3 deletions
|
@ -533,19 +533,18 @@ public abstract class RDFServiceJena extends RDFServiceImpl implements RDFServic
|
||||||
if (rebuildGraphURICache) {
|
if (rebuildGraphURICache) {
|
||||||
synchronized (RDFServiceJena.class) {
|
synchronized (RDFServiceJena.class) {
|
||||||
if (rebuildGraphURICache) {
|
if (rebuildGraphURICache) {
|
||||||
rebuildGraphURICache = false;
|
|
||||||
graphURIs.clear();
|
|
||||||
|
|
||||||
DatasetWrapper dw = getDatasetWrapper();
|
DatasetWrapper dw = getDatasetWrapper();
|
||||||
try {
|
try {
|
||||||
Dataset d = dw.getDataset();
|
Dataset d = dw.getDataset();
|
||||||
Iterator<String> nameIt = d.listNames();
|
Iterator<String> nameIt = d.listNames();
|
||||||
|
graphURIs.clear();
|
||||||
while (nameIt.hasNext()) {
|
while (nameIt.hasNext()) {
|
||||||
graphURIs.add(nameIt.next());
|
graphURIs.add(nameIt.next());
|
||||||
}
|
}
|
||||||
return graphURIs;
|
return graphURIs;
|
||||||
} finally {
|
} finally {
|
||||||
dw.close();
|
dw.close();
|
||||||
|
rebuildGraphURICache = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue