{"id":41244928,"url":"https://github.com/protegeproject/swrlapi-builtin-library-example","last_synced_at":"2026-01-23T01:25:53.595Z","repository":{"id":70396380,"uuid":"65259661","full_name":"protegeproject/swrlapi-builtin-library-example","owner":"protegeproject","description":"Example SWRLAPI built-in library","archived":false,"fork":false,"pushed_at":"2024-03-25T18:55:21.000Z","size":25,"stargazers_count":2,"open_issues_count":2,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-16T18:47:31.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protegeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-08-09T03:27:45.000Z","updated_at":"2024-03-25T18:52:08.000Z","dependencies_parsed_at":"2023-04-09T03:00:31.359Z","dependency_job_id":null,"html_url":"https://github.com/protegeproject/swrlapi-builtin-library-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/protegeproject/swrlapi-builtin-library-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protegeproject%2Fswrlapi-builtin-library-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protegeproject%2Fswrlapi-builtin-library-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protegeproject%2Fswrlapi-builtin-library-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protegeproject%2Fswrlapi-builtin-library-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protegeproject","download_url":"https://codeload.github.com/protegeproject/swrlapi-builtin-library-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protegeproject%2Fswrlapi-builtin-library-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T01:25:52.987Z","updated_at":"2026-01-23T01:25:53.582Z","avatar_url":"https://github.com/protegeproject.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWRLAPI Built-in Library Example\n\nThis project provides a minimal example of a project that uses the [SWRLAPI](https://github.com/protegeproject/swrlapi/wiki)'s [Built-in Bridge](https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInBridge)\nto create a [SWRL built-in](https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInFAQ) library. \nIt can be used as a starting point for developers who wish to create their own built-in library.\n\nThis example library defines a single built-in called ```stringsEqual``` that accepts two string argument. \nIt returns ```true``` if both arguments are equal, and ```false``` otherwise. \nInstructions for building and installing this library are outlined below.\n\nThe ```./src/main/resources/owl``` directory contains an OWL file called ```StringsBuiltInLibrary.owl```\nthat [defines this built-in](https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInBridge#defining-built-ins-in-owl) so that it can be used by importing ontologies. \nAn example importing ontology called ```StringsBuiltInLibraryUser.owl``` defines a simple SQWRL query that uses the\n```stringsEqual``` built-in to compare two strings.\n\nThis built-in library can be used in two primary ways:\n\n* Interactively, in the [Protégé 5 ontology editor](http://protege.stanford.edu/)\n* In [SWRLAPI](https://github.com/protegeproject/swrlapi/wiki)-based applications\n\n### Using this Built-in Library in Protégé 5.6.2\n\nThe JAR containing the built-in library must first be placed in Protégé's class path so\nthat the built-ins it defines can be resolved.\nA Protégé installation contains a plugin directory that can be used for this purpose.\nThe name of the directory is operating system dependent.\nOn OS X this subdirectory is called ```./Contents/Java/plugins/```.\nSo a complete plugin directory path might be something like ```/Applications/Protege-5.6.2/Protégé.app/Contents/Java/plugins/```.\n\nCopy the JAR to the plugins directory and then open Protégé 5.6.2.\n\nTo run the SQWRL query, open the importing ontology in Protégé.\nIf it is not already enabled, Go to the ```Windows-\u003eTabs``` menu item and select the ```SQWRLTab``` item.\nNavigate to the [SQWRLTab](https://github.com/protegeproject/swrlapi/wiki/SQWRLQueryTab) and select\nand execute the SQWRL query that used the ```stringsEqual``` built-in.\n\n### Using the Built-in Library in a SWRLAPI-based Application\n\nFirst use OWLAPI to create an ontology and load the ontology defining the built-in.\nThe SWRLAPI's [SWRL Rule Engine API](https://github.com/protegeproject/swrlapi/wiki#SWRL_Rule_Engine_API) \nor [SQWRL Query API](https://github.com/protegeproject/swrlapi/wiki#SQWRL_Query_API)\ncan then be used to run rules or queries that make use of this built-in.\n\n### Building and Installing\n\nTo build this library you must have the following items installed:\n\n+ [Java 17](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n+ A tool for checking out a [Git](http://git-scm.com/) repository\n+ Apache's [Maven](http://maven.apache.org/index.html)\n\nGet a copy of the latest code:\n\n    git clone https://github.com/protegeproject/swrlapi-builtin-library-example.git \n\nChange into the ```swrlapi-builtin-library-example``` directory:\n\n    cd swrlapi-builtin-library-example\n\nBuild it with Maven:\n\n    mvn clean install\n\nOn build completion, your local Maven repository will contain generated ```swrlapi-builtin-library-example-${version}.jar```.\nThe ```./target``` directory will also contain this JAR.\n\nAs per the [built-in library installation instructions](https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInBridge#Loading_a_Builtin_Implementation_Class_at_Runtime), \nthis JAR must be available in an application's class path for dynamic runtime resolution.\n\n#### Questions\n\nIf you have questions about this library, please go to the main\nProtégé website and subscribe to the [Protégé Developer Support\nmailing list](http://protege.stanford.edu/support.php#mailingListSupport).\nAfter subscribing, send messages to protege-dev at lists.stanford.edu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotegeproject%2Fswrlapi-builtin-library-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotegeproject%2Fswrlapi-builtin-library-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotegeproject%2Fswrlapi-builtin-library-example/lists"}