Class KnowledgeBaseUpdater
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.ontology.update.KnowledgeBaseUpdater
-
public class KnowledgeBaseUpdater extends Object
Performs knowledge base updates necessary to align with a new ontology version.
-
-
Constructor Summary
Constructors Constructor Description KnowledgeBaseUpdater(UpdateSettings settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisUpdatableABoxGraph(String graphName)static StringloadSparqlQuery(String filePath)loads a SPARQL ASK query from a text filebooleanupdate(javax.servlet.ServletContext servletContext)booleanupdateRequired(javax.servlet.ServletContext servletContext)Executes a SPARQL ASK query to determine whether the knowledge base needs to be updated to conform to a new ontology version
-
-
-
Constructor Detail
-
KnowledgeBaseUpdater
public KnowledgeBaseUpdater(UpdateSettings settings)
-
-
Method Detail
-
update
public boolean update(javax.servlet.ServletContext servletContext) throws IOException- Throws:
IOException
-
updateRequired
public boolean updateRequired(javax.servlet.ServletContext servletContext) throws IOExceptionExecutes a SPARQL ASK query to determine whether the knowledge base needs to be updated to conform to a new ontology version- Throws:
IOException
-
loadSparqlQuery
public static String loadSparqlQuery(String filePath) throws IOException
loads a SPARQL ASK query from a text file- Parameters:
filePath- Path of a file- Returns:
- the query string or null if file not found
- Throws:
IOException
-
isUpdatableABoxGraph
public static boolean isUpdatableABoxGraph(String graphName)
-
-