org.enhydra.zeus
Interface Generator

All Known Implementing Classes:
SimpleGenerator

public interface Generator

Generator is the portion of Zeus that will convert a set of constraints, visible through a Binding, and output them as generated Java classes (to a Result.

Author:
Brett McLaughlin, Maciej Zawadzki

Method Summary
 void generate(Binding binding)
           This will convert from a set of constraints to Java classes.
 void setIgnoreBinding(java.lang.String xmlName)
           This allows a binding to be ignored.
 void setIgnoreBinding(java.lang.String xmlName, java.lang.String xmlNamespaceURI)
           This allows a binding to be ignored.
 void setOutputDirectory(java.io.File outputDir)
           This sets the output directory to output generated classes to.
 void setOutputDirectory(java.lang.String outputDir)
           This sets the output directory to output generated classes to.
 

Method Detail

setOutputDirectory

public void setOutputDirectory(java.lang.String outputDir)

This sets the output directory to output generated classes to.

Parameters:
outputDir - the name of the base directory where all generated classes should be placed

setOutputDirectory

public void setOutputDirectory(java.io.File outputDir)

This sets the output directory to output generated classes to.

Parameters:
outputDir - the File (directory) where all generated classes should be placed

setIgnoreBinding

public void setIgnoreBinding(java.lang.String xmlName,
                             java.lang.String xmlNamespaceURI)

This allows a binding to be ignored. This is an intermediary step towards allowing binding schemas. The name of the binding should be passed in here, and no property generation for it will occur.

Parameters:
xmlName - the XML local name associated with the binding.
xmlNamespaceURI - the XML namespace URI associated with the binding. The empty string indicates there is no namespace associated with the binding.

setIgnoreBinding

public void setIgnoreBinding(java.lang.String xmlName)

This allows a binding to be ignored. This is an intermediary step towards allowing binding schemas. The name of the binding should be passed in here, and no property generation for it will occur.

This convenience version assumes that the XML name has no namespace URI associated with it, so supplies "" for that value.

Parameters:
xmlName - the XML local name associated with the binding.

generate

public void generate(Binding binding)
              throws java.io.IOException,
                     ZeusException

This will convert from a set of constraints to Java classes. It accesses those constraints through the Binding interface, which provides them in a representation-independent format, and then converts them into Java code.

Parameters:
binder - Binder with ability to convert from constraints to Zeus Bindings.
Throws:
IOException - - when errors in writing to the supplied Result occur.
ZeusException - - when errors in class generation occur.


Copyright © 2002 Enhydra. All Rights Reserved.