de.ispsoft.jaxme.generator.parselets
Class ParseletDecoratorFactory

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

public class ParseletDecoratorFactory
extends ElementDecoratorFactoryImpl

Default implementation of ParseletGeneratorFactory.

Author:
Jochen Wiedmann

Field Summary
static java.lang.String PARSELET_SCHEMA_URI
          The Parselet namespace
 
Constructor Summary
ParseletDecoratorFactory()
          Creates a new instance of ParseletDecoratorFactory.
 
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.
 SourceWriter getSourceWriter(Schema pSchema, ParserData pParserData, org.w3c.dom.Element pSchemaNode)
          Called for creating a SourceWriter.
 void init(Schema pSchema, org.w3c.dom.Element pSchemaNode, ParserData pParserData, org.w3c.dom.Element pFactoryNode)
          Initializes the ParseletDecoratorFactory.
 
Methods inherited from class de.ispsoft.jaxme.generator.decorators.ElementDecoratorFactoryImpl
getDecoratorDeclaration, getSourceWriterDeclaration, isDecoratorDeclaration, isSourceWriterDeclaration, newDefaultElementDecorator, newElementDecorator, newSourceWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSELET_SCHEMA_URI

public static final java.lang.String PARSELET_SCHEMA_URI

The Parselet namespace

See Also:
Constant Field Values
Constructor Detail

ParseletDecoratorFactory

public ParseletDecoratorFactory()

Creates a new instance of ParseletDecoratorFactory.

Method Detail

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

getSourceWriter

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

Called for creating a SourceWriter.

Specified by:
getSourceWriter in interface ElementDecoratorFactory
Overrides:
getSourceWriter in class ElementDecoratorFactoryImpl
Returns:
An instance of ParseletWriter.

init

public void init(Schema pSchema,
                 org.w3c.dom.Element pSchemaNode,
                 ParserData pParserData,
                 org.w3c.dom.Element pFactoryNode)
          throws SchemaException

Initializes the ParseletDecoratorFactory.

Specified by:
init in interface ElementDecoratorFactory
Overrides:
init in class ElementDecoratorFactoryImpl
Parameters:
pSchema - The schema being read.
pSchemaNode - The schema's DOM node
pParserData - For storing data that applies recursively.
pFactoryNode - The factories DOM node
Throws:
SchemaException