Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to the query you formulate, it seems that you want to retrieve the <em>persons that are using some alcohol</em>.</p> <p>With your current constructs, the Behavior class is first "wrongly" classified as Person, because of the domain of the <em>using</em> object property. Moreover you should declare the anonymous expression <em>using some AlcoholicBeverage</em> as <strong>equivalent</strong> to the NegativeChange class and not as super class as it is currently the case. The queries <em>using some Beer</em> or <em>drinking some Wine</em> would then be correctly classified under NegativeChange.</p> <p>The semantically correct solution to retrieve the alcohol consumers would be to create a class called AlcoholConsumer, subclass of Person. The equivalent definition of AlcoholConsumer would be <em>using some AlcoholicBeverage</em>. Implementation using <a href="http://loopasam.github.com/Brain/" rel="nofollow">Brain</a>: </p> <pre><code>public static void main(String[] args) throws BrainException { //Declare all the axioms Brain brain = new Brain(); brain.addClass("AlcoholicBeverage"); brain.addClass("Beer"); brain.subClassOf("Beer", "AlcoholicBeverage"); brain.addClass("Wine"); brain.subClassOf("Wine", "AlcoholicBeverage"); brain.addClass("Person"); brain.addObjectProperty("using"); brain.addObjectProperty("drinking"); brain.subPropertyOf("drinking", "using"); brain.addObjectProperty("consuming"); brain.subPropertyOf("consuming", "using"); brain.addClass("AlcoholConsumer"); brain.subClassOf("AlcoholConsumer", "Person"); brain.equivalentClasses("AlcoholConsumer", "using some AlcoholicBeverage"); //Add the queries brain.addClass("Query1"); brain.equivalentClasses("Query1", "using some Beer"); brain.addClass("Query2"); brain.equivalentClasses("Query2", "drinking some Beer"); brain.addClass("Query3"); brain.equivalentClasses("Query3", "consuming some Wine"); List&lt;String&gt; subClasses = brain.getSubClasses("AlcoholConsumer", false); //Should list all the queries System.out.println(subClasses); brain.sleep(); brain.save("/home/samuel/Desktop/so.owl"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload