Skip to content
/ scowl Public
forked from phenoscape/scowl

Syntactic sugar for programming with the OWL API in Scala.

License

Notifications You must be signed in to change notification settings

jnguyenx/scowl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scowl

Build Status

Scowl is a Scala library allowing a declarative approach to composing OWL expressions and axioms using the OWL API.

Usage

Build the jar using mvn package, and add to your Scala project. Import org.phenoscape.scowl.OWL._, and Scowl implicit conversions will add pseudo Manchester syntax methods to native OWL API objects.

Examples

val manager = OWLManager.createOWLOntologyManager()
val ontology = manager.createOntology()
val partOf = ObjectProperty("http://example.org/part_of")
val hasPart = ObjectProperty("http://example.org/has_part")
val developsFrom = ObjectProperty("http://example.org/develops_from")
val eye = Class("http://example.org/eye")
val head = Class("http://example.org/head")
val tail = Class("http://example.org/tail")
manager.addAxiom(ontology, eye SubClassOf (partOf some head))
manager.addAxiom(ontology, eye SubClassOf (not (partOf some tail)))
ontology.getClassesInSignature(true).map (c => 
  (not (hasPart some c)) SubClassOf (not (hasPart some (developsFrom some c)))
  ) foreach (manager.addAxiom(ontology, _))

License

Scowl is open source under the MIT License. See LICENSE for more information.

About

Syntactic sugar for programming with the OWL API in Scala.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%