Class CodeGenCommandLine

java.lang.Object
org.jibx.custom.CustomizationCommandLineBase
org.jibx.schema.codegen.CodeGenCommandLine

public class CodeGenCommandLine extends CustomizationCommandLineBase
Command line processing specifically for the CodeGen class.
Author:
Dennis M. Sosnoski
  • Field Details

    • s_logger

      private static final Logger s_logger
      Logger for class.
    • EXTRA_USAGE_LINES

      private static final String[] EXTRA_USAGE_LINES
      Ordered array of extra usage lines.
    • m_nonamespacePackage

      private String m_nonamespacePackage
      Default package for no-namespace schemas.
    • m_defaultPackage

      private String m_defaultPackage
      Default package for all schemas.
    • m_rootPath

      private String m_rootPath
      Schema root path.
    • m_bindingName

      private String m_bindingName
      Name used for root binding.
    • m_usingNamespace

      private String m_usingNamespace
      Namespace to be used for no-namespace schemas generated directly.
    • m_schemaRoot

      private URL m_schemaRoot
      Root URL for schemas.
    • m_schemaDir

      private File m_schemaDir
      Root directory for schemas (null if not a file system root).
    • m_modelFile

      private File m_modelFile
      File for dumping the generated class structure (null if none).
    • m_differenceFile

      private File m_differenceFile
      File for checking differences in generated class structure (null if none).
    • m_customRoot

      private SchemasetCustom m_customRoot
      Customizations model root.
    • m_includePaths

      private List m_includePaths
      List of existing bindings to be included and used for matching schema definitions.
  • Constructor Details

    • CodeGenCommandLine

      public CodeGenCommandLine()
      Constructor.
  • Method Details

    • getSchemaRoot

      public URL getSchemaRoot()
      Get root URL for schemas.
      Returns:
      directory
    • getSchemaDir

      public File getSchemaDir()
      Get root directory for schemas.
      Returns:
      directory (null if root is not a directory)
    • getBindingName

      public String getBindingName()
      Get binding name.
      Returns:
      name (null if not set)
    • getUsingNamespace

      public String getUsingNamespace()
      Get namespace to be used when no schemas with namespaces are being generated.
      Returns:
      namespace URI (null if unspecified)
    • getCustomRoot

      public SchemasetCustom getCustomRoot()
      Get customizations model root.
      Returns:
      customizations
    • getNonamespacePackage

      public String getNonamespacePackage()
      Get default package for no-namespace schemas.
      Returns:
      package (null if not set)
    • getModelFile

      public File getModelFile()
      Get file to be used for dumping generated data model.
      Returns:
      dump file (null if none)
    • getDifferenceFile

      public File getDifferenceFile()
      Get file to be used for finding differences in generated data model.
      Returns:
      difference file (null if none)
    • getIncludePaths

      public List getIncludePaths()
      Get the list of paths for bindings to be used for matching schema definitions.
      Returns:
      paths (empty if no paths specified)
    • checkParameter

      protected boolean checkParameter(CustomizationCommandLineBase.ArgList alist)
      Description copied from class: CustomizationCommandLineBase
      Check extension parameter. This method may be overridden by subclasses to process parameters beyond those known to this base class.
      Overrides:
      checkParameter in class CustomizationCommandLineBase
      Parameters:
      alist - argument list
      Returns:
      true if parameter processed, false if unknown
    • finishParameters

      protected void finishParameters(CustomizationCommandLineBase.ArgList alist)
      Finish processing of command line parameters. This just sets up the schema directory.
      Overrides:
      finishParameters in class CustomizationCommandLineBase
      Parameters:
      alist -
    • loadCustomizations

      protected boolean loadCustomizations(String path) throws JiBXException, IOException
      Load the customizations file. This method must load the specified customizations file, or create a default customizations instance, of the appropriate type.
      Specified by:
      loadCustomizations in class CustomizationCommandLineBase
      Parameters:
      path - customization file path
      Returns:
      true if successful, false if an error
      Throws:
      JiBXException
      IOException
    • applyOverrides

      protected Map applyOverrides(Map overmap)
      Description copied from class: CustomizationCommandLineBase
      Apply map of override values to customizations read from file or created as default.
      Specified by:
      applyOverrides in class CustomizationCommandLineBase
      Parameters:
      overmap - override key-value map
      Returns:
      map for key/values not recognized
    • printUsage

      public void printUsage()
      Description copied from class: CustomizationCommandLineBase
      Print usage information.
      Specified by:
      printUsage in class CustomizationCommandLineBase