Skip to content

How to use custom Built-Ins in Protege? #89

@tobiaswjohn

Description

@tobiaswjohn

I am trying to use the SWRLBuiltInBridge to define a custom built-in to be used to in SWRL rules in Protege. However, I am struggling to get the setup right. I am using the example from the existing example repository.
As I understand it, I need to build a JAR file containing the class that I implemented. As I am using Linux, I then copy the JAR to the directory plugins that is within the directory containing Protege (and where all the other plugins are also stored).
However, the plugin does not seem to be loaded in Protege (I can not see it when I check Preferences -> Plugins) and I can not use the defined built-in (when I try to use strings:stringsEqual, I get the message Invalid SWRL atom predicate).

Is there something else that I need to consider to use custom built-ins in Protege? Is there some way to figure out why the plugin is not loaded?

Detailed Steps I took

  • clone repository https://github.com/protegeproject/swrlapi-builtin-library-example
  • build the repository using mvn clean install
  • copy the JAR swrlapi-builtins-library-example-2.1.2.jar from directory target to the directory plugins in the Protege directory (Protege-5.6.7)
  • run Protege
  • open ontology StringsBuiltInOntology.owl from the example repository
  • try to use strings:stringsEqual as an atom in a SWRL rule

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions