Class EditGUI

java.lang.Object
com.articulate.sigma.EditGUI

public class EditGUI extends Object
A class that generates a GUI for elements of the ontology.
  • Field Details

    • allowedTerms

      public static List<String> allowedTerms
    • initOnce

      public static boolean initOnce
  • Constructor Details

    • EditGUI

      public EditGUI()
  • Method Details

    • initOnce

      public static void initOnce()
    • genRelPage

      public String genRelPage(KB kb, String rel)
    • printInstances

      public static String printInstances(KB kb, String className)
      Get and print all instances of a class
    • genAllParentList

      public static List<String> genAllParentList(KB kb, String term)
      Get the all parent classes of term. Return the full transitive closure of instance and subclass through the subclass relation all the way to the root term of the hierarchy.
      Returns:
      an ArrayList of term strings
    • genImmedParentList

      public static List<String> genImmedParentList(KB kb, String term)
      Get the just the immediate parent classes of a term
      Returns:
      an ArrayList of term strings
    • genInstList

      public static Map<String,List<List<String>>> genInstList(KB kb, String term)
      Collect a set of relations in which the type of given term is an argument instance type, and collect the set of possible argument fillers.
      Returns:
      a map of relation name keys and array values, where each element of the array is a particular argument, and consists of an array of possible string values.
    • genClassList

      public static Map<String,List<List<String>>> genClassList(KB kb, String term)
      Collect a set of relations in which the type of given term is an argument subclass, and collect the set of possible argument fillers.
      Returns:
      a map of relation name keys and array values, where each element of the array is a particular argument, and consists of an array of possible string values.
    • genInstPage

      public static String genInstPage(KB kb, String term, String kbHref)
      Generate fields for an HTML form that allow a user to assert statements by using menus to set parameters that are arguments to relations.
    • genClassPage

      public static String genClassPage(KB kb, String term, String kbHref)
      Generate a set of menus comprising relations that apply to this class i.e. which has (domainSubclass [relation] [N] [thisclass]) If the allowedTerms list is non-empty, ensure that only terms in that list are used.
    • assertFacts

      public static String assertFacts(KB kb, Map<String,List<String>> cbset, String kbHref)
      Interpret a map as a key relation name and ArrayList of values as arguments.
      Returns:
      a String status message that includes a hyperlinked presentation of each formula that is successfully asserted.
    • main

      public static void main(String[] args)
      A test method.