de.ispsoft.jaxme.generator.parselets
Class SimpleParseletDecoratorFactory

java.lang.Object
  extended byde.ispsoft.jaxme.generator.decorators.ElementDecoratorFactoryImpl
      extended byde.ispsoft.jaxme.generator.parselets.SimpleParseletDecoratorFactory
All Implemented Interfaces:
ElementDecoratorFactory

public class SimpleParseletDecoratorFactory
extends ElementDecoratorFactoryImpl

A factory for simple elements or attributes.

Author:
Jochen Wiedmann

Constructor Summary
SimpleParseletDecoratorFactory()
          Creates a new instance of SimpleParseletDecoratorFactory
 
Method Summary
 ElementDecorator getElementDecorator(SchemaAnnotationOwner pParent, SchemaElement pSchemaElement, ParserData pParserData, org.w3c.dom.Element pNode)
          Called for creating a new ElementDecorator, which is attached to an element or attribute pSchemaElement.
 java.lang.String getParseletClassName()
          Returns the Parselet class name.
 java.lang.String getParseletPackageName()
          Returns the package name of the generated Parselet class.
 SourceWriter getSourceWriter(Schema pSchema, ParserData pParserData, org.w3c.dom.Element pElement)
          Called for creating a SourceWriter.
 void setParseletClassName(java.lang.String pParseletClassName)
          Sets the Parselet class name.
 void setParseletPackageName(java.lang.String pParseletPackageName)
          Sets the Parselet package name.
 
Methods inherited from class de.ispsoft.jaxme.generator.decorators.ElementDecoratorFactoryImpl
getDecoratorDeclaration, getSourceWriterDeclaration, init, isDecoratorDeclaration, isSourceWriterDeclaration, newDefaultElementDecorator, newElementDecorator, newSourceWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleParseletDecoratorFactory

public SimpleParseletDecoratorFactory()
Creates a new instance of SimpleParseletDecoratorFactory

Method Detail

getParseletClassName

public java.lang.String getParseletClassName()

Returns the Parselet class name.


setParseletClassName

public void setParseletClassName(java.lang.String pParseletClassName)

Sets the Parselet class name.


setParseletPackageName

public void setParseletPackageName(java.lang.String pParseletPackageName)

Sets the Parselet package name.


getParseletPackageName

public java.lang.String getParseletPackageName()

Returns the package name of the generated Parselet class.


getSourceWriter

public SourceWriter getSourceWriter(Schema pSchema,
                                    ParserData pParserData,
                                    org.w3c.dom.Element pElement)

Called for creating a SourceWriter.

Specified by:
getSourceWriter in interface ElementDecoratorFactory
Overrides:
getSourceWriter in class ElementDecoratorFactoryImpl
Returns:
An object implementing SourceWriter or null.

getElementDecorator

public ElementDecorator getElementDecorator(SchemaAnnotationOwner pParent,
                                            SchemaElement pSchemaElement,
                                            ParserData pParserData,
                                            org.w3c.dom.Element pNode)
                                     throws SchemaException

Called for creating a new ElementDecorator, which is attached to an element or attribute pSchemaElement. The ElementDecorator may register decorator specific data to the given pSchemaElement and/or pParserData.

Specified by:
getElementDecorator in interface ElementDecoratorFactory
Overrides:
getElementDecorator in class ElementDecoratorFactoryImpl
Parameters:
pParent - The elements or attributes parent. An instance of Schema, if this is a root element or attribute. Otherwise an instance of SchemaElement.
pSchemaElement - The element or attribute being decorated.
pParserData - An object for storing data that applies recursively.
pNode - The DOM node defining the element or attribute.
Returns:
An element decorator, which shall be attached to the given pSchemaElement or null, if no decorator should be attached.
Throws:
SchemaException