Package org.web3d.x3d.jsail
Class CommandLine
java.lang.Object
org.web3d.x3d.jsail.CommandLine
public class CommandLine
extends java.lang.Object
Concrete class with a
Usage:
main
method that provides command-line JAR access to various X3DJSAIL capabilities.
Usage:
% java -jar X3DJSAIL.4.0.classes.jar -help
-
Field Summary
Fields Modifier and Type Field Description static java.lang.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.*]]
static java.lang.String
USAGE_LONG
-
Constructor Summary
Constructors Constructor Description CommandLine()
-
Method Summary
Modifier and Type Method Description static void
clearLoadedX3dModel()
Reset already-loaded X3D model of interest to empty modelstatic java.io.File
fileStylesheetConversion(java.io.File inputFile, java.lang.String stylesheetName, java.lang.String outputFileName)
Convert file using stylesheet, return result.static java.io.File
fileStylesheetConversion(java.lang.String inputFilePath, java.lang.String stylesheetName, java.lang.String outputFileName)
Load file and apply stylesheet conversion to indicated path, return result as file.static java.lang.String
fileStylesheetConversionToString(java.io.File inputFile, java.lang.String stylesheetName)
Convert file using stylesheet, return result.protected static java.lang.String
getFileContents(java.io.File inputFile)
Retrieve file contents as a string.protected static java.lang.String
getFileContents(java.lang.String inputFileName)
Retrieve file contents as a string.static void
initialize()
Initialize this CommandLine instance to default values.static void
main(java.lang.String[] args)
Default main() method provided for test and debugging purposes, invoking run() method.static void
openHomePageX3DJSAIL()
Open X3DJSAIL pagestatic void
openHomePageX3DJSAIL(java.lang.String bookmark)
Open X3DJSAIL page at a given bookmarkstatic void
openJavadocX3DJSAIL()
Open X3DJSAIL Javadocstatic void
openX3dRegexesPage()
Open X3D Regexes pagestatic void
openX3dRegexesPage(java.lang.String bookmark)
Open X3D Regex page at a given bookmarkstatic void
openX3dResourcesPage()
Open X3D Resources pagestatic void
openX3dResourcesPage(java.lang.String bookmark)
Open X3D Resources page at a given bookmarkstatic void
openX3dSceneAuthoringHintsPage()
Open X3D Scene Authoring Hints pagestatic void
openX3dSceneAuthoringHintsPage(java.lang.String bookmark)
Open X3D Scene Authoring Hints page at a given bookmarkstatic void
openX3dTooltipsPage()
Open X3D Tooltips pagestatic void
openX3dTooltipsPage(java.lang.String bookmark)
Open X3D Tooltips page at a given bookmarkstatic void
openX3DUOMpage()
Open X3D Unified Object Model (X3DUOM) pagestatic void
run(java.lang.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(java.lang.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.
-
Field Details
-
USAGE
public static final java.lang.String USAGEUsage: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:
- Constant Field Values
-
USAGE_LONG
public static final java.lang.String USAGE_LONG- See Also:
- Constant Field Values
-
-
Constructor Details
-
CommandLine
public CommandLine()
-
-
Method Details
-
setLoadedX3dModel
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(java.lang.String[] args)Default main() method provided for test and debugging purposes, invoking run() method.- Parameters:
args
- the command line arguments- See Also:
run(String[])
,X3D.handleArguments(String[])
-
run
public static void run(java.lang.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(String[])
-
run
public static void run(java.lang.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:
main(String[])
,ConfigurationProperties
,X3D.handleArguments(String[])
-
openJavadocX3DJSAIL
public static void openJavadocX3DJSAIL()Open X3DJSAIL Javadoc -
openHomePageX3DJSAIL
public static void openHomePageX3DJSAIL()Open X3DJSAIL page -
openHomePageX3DJSAIL
public static void openHomePageX3DJSAIL(java.lang.String bookmark)Open X3DJSAIL page at a given bookmark- Parameters:
bookmark
- anchor bookmark of interest for this page- See Also:
- https://www.web3d.org/specifications/java/X3DJSAIL.html
-
openX3dResourcesPage
public static void openX3dResourcesPage()Open X3D Resources page -
openX3dResourcesPage
public static void openX3dResourcesPage(java.lang.String bookmark)Open X3D Resources page at a given bookmark- Parameters:
bookmark
- anchor bookmark of interest for this page- See Also:
- https://www.web3d.org/x3d/content/examples/X3dResources.html
-
openX3dTooltipsPage
public static void openX3dTooltipsPage()Open X3D Tooltips page- See Also:
- X3D Tooltips
-
openX3dTooltipsPage
public static void openX3dTooltipsPage(java.lang.String bookmark)Open X3D Tooltips page at a given bookmark- Parameters:
bookmark
- anchor bookmark of interest for this page- See Also:
- X3D Tooltips
-
openX3dRegexesPage
public static void openX3dRegexesPage()Open X3D Regexes page- See Also:
- X3D Regular Expressions (regexes)
-
openX3dRegexesPage
public static void openX3dRegexesPage(java.lang.String bookmark)Open X3D Regex page at a given bookmark- Parameters:
bookmark
- anchor bookmark of interest for this page- See Also:
- X3D Regular Expressions (regexes),
ConfigurationProperties.URL_X3DREGEXES
-
openX3DUOMpage
public static void openX3DUOMpage()Open X3D Unified Object Model (X3DUOM) page- See Also:
- X3D Tooltips
-
openX3dSceneAuthoringHintsPage
public static void openX3dSceneAuthoringHintsPage()Open X3D Scene Authoring Hints page- See Also:
- X3D Scene Authoring Hints
-
openX3dSceneAuthoringHintsPage
public static void openX3dSceneAuthoringHintsPage(java.lang.String bookmark)Open X3D Scene Authoring Hints page at a given bookmark- Parameters:
bookmark
- anchor bookmark of interest for this page- See Also:
- X3D Scene Authoring Hints
-
fileStylesheetConversion
public static java.io.File fileStylesheetConversion(java.lang.String inputFilePath, java.lang.String stylesheetName, java.lang.String outputFileName)Load file and apply stylesheet conversion to indicated path, return result as file.- Parameters:
inputFilePath
- path and name of XML inputFilestylesheetName
- XSLT stylesheet to applyoutputFileName
- path and name of resulting outputFile- Returns:
- output file (if any)
-
fileStylesheetConversionToString
public static java.lang.String fileStylesheetConversionToString(java.io.File inputFile, java.lang.String stylesheetName)Convert file using stylesheet, return result.- Parameters:
inputFile
- XML inputFilestylesheetName
- XSLT stylesheet to apply- Returns:
- output result (if any)
-
fileStylesheetConversion
public static java.io.File fileStylesheetConversion(java.io.File inputFile, java.lang.String stylesheetName, java.lang.String outputFileName)Convert file using stylesheet, return result.- Parameters:
inputFile
- XML inputFilestylesheetName
- XSLT stylesheet to applyoutputFileName
- path and name of resulting outputFile- Returns:
- output file (if any)
-
getFileContents
protected static java.lang.String getFileContents(java.lang.String inputFileName)Retrieve file contents as a string.- Parameters:
inputFileName
- name of file of interest- Returns:
- file contents as string
-
getFileContents
protected static java.lang.String getFileContents(java.io.File inputFile)Retrieve file contents as a string.- Parameters:
inputFile
- file of interest- Returns:
- file contents as string
-