Class KnowledgeBaseUpdater


  • public class KnowledgeBaseUpdater
    extends Object
    Performs knowledge base updates necessary to align with 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 IOException
        Executes 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)