org.apache.ws.jaxme.generator
Interface Generator

All Superinterfaces:
PropertySource
All Known Implementing Classes:
GeneratorImpl

public interface Generator
extends PropertySource

The Generator is a frontend for working with the SchemaReaders, SourceWriters and whatever else.

Implementation note: If you update this interface, you should consider updating the following files and classes as well:

Version:
$Id: Generator.java 231697 2003-12-27 22:10:40Z jochen $
Author:
Jochen Wiedmann

Method Summary
 SchemaSG generate(java.io.File pFile)
          Starts the Generator on the given File.
 SchemaSG generate(org.xml.sax.InputSource pSource)
          Starts the Generator on the given Reader.
 SchemaSG generate(java.net.URL pURL)
          Starts the Generator on the given URL.
 org.xml.sax.EntityResolver getEntityResolver()
          Returns the EntityResolver being used to import external schemata.
 java.lang.String getKey()
          Returns a key for getting and setting custom data.
 SchemaReader getSchemaReader()
          Returns the SchemaReader being used.
 java.io.File getTargetDirectory()
          Returns the directory where to create files.
 boolean isForcingOverwrite()
          Returns whether the generator is forcing an overwrite of files.
 boolean isSettingReadOnly()
          Returns whether the generator will create files in read-only mode.
 boolean isValidating()
          Returns whether the generator is using a validating XML schema parser.
 void setEntityResolver(org.xml.sax.EntityResolver pEntityResolver)
          Sets the EntityResolver being used to import external schemata.
 void setForcingOverwrite(boolean pIsForcingOverwrite)
          Sets whether the generator is forcing an overwrite of files.
 void setSchemaReader(SchemaReader pSchemaReader)
          Sets the SchemaReader to use.
 void setSettingReadOnly(boolean pIsSettingReadOnly)
          Sets whether the generator will create files in read-only mode.
 void setTargetDirectory(java.io.File pDirectory)
          Sets the directory where to create files.
 void setValidating(boolean pValidating)
          Sets whether the generator is using a validating XML schema parser.
 
Methods inherited from interface org.apache.ws.jaxme.generator.PropertySource
getProperty, getProperty, setProperty
 

Method Detail

setSchemaReader

void setSchemaReader(SchemaReader pSchemaReader)

Sets the SchemaReader to use.


getSchemaReader

SchemaReader getSchemaReader()

Returns the SchemaReader being used.


setTargetDirectory

void setTargetDirectory(java.io.File pDirectory)

Sets the directory where to create files.


getTargetDirectory

java.io.File getTargetDirectory()

Returns the directory where to create files.


setValidating

void setValidating(boolean pValidating)

Sets whether the generator is using a validating XML schema parser. Defaults to false.


isValidating

boolean isValidating()

Returns whether the generator is using a validating XML schema parser. Defaults to false.


isForcingOverwrite

boolean isForcingOverwrite()

Returns whether the generator is forcing an overwrite of files.


setForcingOverwrite

void setForcingOverwrite(boolean pIsForcingOverwrite)

Sets whether the generator is forcing an overwrite of files.


isSettingReadOnly

boolean isSettingReadOnly()

Returns whether the generator will create files in read-only mode.


setSettingReadOnly

void setSettingReadOnly(boolean pIsSettingReadOnly)

Sets whether the generator will create files in read-only mode.


generate

SchemaSG generate(java.io.File pFile)
                  throws java.lang.Exception

Starts the Generator on the given File.

Throws:
java.lang.Exception

generate

SchemaSG generate(java.net.URL pURL)
                  throws java.lang.Exception

Starts the Generator on the given URL.

Throws:
java.lang.Exception

generate

SchemaSG generate(org.xml.sax.InputSource pSource)
                  throws java.lang.Exception

Starts the Generator on the given Reader.

Parameters:
pSource - A SAX Input Source, with the system ID set, if possible
Throws:
java.lang.Exception

getKey

java.lang.String getKey()

Returns a key for getting and setting custom data.


setEntityResolver

void setEntityResolver(org.xml.sax.EntityResolver pEntityResolver)

Sets the EntityResolver being used to import external schemata.


getEntityResolver

org.xml.sax.EntityResolver getEntityResolver()

Returns the EntityResolver being used to import external schemata.