Views

TOOLBOX

LANGUAGES

SpecGen

From Morfeo Wiki

Jump to: navigation, search

SpecGen v5, ontology specification generator tool. It's written in Python using Redland RDF library and licensed under the MIT license. It fulfills the need of SIOC, MyMobileWeb and others to generate specifications of ontologies developed.

Contents

Previous versions of SpecGen

This version 5 is a hack made by CTIC Foundation over the previous versions of the script:

ChangeLog

There are some changes in this version:

  • added many blanknodes verifications
  • dynamically namespaces and base uri
  • many accessibility improvements on the generated markup
  • soft-coded all variables
  • automatically save
  • many refactorings
  • implemented the capability to extract complex ranges/domains
  • added a Makefile to install the script
  • optional documentation of ontology instances
  • ...

Development

The project is hosted by Morfeo.

SCM

We use a public subversion repository, so you can make an anonymous checkout of it:

$ svn checkout https://svn.forge.morfeo-project.org/svn/specgen/trunk SpecGen

Tracker

Please, use the tracker to report bugs or feature requests.

Bugs

  • #104: Codification problems in SpecGen
  • #110: Support for Annotation Properties in SpecGen
  • #114: Drop external classes/properties
  • #115: Migrate SpecGen to the new project
  • #833: Crash generating a specification of an ontology with blank nodes instances
  • #834: Problems in SpecGen with some versions of Python and Redland
  • #874: Duplicated classes when the ontology has internal inheritance
  • #882: Malformed XHTML with empty domain or range
  • more...

Feature requests

  • #835: SpecGen graphical front-end
  • #853: Web Service
  • #876: Make optional the ontology prefix
  • #877: Take all namespaces from the source
  • #878: Properties' cardinality
  • #879: Classes' restrictions
  • #880: Classes's disjoints
  • #881: Add subproperty documentation
  • more...

Roadmap

  • Publish a stable release of v5, and start the development of v6 with major (and probably not back- compatible) changes.
  • Refactor some parts of the code (switch to OOP?).
  • Switch to a more sophisticated template engine (such as http://www.cheetahtemplate.org/).
  • Improve shell interface (switch to optparse).
  • Better encoding management.

Download

Dependencies

  • Python interpreter (python>=2.4)
  • Python bindings for the Redland RDF library (python-librdf>=1.0)

Subversion

As you read before, you can make a checkout of our repository.

Individual files

Documentation

Template

It uses a very simple template engine. You can use it over any HTML template. The template only must have two sections with %s where SpecGen will write the information extracted from the ontology.

There are some templates available as example:

Usage

The first thing that you need to make is customize a template, adding of information relevant for the lecture of the specification.

Basic usage

You can run SpecGen without install it:

$ python specgen.py ontology prefix template destination [flags]

available flags:

  • -i: add instances on the specification (disabled by default)

Usage example:

$ python specgen.py example.owl ex template.html example.html -i

Installation

But you can also install SpecGen in you computer using Makefile provided:

$ sudo make install

And then is easier to run it form any directory without using long path:

$ specgen example.owl ex template.html example.html

Obviously you can uninstall it when you want:

$ sudo make uninstall


Related links

Related projects

Ontologies using SpecGen

Contact

Please, send any comment to the project's mailing list.