org.nuiton.wikitty.generator
Class WikittyPurifierTransformer

java.lang.Object
  extended by org.nuiton.eugene.Template<I>
      extended by org.nuiton.eugene.Transformer<org.nuiton.eugene.models.object.ObjectModel,O>
          extended by org.nuiton.eugene.models.object.ObjectModelTransformer<org.nuiton.eugene.models.object.ObjectModel>
              extended by org.nuiton.wikitty.generator.WikittyPurifierTransformer
All Implemented Interfaces:
org.nuiton.eugene.TemplateConfiguration

public class WikittyPurifierTransformer
extends org.nuiton.eugene.models.object.ObjectModelTransformer<org.nuiton.eugene.models.object.ObjectModel>

This transformer read the original user model and generate the intermediate model needed by generators. Currently: - manage name collision for attributes or methods inherited from two different classes


Field Summary
protected  org.nuiton.eugene.models.object.ObjectModelBuilder builder
          Generated model builder.
protected  Map<org.nuiton.eugene.models.object.ObjectModelClass,List<String>> namesUsedByClass
          for a given class, store all the names used by this class and subClasses
protected  List<org.nuiton.eugene.models.object.ObjectModelClass> processedClasses
          class of the original model that are already processed
 
Fields inherited from class org.nuiton.eugene.Transformer
outputModel, outputProperties, outputTemplate, previousTransformer
 
Fields inherited from class org.nuiton.eugene.Template
configuration, excludeTemplates, generatedPackages, model
 
Fields inherited from interface org.nuiton.eugene.TemplateConfiguration
PROP_CLASS_LOADER, PROP_DEFAULT_PACKAGE, PROP_ENCODING, PROP_EXCLUDE_TEMPLATES, PROP_GENERATED_PACKAGES, PROP_LAST_MODIFIED_SOURCE, PROP_OVERWRITE, PROP_VERBOSE, PROP_WRITER_REPORT
 
Constructor Summary
WikittyPurifierTransformer()
           
 
Method Summary
protected  org.nuiton.eugene.models.object.ObjectModelAttribute cloneAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute source, org.nuiton.eugene.models.object.ObjectModelClassifier destination, boolean cloneDocumentation, org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelClass cloneClass(org.nuiton.eugene.models.object.ObjectModelClass source, boolean cloneDocumentation)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelClassifier cloneClassifier(org.nuiton.eugene.models.object.ObjectModelClassifier source, boolean cloneDocumentation)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
protected  void cloneClassifier(org.nuiton.eugene.models.object.ObjectModelClassifier source, org.nuiton.eugene.models.object.ObjectModelClassifier destination, boolean copyDocumentation)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelEnumeration cloneEnumeration(org.nuiton.eugene.models.object.ObjectModelEnumeration source, boolean cloneDocumentation)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelInterface cloneInterface(org.nuiton.eugene.models.object.ObjectModelInterface source, boolean cloneDocumentation)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelOperation cloneOperation(org.nuiton.eugene.models.object.ObjectModelOperation source, org.nuiton.eugene.models.object.ObjectModelClassifier destination, boolean cloneDocumentation, org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
 org.nuiton.eugene.models.object.ObjectModelOperation cloneOperationSignature(org.nuiton.eugene.models.object.ObjectModelOperation source, org.nuiton.eugene.models.object.ObjectModelClassifier destination, boolean cloneDocumentation, org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
protected  void cloneStereotypes(org.nuiton.eugene.models.object.ObjectModelClassifier source, org.nuiton.eugene.models.object.ObjectModelClassifier destination)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
protected  void cloneTagValues(org.nuiton.eugene.models.object.ObjectModelElement source, org.nuiton.eugene.models.object.ObjectModelElement destination)
          Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer
protected  void debugOutputModel()
           
protected  org.nuiton.eugene.models.object.ObjectModel initOutputModel()
           
protected  org.nuiton.eugene.Template<org.nuiton.eugene.models.object.ObjectModel> initOutputTemplate()
           
protected  void processClass(org.nuiton.eugene.models.object.ObjectModel model, org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
 void transformFromModel(org.nuiton.eugene.models.object.ObjectModel model)
           
 
Methods inherited from class org.nuiton.eugene.models.object.ObjectModelTransformer
transform, transformFromClass, transformFromClassifier, transformFromElement, transformFromEnumeration, transformFromInterface
 
Methods inherited from class org.nuiton.eugene.Transformer
applyTemplate, getOutputModel, getOutputProperties, getOutputTemplate, init, initPreviousTransformer, transform
 
Methods inherited from class org.nuiton.eugene.Template
getClassLoader, getConfiguration, getEncoding, getExcludeTemplates, getGeneratedPackages, getLastModifiedSource, getModel, getOverwrite, getProperties, getProperty, getProperty, getWriterReport, isOverwrite, isVerbose, setConfiguration, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namesUsedByClass

protected Map<org.nuiton.eugene.models.object.ObjectModelClass,List<String>> namesUsedByClass
for a given class, store all the names used by this class and subClasses


processedClasses

protected List<org.nuiton.eugene.models.object.ObjectModelClass> processedClasses
class of the original model that are already processed


builder

protected org.nuiton.eugene.models.object.ObjectModelBuilder builder
Generated model builder.

Constructor Detail

WikittyPurifierTransformer

public WikittyPurifierTransformer()
Method Detail

processClass

protected void processClass(org.nuiton.eugene.models.object.ObjectModel model,
                            org.nuiton.eugene.models.object.ObjectModelClass clazz)

transformFromModel

public void transformFromModel(org.nuiton.eugene.models.object.ObjectModel model)
Overrides:
transformFromModel in class org.nuiton.eugene.models.object.ObjectModelTransformer<org.nuiton.eugene.models.object.ObjectModel>

initOutputTemplate

protected org.nuiton.eugene.Template<org.nuiton.eugene.models.object.ObjectModel> initOutputTemplate()
Specified by:
initOutputTemplate in class org.nuiton.eugene.Transformer<org.nuiton.eugene.models.object.ObjectModel,org.nuiton.eugene.models.object.ObjectModel>

debugOutputModel

protected void debugOutputModel()
Specified by:
debugOutputModel in class org.nuiton.eugene.models.object.ObjectModelTransformer<org.nuiton.eugene.models.object.ObjectModel>

initOutputModel

protected org.nuiton.eugene.models.object.ObjectModel initOutputModel()
Specified by:
initOutputModel in class org.nuiton.eugene.Transformer<org.nuiton.eugene.models.object.ObjectModel,org.nuiton.eugene.models.object.ObjectModel>

cloneClass

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelClass cloneClass(org.nuiton.eugene.models.object.ObjectModelClass source,
                                                                              boolean cloneDocumentation)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

creates a clone of the given source class in the output model and clones attributes, inheritance declarations and operations into the clone

Parameters:
source - the class to clone from the source model
cloneDocumentation - flag to add documentation if some found in model
Returns:
the clone of the given class

cloneClassifier

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelClassifier cloneClassifier(org.nuiton.eugene.models.object.ObjectModelClassifier source,
                                                                                        boolean cloneDocumentation)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

creates a clone of the given source classifier in the output model and clones attributes, inheritance declaration and operations class-specific, enumeration-specific and interface-specific features of the given classifier will be present in the clone

Parameters:
source - the classifier to clone from the source model
cloneDocumentation - flag to add documentation if some found in model
Returns:
the clone of the given classifier

cloneInterface

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelInterface cloneInterface(org.nuiton.eugene.models.object.ObjectModelInterface source,
                                                                                      boolean cloneDocumentation)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

creates a clone of the given source interface in the output model and clones attributes, inheritance declaration and operations into the clone

Parameters:
source - the interface to clone from the source model
cloneDocumentation - flag to add documentation if some found in model
Returns:
the clone of the given interface

cloneEnumeration

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelEnumeration cloneEnumeration(org.nuiton.eugene.models.object.ObjectModelEnumeration source,
                                                                                          boolean cloneDocumentation)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

creates a clone of the given source enumeration in the output model and clones attributes, inheritance declaration, operations and literals into the clone

Parameters:
source - the enumeration to clone from the source model
cloneDocumentation - flag to add documentation if some found in model
Returns:
the clone of the given enumeration

cloneClassifier

@Deprecated
protected void cloneClassifier(org.nuiton.eugene.models.object.ObjectModelClassifier source,
                                          org.nuiton.eugene.models.object.ObjectModelClassifier destination,
                                          boolean copyDocumentation)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

copy attributes, interfaces declaration and operation of a given classifier into another classifier. class-specific, enumeration-specific and interface-specific features of the given classifier will not be present in the clone. To copy those specific elements, use cloneClassifier(ObjectModelClassifier, boolean)

Parameters:
source - the classifier to clone from the source model
destination - where to clone the given source one
copyDocumentation - flag to add documentation if some found in model

cloneOperation

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelOperation cloneOperation(org.nuiton.eugene.models.object.ObjectModelOperation source,
                                                                                      org.nuiton.eugene.models.object.ObjectModelClassifier destination,
                                                                                      boolean cloneDocumentation,
                                                                                      org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

Clone the source operation into the destination classifier. whole signature, tagValues and body code will be cloned. You can specify modifiers for the result operation.

Parameters:
source - operation to clone
destination - classifier where result operation will be added
cloneDocumentation - flag to add documentation if some found in model
modifiers - extra modifiers
Returns:
the new operation created in destination classifier

cloneTagValues

@Deprecated
protected void cloneTagValues(org.nuiton.eugene.models.object.ObjectModelElement source,
                                         org.nuiton.eugene.models.object.ObjectModelElement destination)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

Copy all tag values for the given source to the given destination.

Parameters:
source - the source element
destination - the destination element

cloneStereotypes

@Deprecated
protected void cloneStereotypes(org.nuiton.eugene.models.object.ObjectModelClassifier source,
                                           org.nuiton.eugene.models.object.ObjectModelClassifier destination)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

Parameters:
source -
destination -

cloneOperationSignature

@Deprecated
public org.nuiton.eugene.models.object.ObjectModelOperation cloneOperationSignature(org.nuiton.eugene.models.object.ObjectModelOperation source,
                                                                                               org.nuiton.eugene.models.object.ObjectModelClassifier destination,
                                                                                               boolean cloneDocumentation,
                                                                                               org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

Clone the source operation into the destination classifier. name, returnType, parameters, exceptions and tagValues will be cloned. You can specify modifiers for the result operation.

Parameters:
source - operation to clone
destination - classifier where result operation will be added
cloneDocumentation - flag to add documentation if some found in model
modifiers - extra modifiers
Returns:
the new operation created in destination classifier

cloneAttribute

@Deprecated
protected org.nuiton.eugene.models.object.ObjectModelAttribute cloneAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute source,
                                                                                         org.nuiton.eugene.models.object.ObjectModelClassifier destination,
                                                                                         boolean cloneDocumentation,
                                                                                         org.nuiton.eugene.models.object.ObjectModelModifier... modifiers)
Deprecated. echatellier 20120106 must be moved to super class : ObjectModelTransformer

clone a given attribute into a classifier of the output model

Parameters:
source - the original attribute
destination - classifier where the clone will be added
cloneDocumentation - flag to add documentation if some found in model
modifiers - extra modifiers
Returns:
the clone attribute


Copyright © 2009-2012 CodeLutin. All Rights Reserved.