0

I try to return DataSomeValuesFrom values of an Equal class. Some piece of my ontology is as follows:

As you can see I have Electronics class, it has a data property named Keyword, and definition of my class is Keyword some {"electronics","equipment"} .

As a summary:

  • Class: Electronics
  • Dataproperty: Keyword
  • Equivalent_to: Keyword some {"electronics","equipment"}

<EquivalentClasses> <Class IRI="#Electronics"/> <DataSomeValuesFrom> <DataProperty IRI="#Keyword"/> <DataOneOf> <Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">electronics</Literal> <Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">equipment</Literal> </DataOneOf> </DataSomeValuesFrom> </EquivalentClasses>

I use Java, OWL API 4.1.0 and Hermit 1.3.8 for development,

When I query for Keyword some {"electronics"}, I want to list dataproperty values as "electronics" and "equipment".

The similar piece of code, in the following, is for returning the dataproperty values, I can return dataproperty (named keyword) value when I directly add it to an individual as a dataproperty from Protege, but it does not work for equal classes that it is keyword value is given in class definition. Is there a possible solution for this problem? How can I retrieve DataSomeValuesFrom literal of an equal class, and how can display it? If possible can you show me some piece of code.

Thank you.

`    Collection<OWLLiteral> l1 =EntitySearcher.getDataPropertyValues(owlNamedIndividual,p,ontology);
        for (OWLLiteral elem : l1) {
                if (elem.getLiteral().equals(GTIP_Search.ArrSiz[s]))
                      return elem.getLiteral();
        }`
funda
  • 1
  • 1
  • Duplicate of http://stackoverflow.com/questions/37821246/howto-get-dataproperty-inherited-from-superclass. – UninformedUser Jun 18 '16 at 06:15
  • And as I already said, you have to use a reasoner and not the `EntitySearcher.getDataPropertyValues` method which only works on asserted axioms in the ontology. – UninformedUser Jun 18 '16 at 06:16

0 Answers0