Package org.jibx.schema.generator
Class SchemaGenCommandLine
- java.lang.Object
-
- org.jibx.custom.CustomizationCommandLineBase
-
- org.jibx.custom.classes.ClassCustomizationBase
-
- org.jibx.schema.generator.SchemaGenCommandLine
-
- Direct Known Subclasses:
BindGenCommandLine,WsdlGeneratorCommandLine
public class SchemaGenCommandLine extends ClassCustomizationBase
Command line processing specifically for theSchemaGenclass. TODO: Split this into abstract base class which the existing subclasdses can extend directly, plus separate subclass- Author:
- Dennis M. Sosnoski
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jibx.custom.CustomizationCommandLineBase
CustomizationCommandLineBase.ArgList
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]EXTRA_USAGE_LINESOrdered array of extra usage lines.private GlobalCustomm_globalCustomizations model root.private IClassLocatorm_locatorClass locator used to complete customizations.private java.util.Mapm_uriNamesNamespace URI to file name map.-
Fields inherited from class org.jibx.custom.CustomizationCommandLineBase
STRING_PARAMETER_ARRAY, STRING_UNMARSHALLER_PARAMETER_ARRAY
-
-
Constructor Summary
Constructors Modifier Constructor Description SchemaGenCommandLine()Constructor for when class is used directly.protectedSchemaGenCommandLine(java.lang.String[] lines)Constructor used by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanaddUriNamePair(java.lang.String text)Add uri=name pair to map.protected java.util.MapapplyOverrides(java.util.Map overmap)Apply map of override values to customizations read from file or created as default.protected booleancheckParameter(CustomizationCommandLineBase.ArgList alist)Check if an extension parameter is recognized.GlobalCustomgetGlobal()Get customizations model root.IClassLocatorgetLocator()Get class locator.java.util.MapgetUriNames()Get schema namespace URI to name map.protected voidloadCustomizations(java.lang.String path, IClassLocator loc, ValidationContext vctx)Load the customizations file.voidprintUsage()Print usage information.protected voidsetLocator(IClassLocator locator)Set class locator.-
Methods inherited from class org.jibx.custom.classes.ClassCustomizationBase
finishParameters, loadCustomizations, splitItems, verboseDetails
-
Methods inherited from class org.jibx.custom.CustomizationCommandLineBase
getExtraArgs, getGeneratePath, getUsageLines, isVerbose, mergeUsageLines, processArgs, putKeyValue
-
-
-
-
Field Detail
-
EXTRA_USAGE_LINES
private static final java.lang.String[] EXTRA_USAGE_LINES
Ordered array of extra usage lines.
-
m_global
private GlobalCustom m_global
Customizations model root.
-
m_uriNames
private java.util.Map m_uriNames
Namespace URI to file name map.
-
m_locator
private IClassLocator m_locator
Class locator used to complete customizations.
-
-
Method Detail
-
getLocator
public IClassLocator getLocator()
Get class locator.- Returns:
- locator
-
setLocator
protected void setLocator(IClassLocator locator)
Set class locator.- Parameters:
locator-
-
getGlobal
public GlobalCustom getGlobal()
Get customizations model root.- Returns:
- customizations
-
getUriNames
public java.util.Map getUriNames()
Get schema namespace URI to name map.- Returns:
- map
-
addUriNamePair
private boolean addUriNamePair(java.lang.String text)
Add uri=name pair to map.- Parameters:
text-- Returns:
trueif valid,falseif not
-
checkParameter
protected boolean checkParameter(CustomizationCommandLineBase.ArgList alist)
Description copied from class:ClassCustomizationBaseCheck if an extension parameter is recognized. Subclasses which override this method should call the base class method before doing their own checks, and only perform their own checks if this method returnsfalse..- Overrides:
checkParameterin classClassCustomizationBase- Parameters:
alist- argument list- Returns:
trueif parameter processed,falseif unknown
-
loadCustomizations
protected void loadCustomizations(java.lang.String path, IClassLocator loc, ValidationContext vctx) throws JiBXException, java.io.IOExceptionDescription copied from class:ClassCustomizationBaseLoad the customizations file. This method must load the specified customizations file, or create a default customizations instance, of the appropriate type.- Specified by:
loadCustomizationsin classClassCustomizationBase- Parameters:
path- customizations file path,nullif noneloc- class locatorvctx- validation context- Throws:
JiBXExceptionjava.io.IOException
-
applyOverrides
protected java.util.Map applyOverrides(java.util.Map overmap)
Description copied from class:CustomizationCommandLineBaseApply map of override values to customizations read from file or created as default.- Specified by:
applyOverridesin classCustomizationCommandLineBase- Parameters:
overmap- override key-value map- Returns:
- map for key/values not recognized
-
printUsage
public void printUsage()
Description copied from class:CustomizationCommandLineBasePrint usage information.- Specified by:
printUsagein classCustomizationCommandLineBase
-
-