org.nuiton.eugene.plugin.writer
Class XmiChainedFileWriter

java.lang.Object
  extended by org.nuiton.eugene.writer.AbstractChainedFileWriter
      extended by org.nuiton.eugene.plugin.writer.BaseChainedFileWriter
          extended by org.nuiton.eugene.plugin.writer.XmiChainedFileWriter
All Implemented Interfaces:
ChainedFileWriter

public class XmiChainedFileWriter
extends BaseChainedFileWriter

Implentation pour les writer to type xmi (qui transforme du xmi via xsl vers du model).

Since:
2.0.0
Author:
tchemit
Plexus component:
role:
"org.nuiton.eugene.writer.ChainedFileWriter"
role-hint:
"xmi"

Nested Class Summary
protected  class XmiChainedFileWriter.XmiVersionHandler
          Sax handler to find xmi version into xmi document.
 
Field Summary
static String PROP_EXTRACTED_PACKAGES
           
static String PROP_FULL_PACKAGE_PATH
           
static String PROP_RESOLVER
           
protected  TransformerFactory transformerFactory
           
 
Fields inherited from class org.nuiton.eugene.writer.AbstractChainedFileWriter
authorizedPropertyDescriptions, entries, nextWriter, previousWriter, properties
 
Constructor Summary
XmiChainedFileWriter()
           
 
Method Summary
 boolean acceptInclude(String include)
           
 boolean acceptModel(String modelType)
           
protected  boolean actionXsl(ChainedFileWriterConfiguration configuration, File outputDirectory, File inputDirectory, File file)
           
 void generate(ChainedFileWriterConfiguration configuration, File outputDirectory, Map<File,List<File>> filesByRoot, Map<File,List<File>> resourcesByFile)
           
 String getDefaultIncludes()
           
 String getDefaultInputDirectory()
           
 String getDefaultOutputDirectory()
           
 String getDefaultTestInputDirectory()
           
 String getDefaultTestOutputDirectory()
           
 String getExtractedPackages()
           
 String getFullPackagePath()
           
 String getInputProtocol()
           
 String getOutputProtocol(String modelType)
           
 String getResolver()
           
protected  String getStyleSheet(String modelType, File model)
           
protected  TransformerFactory getTransformerFactory()
           
protected  URIResolver getUriResolver(ChainedFileWriterConfiguration configuration, File model)
           
protected  String getXmiVersion(File xmiFile)
          Try to find xmi version on a file.
 
Methods inherited from class org.nuiton.eugene.plugin.writer.BaseChainedFileWriter
acceptObjectModelOrStateModel, copyResources, getFiles, getLog, getResources, initWriter, setLog
 
Methods inherited from class org.nuiton.eugene.writer.AbstractChainedFileWriter
addEntry, clear, generate, getAuthorizedPropertyDescriptions, getAuthorizedPropertyNames, getEntries, getExtractDirectory, getInputProtocol, getNextWriter, getOutputDirectory, getPreviousWriter, getProperty, getWriterReport, setNextWriter, setWriterReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_RESOLVER

public static final String PROP_RESOLVER
See Also:
Constant Field Values

PROP_FULL_PACKAGE_PATH

public static final String PROP_FULL_PACKAGE_PATH
See Also:
Constant Field Values

PROP_EXTRACTED_PACKAGES

public static final String PROP_EXTRACTED_PACKAGES
See Also:
Constant Field Values

transformerFactory

protected TransformerFactory transformerFactory
Constructor Detail

XmiChainedFileWriter

public XmiChainedFileWriter()
Method Detail

acceptModel

public boolean acceptModel(String modelType)

getInputProtocol

public String getInputProtocol()

getOutputProtocol

public String getOutputProtocol(String modelType)

acceptInclude

public boolean acceptInclude(String include)

getDefaultIncludes

public String getDefaultIncludes()

getDefaultInputDirectory

public String getDefaultInputDirectory()

getDefaultOutputDirectory

public String getDefaultOutputDirectory()

getDefaultTestInputDirectory

public String getDefaultTestInputDirectory()

getDefaultTestOutputDirectory

public String getDefaultTestOutputDirectory()

getTransformerFactory

protected TransformerFactory getTransformerFactory()

getFullPackagePath

public String getFullPackagePath()

getExtractedPackages

public String getExtractedPackages()

getResolver

public String getResolver()

generate

public void generate(ChainedFileWriterConfiguration configuration,
                     File outputDirectory,
                     Map<File,List<File>> filesByRoot,
                     Map<File,List<File>> resourcesByFile)
              throws IOException
Specified by:
generate in class AbstractChainedFileWriter
Throws:
IOException

actionXsl

protected boolean actionXsl(ChainedFileWriterConfiguration configuration,
                            File outputDirectory,
                            File inputDirectory,
                            File file)
                     throws IOException
Throws:
IOException

getUriResolver

protected URIResolver getUriResolver(ChainedFileWriterConfiguration configuration,
                                     File model)

getStyleSheet

protected String getStyleSheet(String modelType,
                               File model)

getXmiVersion

protected String getXmiVersion(File xmiFile)
Try to find xmi version on a file.

Parameters:
xmiFile - file to inspect
Returns:
version or null if version can't have been found


Copyright © 2006-2011 CodeLutin. All Rights Reserved.