public class ModelFolders
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<com.hp.hpl.jena.query.Dataset> |
datasets |
protected java.util.Map<com.hp.hpl.jena.ontology.OntModel,net.exogeni.orca.ndl.util.ModelFolders.ModelFolder> |
modelFolders |
protected boolean |
noMoreFolders |
| Modifier and Type | Method and Description |
|---|---|
void |
closeDatasets()
Close all datasets (e.g.
|
java.io.File |
createNamedDirectory(java.lang.String p)
Return a named directory (create if needed) with no exit hooks
|
java.io.File |
createTempDirectory(java.lang.String prefix)
Create a temporary directory with no exit hooks
|
static void |
deleteFolder(java.lang.String p)
Remove a folder recursively
|
void |
deleteTDBOnShutDown()
Invoked on shut down, deletes all ephemeral TDB folders
|
static boolean |
folderExists(java.io.File folder)
Check if a model folder exists
|
static boolean |
folderExists(java.lang.String p)
Check if a model folder exists
|
static ModelFolders |
getInstance() |
java.lang.String |
getPath(com.hp.hpl.jena.ontology.OntModel m) |
boolean |
isEphemeral(com.hp.hpl.jena.ontology.OntModel m) |
boolean |
isInTDB(com.hp.hpl.jena.ontology.OntModel m) |
void |
put(com.hp.hpl.jena.ontology.OntModel m,
com.hp.hpl.jena.query.Dataset ds,
java.lang.String path,
boolean e)
Add a new TDB model entry for bookkeeping
|
boolean |
remove(com.hp.hpl.jena.ontology.OntModel m)
Remove a folder belonging to the model (hopefully after it is closed).
|
protected java.util.Map<com.hp.hpl.jena.ontology.OntModel,net.exogeni.orca.ndl.util.ModelFolders.ModelFolder> modelFolders
protected java.util.Set<com.hp.hpl.jena.query.Dataset> datasets
protected boolean noMoreFolders
public static ModelFolders getInstance()
public void deleteTDBOnShutDown()
public java.io.File createTempDirectory(java.lang.String prefix)
prefix - - optional prefixpublic java.io.File createNamedDirectory(java.lang.String p)
p - ppublic static void deleteFolder(java.lang.String p)
p - ppublic static boolean folderExists(java.io.File folder)
folder - folderpublic static boolean folderExists(java.lang.String p)
p - ppublic void put(com.hp.hpl.jena.ontology.OntModel m,
com.hp.hpl.jena.query.Dataset ds,
java.lang.String path,
boolean e)
throws java.lang.Exception
m - - the modelds - - its datasetpath - - the path where it will be kepte - - whether it is ephemeral or permanentjava.lang.Exception - in case of errorpublic boolean remove(com.hp.hpl.jena.ontology.OntModel m)
m - mpublic java.lang.String getPath(com.hp.hpl.jena.ontology.OntModel m)
public boolean isEphemeral(com.hp.hpl.jena.ontology.OntModel m)
public boolean isInTDB(com.hp.hpl.jena.ontology.OntModel m)
public void closeDatasets()
Copyright © 2018 RENCI. All Rights Reserved.