1 Reply Latest reply on Oct 25, 2010 3:21 PM by 715399

    inference, Jena, additional componets

    801615
      Hi,

      The following code does OWLPRIME entailments.

      String[] rulebaseNames = {"OWLPRIME"};
      Attachment attachment = Attachment.createInstance(modelNames, rulebaseNames,
                          InferenceMaintenanceMode.NO_UPDATE, QueryOptions.ALLOW_QUERY_VALID_AND_DUP);

      OracleUtils.dropSemanticModel(oracle, szModelName);
      graph = new GraphOracleSem(oracle, szModelName, attachment, true);
                          
      //graph.deleteInference();
      graph.performInference("INTERSECT,ONEOF");


      What happens is that inference is kicked off autmatically from constructor of GraphOracleSem and it uses default components
      If I want to run inference with added components, then I need to call the method explicitly. However, it is not kicked off with message

      +(jena.GraphOracleSem) - performInference: has valid entailment already+

      So I need to call graph.deleteInference first and run inference again.
      Can I avoid this overhead and
      1. supress inference in constructor or
      2. specify additional for inference components in constructor

      Thanks
      Jürgen

      Edited by: user8793616 on 2010-nov-01 02:31
        • 1. Re: inference, Jena, addintional componets
          715399
          Hi Jurgen,

          When you use virtual models, the entailment is created automatically when constructing a GraphOracleSem. This is because the creation of the virtual model requires the entailment to be present.

          As a workaround, you could create a GraphOracleSem without setting the useVirtualModel parameter, then create inference with the options you want and finally create the virtual model by using the useVirtualModel or useVirtualModel(String) methods.

          Regards,
          Vlad