Class CommandLine

java.lang.Object
org.web3d.x3d.jsail.CommandLine

public class CommandLine extends Object
Concrete class with a main method that provides command-line JAR access to various X3DJSAIL capabilities.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. Usage: % java -jar X3DJSAIL.4.0.classes.jar -help
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Usage: java [-classpath X3DJSAIL.*.jar] org.web3d.x3d.jsail.CommandLine [-help | -version | -home | -javadoc | -resources | -hints | -regexes | -tooltips | -X3DUOM] [-properties [propertiesFile]] [sourceModel.x3d | sourceModel.exi [-fromEXI] | sourceModel.gz [-fromGZIP] | sourceModel.zip [-fromZIP]] [-canonical] [-validate] [-EXIFICIENT | -OpenEXI] | [-Tidy | -toX3D | -toXML | -toClassicVrml | -toJava | -toJSON | -toPython | -toVRML97 | -toHTML | -toX3DOM | -toX_ITE | -toMarkdown | -toEXI | -toGZIP | -toZIP] [-tofile [resultFile.*]] [-toImage [snapshotName.*]]
    static final String
    Usage command-line switches with descriptions
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommandLine constructor creates an instance object of this class
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Reset already-loaded X3D model of interest to empty model
    static File
    fileStylesheetConversion(File inputFile, String stylesheetName, String outputFileName)
    Convert file using stylesheet, return result.
    static File
    fileStylesheetConversion(String inputFilePath, String stylesheetName, String outputFileName)
    Load file and apply stylesheet conversion to indicated path, return result as file.
    static String
    fileStylesheetConversionToString(File inputFile, String stylesheetName)
    Convert file using stylesheet, return result.
    protected static String
    getFileContents(File inputFile)
    Retrieve file contents as a string.
    protected static String
    getFileContents(String inputFileName)
    Retrieve file contents as a string.
    static final void
    Initialize this CommandLine instance to default values.
    static void
    main(String[] args)
    Default main() method provided for test and debugging purposes, invoking run() method.
    static void
    Open X3DJSAIL page
    static void
    Open X3DJSAIL page at a given bookmark
    static void
    Open X3DJSAIL Javadoc
    static void
    Open X3D Regexes page
    static void
    Open X3D Regex page at a given bookmark
    static void
    Open X3D Resources page
    static void
    Open X3D Resources page at a given bookmark
    static void
    Open X3D Scene Authoring Hints page
    static void
    Open X3D Scene Authoring Hints page at a given bookmark
    static void
    Open X3D Tooltips page
    static void
    Open X3D Tooltips page at a given bookmark
    static void
    Open X3D Unified Object Model (X3DUOM) page
    static void
    run(String singleStringArguments)
    Utility run() method provided for test and debugging purposes, allowing invocation with a single String (rather than a String[] array).
    static void
    run(String[] args)
    Default run() method provided for test and debugging purposes, first initializing ConfigurationProperties then reading properties file (if any) and processing arguments.
    static void
    setLoadedX3dModel(X3D newX3dModel)
    Set already-loaded X3D model of interest, useful for initialization and use of CommandLine by other X3D Java programs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • USAGE

      public static final String USAGE
      Usage: java [-classpath X3DJSAIL.*.jar] org.web3d.x3d.jsail.CommandLine [-help | -version | -home | -javadoc | -resources | -hints | -regexes | -tooltips | -X3DUOM] [-properties [propertiesFile]] [sourceModel.x3d | sourceModel.exi [-fromEXI] | sourceModel.gz [-fromGZIP] | sourceModel.zip [-fromZIP]] [-canonical] [-validate] [-EXIFICIENT | -OpenEXI] | [-Tidy | -toX3D | -toXML | -toClassicVrml | -toJava | -toJSON | -toPython | -toVRML97 | -toHTML | -toX3DOM | -toX_ITE | -toMarkdown | -toEXI | -toGZIP | -toZIP] [-tofile [resultFile.*]] [-toImage [snapshotName.*]]
      See Also:
    • USAGE_LONG

      public static final String USAGE_LONG
      Usage command-line switches with descriptions
      See Also:
  • Constructor Details

    • CommandLine

      public CommandLine()
      CommandLine constructor creates an instance object of this class
  • Method Details

    • setLoadedX3dModel

      public static void setLoadedX3dModel(X3D newX3dModel)
      Set already-loaded X3D model of interest, useful for initialization and use of CommandLine by other X3D Java programs.
      Parameters:
      newX3dModel - already-loaded X3D model of interest
    • clearLoadedX3dModel

      public static void clearLoadedX3dModel()
      Reset already-loaded X3D model of interest to empty model
    • initialize

      public static final void initialize()
      Initialize this CommandLine instance to default values.
    • main

      public static void main(String[] args)
      Default main() method provided for test and debugging purposes, invoking run() method.
      Parameters:
      args - the command line arguments
      See Also:
    • run

      public static void run(String singleStringArguments)
      Utility run() method provided for test and debugging purposes, allowing invocation with a single String (rather than a String[] array). When invoked without parameters then reports results of validate() self-checks to system output.
      Parameters:
      singleStringArguments - the command line arguments
      See Also:
    • run

      public static void run(String[] args)
      Default run() method provided for test and debugging purposes, first initializing ConfigurationProperties then reading properties file (if any) and processing arguments. When invoked without parameters then reports results of validate() self-checks to system output.
      Parameters:
      args - the command line arguments
      See Also:
    • openJavadocX3DJSAIL

      public static void openJavadocX3DJSAIL()
      Open X3DJSAIL Javadoc
      See Also:
    • openHomePageX3DJSAIL

      public static void openHomePageX3DJSAIL()
      Open X3DJSAIL page
      See Also:
    • openHomePageX3DJSAIL

      public static void openHomePageX3DJSAIL(String bookmark)
      Open X3DJSAIL page at a given bookmark
      Parameters:
      bookmark - anchor bookmark of interest for this page
      See Also:
    • openX3dResourcesPage

      public static void openX3dResourcesPage()
      Open X3D Resources page
      See Also:
    • openX3dResourcesPage

      public static void openX3dResourcesPage(String bookmark)
      Open X3D Resources page at a given bookmark
      Parameters:
      bookmark - anchor bookmark of interest for this page
      See Also:
    • openX3dTooltipsPage

      public static void openX3dTooltipsPage()
      Open X3D Tooltips page
      See Also:
    • openX3dTooltipsPage

      public static void openX3dTooltipsPage(String bookmark)
      Open X3D Tooltips page at a given bookmark
      Parameters:
      bookmark - anchor bookmark of interest for this page
      See Also:
    • openX3dRegexesPage

      public static void openX3dRegexesPage()
      Open X3D Regexes page
      See Also:
    • openX3dRegexesPage

      public static void openX3dRegexesPage(String bookmark)
      Open X3D Regex page at a given bookmark
      Parameters:
      bookmark - anchor bookmark of interest for this page
      See Also:
    • openX3DUOMpage

      public static void openX3DUOMpage()
      Open X3D Unified Object Model (X3DUOM) page
      See Also:
    • openX3dSceneAuthoringHintsPage

      public static void openX3dSceneAuthoringHintsPage()
      Open X3D Scene Authoring Hints page
      See Also:
    • openX3dSceneAuthoringHintsPage

      public static void openX3dSceneAuthoringHintsPage(String bookmark)
      Open X3D Scene Authoring Hints page at a given bookmark
      Parameters:
      bookmark - anchor bookmark of interest for this page
      See Also:
    • fileStylesheetConversion

      public static File fileStylesheetConversion(String inputFilePath, String stylesheetName, String outputFileName)
      Load file and apply stylesheet conversion to indicated path, return result as file.
      Parameters:
      inputFilePath - path and name of XML inputFile
      stylesheetName - XSLT stylesheet to apply
      outputFileName - path and name of resulting outputFile
      Returns:
      output file (if any)
    • fileStylesheetConversionToString

      public static String fileStylesheetConversionToString(File inputFile, String stylesheetName)
      Convert file using stylesheet, return result.
      Parameters:
      inputFile - XML inputFile
      stylesheetName - XSLT stylesheet to apply
      Returns:
      output result (if any)
    • fileStylesheetConversion

      public static File fileStylesheetConversion(File inputFile, String stylesheetName, String outputFileName)
      Convert file using stylesheet, return result.
      Parameters:
      inputFile - XML inputFile
      stylesheetName - XSLT stylesheet to apply
      outputFileName - path and name of resulting outputFile
      Returns:
      output file (if any)
    • getFileContents

      protected static String getFileContents(String inputFileName)
      Retrieve file contents as a string.
      Parameters:
      inputFileName - name of file of interest
      Returns:
      file contents as string
    • getFileContents

      protected static String getFileContents(File inputFile)
      Retrieve file contents as a string.
      Parameters:
      inputFile - file of interest
      Returns:
      file contents as string