Class OwlDoc
In: vocdoc.rb
Parent: Object

This is the main class of VocDoc, and will be instantiated once every time the programme is run.

Methods

Constants

VERSION = '0.0.1'
LATEX = 'latex'
HTML = 'html'
DOT = 'dot'
DEPRECATED = "deprecated"

Attributes

config  [R] 
options  [R] 

Public Class methods

read options from configuration file, and the Redland parser and model to be set up.

Public Instance methods

Parse options, check arguments, then process the command

Protected Instance methods

True if required arguments were provided

changes all quotes in text to correct LaTeX quotes (`’)

Transforms a string into code format. The actual return value of this method depends on which output format was set in the command line arguments (e.g. html or latex).

escapes characters which are reserved in LaTeX syntax (e.g. ‘_’)

transforms an array of "prefix:name" strings, using the methods codify and linkify. Terms in the ontology namespace will be hyperlinked, external terms won‘t. TODO: External terms should be linked as well.

Generates a hyperlink within the documentation based on the input string. The actual return value of this method depends on which output format was set in the command line arguments (e.g. html or latex).

Parses the owl file into Ruby objects such as OWL_Resource or FOAF_Agent

parses the prefix definitions from the ontology source TODO: currently only works with Turtle syntax, should implement other syntaxes as well (especially rdf/xml).

Setup the arguments

Performs post-parse processing on options

Generates dot files of the class hierarchy and the properties

Generates complete documentation in one big HTML file "ontology.html".

Generate the HTML output for an individual class.

Generate the HTML output for an individual.

Generate the HTML output for an individual property.

Generates documentation in LaTeX syntax (only class and property lists, no general documentation), which will be written into the file "classes.tex" and "properties.tex" in the output folder specified in the command line arguments. The LaTeX files cannot be compiled on their own, but need to be included in another LaTeX document.

removes the extension from a filename

removes underscores from text

strip xml tags for latex output

[Validate]