de.ispsoft.jaxme.generator.parselets
Class ParseletDecoratorImpl

java.lang.Object
  extended byde.ispsoft.jaxme.generator.parselets.ParseletDecoratorImpl
All Implemented Interfaces:
ElementDecorator, ParseletDecorator
Direct Known Subclasses:
ComplexParseletDecorator, NullParseletDecorator, SimpleParseletDecorator

public abstract class ParseletDecoratorImpl
extends java.lang.Object
implements ParseletDecorator

Default implementation of a ParseletDecorator, for deriving subclasses.

Author:
Jochen Wiedmann

Constructor Summary
ParseletDecoratorImpl()
          Creates a new instance of ParseletDecoratorImpl
 
Method Summary
 java.lang.String getNewParseletForParse()
          Returns code that generates a new Parselet instance for parsing.
 java.lang.String getNewParseletForSerialize()
          Returns code that generates a new Parselet instance for serialization.
 java.lang.String getParseletClassName()
          Returns the Parselets class name, without any package.
 java.lang.String getParseletPackageName()
          Returns the Parselets package name.
 java.lang.String getParseletQName()
          Returns the generated parselets fully qualified name, including the package name.
 void init(SchemaAnnotationOwner pParent, SchemaElement pElement, ParserData pParserData, org.w3c.dom.Element pNode)
          Initializes the ParseletDecorator with the settings being read from the various arguments.
 void parseAppInfoNode(SchemaAnnotationOwner pParent, SchemaElement pSchemaElement, ParserData pParserData, org.w3c.dom.Element pNode)
          Does nothing.
 void setParseletClassName(java.lang.String pParseletClassName)
          Sets the generated parselets class name.
 void setParseletPackageName(java.lang.String pParseletPackageName)
          Sets the generated parselets package name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseletDecoratorImpl

public ParseletDecoratorImpl()
Creates a new instance of ParseletDecoratorImpl

Method Detail

parseAppInfoNode

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

Does nothing.

Specified by:
parseAppInfoNode in interface ElementDecorator
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 SchemaElement created by the XsdSchemaReader.
pParserData - The ParserData element created by the XsdSchemaReader; the decorator may use
     pParserData.getDecoratorData(this);
   
to obtain its decorator specific detail object.
pNode - The element being parsed.
Throws:
SchemaException
See Also:
ElementDecorator.parseAppInfoNode(de.ispsoft.jaxme.generator.SchemaAnnotationOwner, de.ispsoft.jaxme.generator.SchemaElement, de.ispsoft.jaxme.generator.parserdata.ParserData, org.w3c.dom.Element)

setParseletClassName

public void setParseletClassName(java.lang.String pParseletClassName)

Sets the generated parselets class name.


setParseletPackageName

public void setParseletPackageName(java.lang.String pParseletPackageName)

Sets the generated parselets package name.


getParseletQName

public java.lang.String getParseletQName()

Returns the generated parselets fully qualified name, including the package name.


getNewParseletForParse

public java.lang.String getNewParseletForParse()

Returns code that generates a new Parselet instance for parsing.

Specified by:
getNewParseletForParse in interface ParseletDecorator
Returns:
Java source or null to omit parsing the element.

getNewParseletForSerialize

public java.lang.String getNewParseletForSerialize()

Returns code that generates a new Parselet instance for serialization.

Specified by:
getNewParseletForSerialize in interface ParseletDecorator
Returns:
Java source or null to omit serializing the element.

getParseletClassName

public java.lang.String getParseletClassName()

Returns the Parselets class name, without any package.

Specified by:
getParseletClassName in interface ParseletDecorator

getParseletPackageName

public java.lang.String getParseletPackageName()

Returns the Parselets package name.

Specified by:
getParseletPackageName in interface ParseletDecorator

init

public void init(SchemaAnnotationOwner pParent,
                 SchemaElement pElement,
                 ParserData pParserData,
                 org.w3c.dom.Element pNode)
          throws SchemaException

Initializes the ParseletDecorator with the settings being read from the various arguments.

Specified by:
init in interface ParseletDecorator
Throws:
SchemaException