org.jibx.schema.plugin
Class BaseJibxProjectBuilder

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo
          extended by org.jibx.schema.plugin.BaseJibxProjectBuilder
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
Catalog2JibxProjects, GenerateJibxProject

public abstract class BaseJibxProjectBuilder
extends org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo

Runs the open-oasis catalog to schema-library plugin.

Author:
Don Corley

Field Summary
static String STRING_ENCODING
           
static String URL_ENCODING
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
BaseJibxProjectBuilder()
           
 
Method Summary
 void execute()
          Run
 Object getBindingFromStream(Class<?> bindingClass, InputStream inStream)
          Read the template into the model.
 String schemaLocationToPackage(String schemaLocation, StringBuilder sbGroupId)
          Calculate the groupId and artifactId.
 String stringToPackageName(String packageName)
          Make this string a valid package name.
 boolean writeThisModel(Model message, OutputStream out)
          Write this model to this outstream.
 void writeThisModel(String artifactId, Model model)
          Write this model using this project name.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.ContextEnabled
getPluginContext, setPluginContext
 

Field Detail

URL_ENCODING

public static final String URL_ENCODING
See Also:
Constant Field Values

STRING_ENCODING

public static final String STRING_ENCODING
See Also:
Constant Field Values
Constructor Detail

BaseJibxProjectBuilder

public BaseJibxProjectBuilder()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Run

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

schemaLocationToPackage

public String schemaLocationToPackage(String schemaLocation,
                                      StringBuilder sbGroupId)
Calculate the groupId and artifactId.

Parameters:
schemaLocation -
sbGroupId -
Returns:

stringToPackageName

public String stringToPackageName(String packageName)
Make this string a valid package name.

Parameters:
packageName -
Returns:

getBindingFromStream

public Object getBindingFromStream(Class<?> bindingClass,
                                   InputStream inStream)
Read the template into the model.

Returns:

writeThisModel

public void writeThisModel(String artifactId,
                           Model model)
Write this model using this project name.

Parameters:
artifactId -
model -

writeThisModel

public boolean writeThisModel(Model message,
                              OutputStream out)
Write this model to this outstream.

Parameters:
message -
out -
Returns:


Copyright © 2005-2011 jibx.org. All Rights Reserved.