Exemplo n.º 1
0
  public void initialize() throws ThinklabException {

    /* link and initialize knowledge repository */
    knowledgeRepository.initialize();

    /* see if the preferences override the thinklab core ontology URL */
    String cont =
        LocalConfiguration.getProperties()
            .getProperty("thinklab.ontology.core", DEFAULT_CORE_ONTOLOGY);

    URL tco = Thinklab.get().getResourceURL(cont);
    knowledgeRepository.refreshOntology(tco, MiscUtilities.getNameFromURL(cont), true);

    /* initialize types before we register plugins */
    initializeThinklabTypes();

    /* initialize default blacklists */
    String blk = LocalConfiguration.getProperties().getProperty(IGNORE_PROPERTY_PROPERTY);

    if (blk != null) {
      String[] bk = blk.trim().split(",");
      for (String s : bk) {
        KnowledgeManager.get().blacklistProperty(s);
      }
    }

    blk = LocalConfiguration.getProperties().getProperty(IGNORE_CONCEPT_PROPERTY);

    if (blk != null) {
      String[] bk = blk.trim().split(",");
      for (String s : bk) {
        KnowledgeManager.get().blacklistConcept(s);
      }
    }

    commandManager = new CommandManager();

    Thinklab.get().logger().info("knowledge manager initialized successfully");
  }
Exemplo n.º 2
0
 /* (non-Javadoc)
  * @see org.integratedmodelling.thinklab.IKnowledgeBase#getTextType()
  */
 public IConcept getTextType() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return textType;
 }
Exemplo n.º 3
0
 public IProperty getReifiedLiteralProperty() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return reifiedLiteralProperty;
 }
Exemplo n.º 4
0
 public IConcept getOperatorType() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return operatorType;
 }
Exemplo n.º 5
0
 public IProperty getClassificationProperty() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return classificationProperty;
 }
Exemplo n.º 6
0
 public IProperty getAbstractProperty() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return abstractProperty;
 }
Exemplo n.º 7
0
 public IProperty getImportedProperty() throws ThinklabValidationException {
   if (!typesInitialized) initializeThinklabTypes();
   return importedProperty;
 }