Summary
Brain helps you to quickly and easily buid OWL ontologies and knowledge bases. It aims at bridging the gap between graphical user interfaces (GUI) such as Protege and the OWL-API.
The library is useful to develop Semantic Web applications and particularly suited for the biomedical domain. Brain wraps the interaction with the OWL-API an relies on Elk for reasoning tasks.
Features
Manchester syntax support
The interaction with Brain is done with the user friendly Manchester syntax. Brain exposes a series of method to help you validate and transform strings of characters into OWL expressions.
Web Application development
Brain has been created for Semantic Web application developers. The library is thread-safe which allows you to handle ontologies in a web server setting.
Scalability
OWL is a very demanding in terms of computing, but thanks to the OWL 2 EL profile, it is possible to thread reasoning some tasks in parallel (Elk reasoner). Brain therefore supports the OWL 2 EL to help you build scalable solutions.
Query
OWL knowledge bases can be easily queried with Brain. Powerful questions can be quickly answered with the help of the Elk reasoner. Brain accepts the formulation of queries from labels as well as from class expressions.
Example of axiom
Natural language: A nucleus is part of some cells.
Description logic: Nucleus ⊆ ∃part-of.Cell
OWL (Manchester syntax): Nucleus subClassOf part-of some Cell
Brain implementation
public static void main(String[] args) throws BrainException {
//You will always need a Brain object
Brain brain = new Brain();
//Add the OWL classes
brain.addClass("Nucleus");
brain.addClass("Cell");
//Add the OWL object property
brain.addObjectProperty("part-of");
//Declare the axiom
brain.subClassOf("Nucleus", "part-of some Cell");
//Query the knowledge-base for indirect subclasses of an expression
List<String> subClasses = brain.getSubClasses("part-of some Cell", false);
//Free the resources used by the reasoner
brain.sleep();
//Save the ontology
brain.save("your/path/to/ontology.owl");
}
Serialised OWL file (Manchester syntax)
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: : <brain#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Ontology: <brain.owl>
ObjectProperty: part-of
Class: owl:Thing
Class: Cell
Class: Nucleus
SubClassOf:
part-of some Cell
Serialised RDF file (Turtle)
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <brain#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <brain.owl> .
<brain.owl> rdf:type owl:Ontology .
:part-of rdf:type owl:ObjectProperty .
:Cell rdf:type owl:Class .
:Nucleus rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :part-of ;
owl:someValuesFrom :Cell
] .
owl:Thing rdf:type owl:Class .