Martin O'Connor edited this page Aug 6, 2016 · 10 revisions

This built-in library provides methods for querying OWL TBox axioms using the SQWRL query language. This built-in library is one of the three SWRLAPI OWL axiom querying libraries and can be used in combination with the ABox and RBox built-in libraries to query all OWL axiom types in an ontology.

This library defines the following built-ins:

  • cd Declaration axiom for an OWL class. e.g., tbox:cd(?c)
  • opd Declaration axiom for an OWL object property. e.g., tbox:opd(?op)
  • dpd Declaration axiom for an OWL data property. e.g., tbox:dpd(?dp)
  • apd Declaration axiom for an OWL annotation property. e.g., tbox:apd(?ap)
  • dd Declaration axiom for an OWL datatype. e.g., tbox:dd(?d)
  • sca Subclass axiom. e.g., tbox:sca(?c, Parent)
  • eca Equivalent classes axiom. e.g., tbox:eca(?c, Dog)
  • dca Disjoint classes axiom. e.g., tbox:dca(Mother, Father)
  • fopa Functional object property axiom. e.g., tbox:fopa(hasMother)
  • ifopa Inverse functional object property axiom. e.g., ifopa:eca(?p)
  • fdpa Functional data property axiom. e.g., tbox:fdpa(hasAge)
  • opda Object property domain axiom. e.g., tbox:opda(hasFriend, Person)
  • opra Object property range axiom. e.g., tbox:opra(hasFriend, Person)
  • dpda Data property domain axiom. e.g., tbox:dpda(hasSalary, Person)
  • dpra Not yet implemented. Data property range axiom.
  • dda Not yet implemented. Datatype definition axiom.
  • dua Not yet implemented. Disjoint union of axiom.
  • hka Not yet implemented. Has key axiom.


List all object properties with a domain of Person:

    tbox:opda(?p, Person) -> sqwrl:select(?p)

List all asserted superclasses of class C1:

    tbox:sca(C1, ?c) -> sqwrl:select(?c) ^ sqwrl:orderBy(?c)