1 Reply Latest reply on Oct 27, 2008 2:19 PM by alwu-Oracle

    Deselect Rules using Jena Attachment class

    652134
      Hi,
      I am using the Jena Attachment class (oracle.spatial.rdf.client.jena.Attachment) to perform inference on my data. I am using the OWLPRIME and a custom rule base for my inference. According to Inference Best Practices with RDFS/OWL, I can remove individual rules from a rule base using this SQL:

      BEGIN
      SEM_APIS.CREATE_ENTAILMENT(
      ‘example_rdfsidx',
      SEM_Models('my_example'),
      SEM_Rulebases('RDFS'),
      SEM_APIS.REACH_CLOSURE,
      'RDFS12-');
      END;

      I would like to perform my inference without the OWLPRIME rule owl:disjointWith. Is there a way to do this using the Jena classes?
      Thanks,
      Chuck
        • 1. Re: Deselect Rules using Jena Attachment class
          alwu-Oracle
          Yes you bet.

          Actually, it could not be simpler :)

          graphOracle.performInference("DISJH-");


          The API and javadoc is
          /**
          * Creates a rules index/entailment based on the underlying RDF/OWL model
          * and any other attached models and rulebases via <code>{@link oracle.spatial.rdf.client.jena.Attachment}</code>.
          * <p/>
          * Note that the transaction will be committed before any inference is carried out.
          * Call <code>{@link #rollbackTransaction()}</code> if there are any changes
          * that should not be persisted.
          * <p/>
          *
          * @param components specifies the <tt>INF_COMPONENTS_IN</tt> parameter
          * in the <tt>SEM_APIS.CREATE_ENTAILMENT</tt> PL/SQL interface.
          * It is only applicable to Oracle 11g and it can be NULL. When not null, it provides the ability
          * for selective inferencing. See the following document for details:
          * Oracle Database Semantic Technologies Developer's Guide 11g Release 1 (11.1)
          *
          * @throws SQLException when there is server side error.
          */
          public synchronized void performInference(String components)
          throws SQLException

          Cheers,

          Zhe Wu (Alan Wu)