com.bbn.swede.tools.codegenerator
Class VocabularyGenerator

java.lang.Object
  extended bycom.bbn.swede.tools.codegenerator.AbstractCodeGenerator
      extended bycom.bbn.swede.tools.codegenerator.VocabularyGenerator

public class VocabularyGenerator
extends AbstractCodeGenerator

Generates Schemagen vocabularies for OWL documents. Generated vocabulary classes will be placed in the vocab package with a class name that matches the ontology's file name, converted to a valid Java identifier (i.e. my-ont.owl becomes the my_ont).


Field Summary
 
Fields inherited from class com.bbn.swede.tools.codegenerator.AbstractCodeGenerator
_sDisplayName, _sID
 
Constructor Summary
VocabularyGenerator()
           
 
Method Summary
 void configureProject(IProject project)
          Implement configureProject to perform any setup operations that must be completed before generated code will be usable (i.e.
 IPath performGeneration(IOWLDocument document, IProject project, IProgressMonitor monitor)
          Runs the code generator for the given OWL document and project.
 
Methods inherited from class com.bbn.swede.tools.codegenerator.AbstractCodeGenerator
checkExisting, generate, getDisplayName, getID, runGeneration, setDisplayName, setID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VocabularyGenerator

public VocabularyGenerator()
Method Detail

configureProject

public void configureProject(IProject project)
Description copied from class: AbstractCodeGenerator
Implement configureProject to perform any setup operations that must be completed before generated code will be usable (i.e. adding natures, classpath setup, etc.)

Specified by:
configureProject in class AbstractCodeGenerator
Parameters:
project - The project that will contain the generated code

performGeneration

public IPath performGeneration(IOWLDocument document,
                               IProject project,
                               IProgressMonitor monitor)
                        throws CoreException,
                               InterruptedException
Description copied from class: AbstractCodeGenerator
Runs the code generator for the given OWL document and project.

Specified by:
performGeneration in class AbstractCodeGenerator
Parameters:
document - The OWL document for which to generate code
project - The project that generated files should be added to
monitor - A progress monitor to update as work is done, or null.
Returns:
a project-relative path for the generated file. If multiple files are generated, the path may refer to a directory which contains the generated files.
Throws:
InterruptedException - if generation is cancelled by the user
CoreException


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.