Class ConfigurationProperties
java.lang.Object
org.web3d.x3d.jsail.ConfigurationProperties
Utility class that enables developers to set custom configuration properties when using X3D Java SAI Library (X3DJSAIL). Note use of static methods.
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
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.
Utility methods
and
command-line support
are available to load Java .property files, such as
X3DJSAIL.properties.template for user preferences.
Output serialization support is provided for indentation, X3D Compressed Binary Encoding: X3D Canonical Form, showing default attribute values, and other custom settings.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Whether to show console output while processing X3D model, initial value is true.static final boolean
Set whether to allow partial output if validation exception occurs when creating an object, initial value is true.static boolean
Default mode for debugging results, initial value is false.static final String
Error message if configuration of X3DJSAIL is incorrect: CLASSPATH missing jar, or other error.static final String
Error message if an illegal value is provided as a method parameter.static final String
Error message if a node is required but no reference is found.static final String
Error message if an element is not currently connected to an existing scene graph object, and necessary checking for model validation is not possible.static final String
Error message if node type of ExternProtoDeclare is not found.static final String
Error message if incorrect field accessType value encountered.static final String
Error message if incorrect field type value encountered.static final String
Error message if node type of ProtoDeclare is not found.static final String
Error message if node type of ProtoInstance is not found.static final String
Error message if a field is required but no value is found.static final String
XSLT transformation engine: EXIficient (default).static final String
EXI transformation engine: OpenEXI Nagasena.static final char
Default character for indenting when serializing scene output, initial value is indentCharacter_SPACE.static final char
Whitespace character for indenting when serializing scene output.static final char
Alternative whitespace character for indenting when serializing scene output.static final int
Default character-count increment for serializing scene output.static final String
X3DJSAIL namestatic final boolean
Set whether to normalize whitespace in comments, which can aid consistency in canonicalization and security; default value is true.static final boolean
Whether to allow overwriting previously existing files, initial value is true.static final String
Default name of properties file:X3DJSAIL.properties
static final boolean
Whether SFImage pixel output values are in hexadecimal format when serializing scene output, initial value is true.static final boolean
Whether to strip default attribute values when serializing scene output, initial value is true;.static final String
Deprecated.static final String
XSLT stylesheet to create Extrusion node cross sections in SVG from X3D scene: ..static final String
XSLT stylesheet to create pretty-print HTML documentation page from X3D scene: ..static final String
XSLT stylesheet to create Java source code (using X3DJSAIL library) from X3D scene: ..static final String
XSLT stylesheet to create Javascript (ECMAScript) source code (using X3DJSAIL library) from X3D scene: ..static final String
XSLT stylesheet to create JSON encoding from X3D scene: ..static final String
XSLT stylesheet to create model meta information as markdown: ..static final String
XSLT stylesheet to create Python source from X3D scene: ..static final String
XSLT stylesheet to create VRML97 model from X3D scene: ..static final String
XSLT stylesheet to create X_ITE XHTML page or X_ITE HTML page from X3D scene: ..static final String
XSLT stylesheet to create X3DOM XHTML page or X3DOM HTML page from X3D scene: ..static final String
XSLT stylesheet to create X3D-Tidy cleaned-up version of X3D scene: ..static final String
XSLT stylesheet to create VRML97 model from X3D scene: ..static final String
X3DJSAIL documentation pagestatic final String
X3D Regular Expressions (regexes) documentation pagesstatic final String
X3D Resources documentation pagestatic final String
X3D Scene Authoring Hints documentation pagesstatic final String
X3D Tooltips documentation pagesstatic final String
X3D Unified Object Model (X3DUOM) documentation pagestatic final boolean
Set whether to allow partial output if validation exception occurs when serializing scene output, initial value is false.static final String
Date this version of X3DJSAIL was autogenerated: "13 December 2024".static final String
Warning message if configuration of X3DJSAIL is incorrect: properties file missing, or other error.static final String
Warning message if model information is unexpected or missing.static final String
Warning message if a ProtoInstance corresponding to a given ProtoDeclare or ExternProtoDeclare is not found.List of officially released X3DJSAIL jar files.X3Dstatic final String
Default XML document encoding, used in the XML document declaration appearing in the first line of an XML file.static final String
XSLT transformation engine: native Java.static final String
XSLT transformation engine: SAXON (default). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get current system CLASSPATH value.static final String
Get preference for XSLT transformation engine to use:EXI_ENGINE_EXIFICIENT
orEXI_ENGINE_OPENEXI
.static String
getExpectedOutputFileExtension
(String stylesheetName) Determine expected output filename extension based on stylesheet conversion.static char
Get indentCharacter used when serializing scene output.static int
Get number of indent characters (space or tab characters) to indent when serializing scene output.static String
Get name of current properties file (optional directory path plus file name).static boolean
Indicate whether default attributes (and their values) are stripped when serializing scene output.static final String
Get preference for XSLT transformation engine to use:XSLT_ENGINE_SAXON
orXSLT_ENGINE_NATIVE_JAVA
.static final void
Initialize this ConfigurationProperties instance to default values.static boolean
Get whether to show console output while processing X3D modelstatic boolean
Indicate whether continuation is allowed if validation exception occurs when creating an object.static boolean
Indicate whether debug mode is active.static final boolean
Indicate whether to delete intermediate files generated as part of various transformations, this property method can be helpful can be helpful for debugging.static boolean
Indicate whether to normalize whitespace in comments, which can aid consistency in canonicalization and security.static boolean
Indicate whether to allow overwriting previously existing files.static boolean
Indicate whether SFImage pixel output values are in hexadecimal format when serializing scene output.static final boolean
Indicates whether trailing zeros are omitted from output of floating-point or double-precision values, this property can be helpful for debugging.static boolean
isStylesheetSupported
(String stylesheetName) Check whether stylesheet is supported by X3DJSAIL.static boolean
Indicate whether partial results are allowed if validation exception occurs when serializing scene output.static boolean
Indicate whether X3D Canonical Form is used for toStringX3D() XML output.static void
Update settings in this ConfigurationProperties instance using values in property file.static void
setConsoleOutputVerbose
(boolean newConsoleOutputVerbose) Set whether to show console output while processing X3D modelstatic void
setCreationConnectionValidationExceptionAllowed
(boolean newCreationConnectionValidationExceptionAllowed) Set whether partial results are allowed (and operation continues) if validation exception occurs when creating an object.static void
setDebugModeActive
(boolean newDebugModeActive) Set whether debug mode is active.static final void
setDeleteIntermediateFiles
(boolean newValue) Set whether to delete intermediate files generated as part of various transformations, this property method can be helpful can be helpful for debugging.static final void
setExiEngine
(String newValue) Set preference for EXI transformation engine to use:EXI_ENGINE_EXIFICIENT
orEXI_ENGINE_OPENEXI
.static void
setIndentCharacter
(char newIndentCharacter) Set indentCharacter used when serializing scene output.static void
setIndentIncrement
(int newIndentIncrement) Set number of characters to indent when serializing scene output.static void
setNormalizeCommentWhitespace
(boolean newNormalizeCommentWhitespace) Set whether to normalize whitespace in comments, which can aid consistency in canonicalization and security.static void
setOverwriteExistingFiles
(boolean newOverwriteExistingFiles) Set whether to allow overwriting previously existing files.static void
setPropertiesFileName
(String fileName) Set name of properties file (optional directory path plus file name).static void
setSFImagePixelOutputHexadecimal
(boolean newSFImagePixelOutputHexadecimal) Set whether SFImage pixel output values are in hexadecimal format when serializing scene output.static void
setStripDefaultAttributes
(boolean newStripDefaultAttributes) Set whether default attributes (and their values) are stripped when serializing scene output.static final void
setStripTrailingZeroes
(boolean newValue) Set whether to omit trailing zeros from floating-point or double-precision output, this property can be helpful for debugging.static void
setValidationExceptionAllowed
(boolean newValidationExceptionAllowed) Set whether partial results are allowed (and operation continues) if validation exception occurs when serializing scene output.static void
Ensure that X3D Canonical Form is used for XML output, resetting default values for indentation.static final void
setXsltEngine
(String newValue) Set preference for XSLT transformation engine to use:XSLT_ENGINE_SAXON
orXSLT_ENGINE_NATIVE_JAVA
.
-
Field Details
-
indentIncrement_DEFAULT
public static final int indentIncrement_DEFAULTDefault character-count increment for serializing scene output.- See Also:
-
indentCharacter_SPACE
public static final char indentCharacter_SPACEWhitespace character for indenting when serializing scene output.- See Also:
-
indentCharacter_TAB
public static final char indentCharacter_TABAlternative whitespace character for indenting when serializing scene output.- See Also:
-
indentCharacter_DEFAULT
public static final char indentCharacter_DEFAULTDefault character for indenting when serializing scene output, initial value is indentCharacter_SPACE.- See Also:
-
XML_ENCODING_DECLARATION_DEFAULT
Default XML document encoding, used in the XML document declaration appearing in the first line of an XML file.- See Also:
-
ERROR_CONFIGURATION_X3DJSAIL
Error message if configuration of X3DJSAIL is incorrect: CLASSPATH missing jar, or other error.- See Also:
-
WARNING_CONFIGURATION_X3DJSAIL
Warning message if configuration of X3DJSAIL is incorrect: properties file missing, or other error.- See Also:
-
WARNING_MESSAGE
Warning message if model information is unexpected or missing.- See Also:
-
ERROR_ILLEGAL_VALUE
Error message if an illegal value is provided as a method parameter.- See Also:
-
ERROR_NOT_CONNECTED_TO_SCENE_GRAPH
Error message if an element is not currently connected to an existing scene graph object, and necessary checking for model validation is not possible. Example: field or fieldValue creation may fail validation() if the field types cannot be checked in a corresponding ProtoDeclare or ExternProtoDeclare.- See Also:
-
ERROR_VALUE_NOT_FOUND
Error message if a field is required but no value is found.- See Also:
-
ERROR_NODE_NOT_FOUND
Error message if a node is required but no reference is found.- See Also:
-
ERROR_UNKNOWN_FIELD_ACCESSTYPE
Error message if incorrect field accessType value encountered.- See Also:
-
ERROR_UNKNOWN_FIELD_TYPE
Error message if incorrect field type value encountered.- See Also:
-
ERROR_UNKNOWN_PROTODECLARE_NODE_TYPE
Error message if node type of ProtoDeclare is not found.- See Also:
-
ERROR_UNKNOWN_EXTERNPROTODECLARE_NODE_TYPE
Error message if node type of ExternProtoDeclare is not found.- See Also:
-
ERROR_UNKNOWN_PROTOINSTANCE_NODE_TYPE
Error message if node type of ProtoInstance is not found.- See Also:
-
WARNING_PROTOINSTANCE_NOT_FOUND
Warning message if a ProtoInstance corresponding to a given ProtoDeclare or ExternProtoDeclare is not found.- See Also:
-
debugModeActive
public static boolean debugModeActiveDefault mode for debugging results, initial value is false. -
SFImagePixelOutputHexadecimal_DEFAULT
public static final boolean SFImagePixelOutputHexadecimal_DEFAULTWhether SFImage pixel output values are in hexadecimal format when serializing scene output, initial value is true.- See Also:
-
stripDefaultAttributes_DEFAULT
public static final boolean stripDefaultAttributes_DEFAULTWhether to strip default attribute values when serializing scene output, initial value is true;.- See Also:
-
validationExceptionAllowed_DEFAULT
public static final boolean validationExceptionAllowed_DEFAULTSet whether to allow partial output if validation exception occurs when serializing scene output, initial value is false.- See Also:
-
creationConnectionValidationExceptionAllowed_DEFAULT
public static final boolean creationConnectionValidationExceptionAllowed_DEFAULTSet whether to allow partial output if validation exception occurs when creating an object, initial value is true.- See Also:
-
normalizeCommentWhitespace_DEFAULT
public static final boolean normalizeCommentWhitespace_DEFAULTSet whether to normalize whitespace in comments, which can aid consistency in canonicalization and security; default value is true.- See Also:
-
overwriteExistingFiles_DEFAULT
public static final boolean overwriteExistingFiles_DEFAULTWhether to allow overwriting previously existing files, initial value is true.- See Also:
-
consoleOutputVerbose_DEFAULT
public static final boolean consoleOutputVerbose_DEFAULTWhether to show console output while processing X3D model, initial value is true.- See Also:
-
NAME_X3DJSAIL
-
VERSION_DATE
Date this version of X3DJSAIL was autogenerated: "13 December 2024".- See Also:
-
URL_X3DJSAIL
-
URL_X3DRESOURCES
-
URL_X3DSCENEAUTHORINGHINTS
X3D Scene Authoring Hints documentation pages- See Also:
-
URL_X3DREGEXES
X3D Regular Expressions (regexes) documentation pages- See Also:
-
URL_X3DTOOLTIPS
-
URL_X3DUOM
X3D Unified Object Model (X3DUOM) documentation page- See Also:
-
STYLESHEET_HTML_DOCUMENTATION
XSLT stylesheet to create pretty-print HTML documentation page from X3D scene: ../lib/stylesheets/X3dToXhtml.xslt- See Also:
-
STYLESHEET_VRML97
XSLT stylesheet to create VRML97 model from X3D scene: ../lib/stylesheets/X3dToVrml.xslt- See Also:
-
STYLESHEET_X3DV_CLASSICVRML
XSLT stylesheet to create VRML97 model from X3D scene: ../lib/stylesheets/X3dToX3dvClassicVrmlEncoding.xslt- See Also:
-
STYLESHEET_MODEL_META_TO_MARKDOWN
XSLT stylesheet to create model meta information as markdown: ../lib/stylesheets/X3dModelMetaToMarkdown.xslt- See Also:
-
STYLESHEET_X3DTIDY
XSLT stylesheet to create X3D-Tidy cleaned-up version of X3D scene: ../lib/stylesheets/X3dToXhtml.xslt- See Also:
-
STYLESHEET_ExtrusionCrossSectionSVG
XSLT stylesheet to create Extrusion node cross sections in SVG from X3D scene: ../lib/stylesheets/X3dExtrusionCrossSectionToSvg.xslt- See Also:
-
STYLESHEET_X3DOM
XSLT stylesheet to create X3DOM XHTML page or X3DOM HTML page from X3D scene: ../lib/stylesheets/X3dToX3domX_ITE.xslt- See Also:
-
STYLESHEET_X_ITE
XSLT stylesheet to create X_ITE XHTML page or X_ITE HTML page from X3D scene: ../lib/stylesheets/X3dToX3domX_ITE.xslt TODO disambiguation needed?- See Also:
-
STYLESHEET_COBWEB
Deprecated.XSLT stylesheet Cobweb (now X_ITE)- See Also:
-
STYLESHEET_JAVA
XSLT stylesheet to create Java source code (using X3DJSAIL library) from X3D scene: ../lib/stylesheets/X3dToJava.xslt. TODO: documentation.- See Also:
-
STYLESHEET_JAVASCRIPT
XSLT stylesheet to create Javascript (ECMAScript) source code (using X3DJSAIL library) from X3D scene: ../lib/stylesheets/X3dToNodeJS.xslt. TODO: documentation.- See Also:
-
STYLESHEET_JSON
XSLT stylesheet to create JSON encoding from X3D scene: ../lib/stylesheets/X3dToJson.xslt- See Also:
-
STYLESHEET_PYTHON
XSLT stylesheet to create Python source from X3D scene: ../lib/stylesheets/X3dToPython.xslt- See Also:
-
X3DJSAIL_JAR_RELEASE_VERSIONS
-
XSLT_ENGINE_SAXON
-
XSLT_ENGINE_NATIVE_JAVA
XSLT transformation engine: native Java.- See Also:
-
EXI_ENGINE_OPENEXI
EXI transformation engine: OpenEXI Nagasena. Warning: testing in progress.- See Also:
-
EXI_ENGINE_EXIFICIENT
XSLT transformation engine: EXIficient (default).- See Also:
-
PROPERTIES_FILENAME_DEFAULT
Default name of properties file:X3DJSAIL.properties
- See Also:
-
-
Constructor Details
-
ConfigurationProperties
public ConfigurationProperties()Default constructor
-
-
Method Details
-
isStylesheetSupported
Check whether stylesheet is supported by X3DJSAIL.- Parameters:
stylesheetName
- XSLT stylesheet to apply- Returns:
- whether stylesheet is supported by X3DJSAIL
-
getExpectedOutputFileExtension
-
isDeleteIntermediateFiles
public static final boolean isDeleteIntermediateFiles()Indicate whether to delete intermediate files generated as part of various transformations, this property method can be helpful can be helpful for debugging.- Returns:
- configuration setting whether intermediate files are deleted
-
setDeleteIntermediateFiles
public static final void setDeleteIntermediateFiles(boolean newValue) Set whether to delete intermediate files generated as part of various transformations, this property method can be helpful can be helpful for debugging.- Parameters:
newValue
- is new value to assign
-
isStripTrailingZeroes
public static final boolean isStripTrailingZeroes()Indicates whether trailing zeros are omitted from output of floating-point or double-precision values, this property can be helpful for debugging.- Returns:
- configuration setting whether trailing zeros are stripped
-
setStripTrailingZeroes
public static final void setStripTrailingZeroes(boolean newValue) Set whether to omit trailing zeros from floating-point or double-precision output, this property can be helpful for debugging.- Parameters:
newValue
- is new value to assign
-
getXsltEngine
Get preference for XSLT transformation engine to use:XSLT_ENGINE_SAXON
orXSLT_ENGINE_NATIVE_JAVA
.- Returns:
- String constant regarding current configuration: XSLT_ENGINE_SAXON (default) or XSLT_ENGINE_NATIVE_JAVA
-
setXsltEngine
Set preference for XSLT transformation engine to use:XSLT_ENGINE_SAXON
orXSLT_ENGINE_NATIVE_JAVA
.- Parameters:
newValue
- is new value to assign
-
getExiEngine
Get preference for XSLT transformation engine to use:EXI_ENGINE_EXIFICIENT
orEXI_ENGINE_OPENEXI
.- Returns:
- String constant regarding current configuration: EXI_ENGINE_EXIFICIENT} (default) or EXI_ENGINE_OPENEXI
- See Also:
-
setExiEngine
Set preference for EXI transformation engine to use:EXI_ENGINE_EXIFICIENT
orEXI_ENGINE_OPENEXI
.- Parameters:
newValue
- is new value to assign- See Also:
-
initialize
public static final void initialize()Initialize this ConfigurationProperties instance to default values. -
setPropertiesFileName
Set name of properties file (optional directory path plus file name).- Parameters:
fileName
- new name of properties file to load and parse- See Also:
-
getPropertiesFileName
Get name of current properties file (optional directory path plus file name).- Returns:
- name of properties file to load and parse
- See Also:
-
loadProperties
public static void loadProperties()Update settings in this ConfigurationProperties instance using values in property file.- See Also:
-
getClassPath
Get current system CLASSPATH value. Note that a current version of X3DJSAIL.*.jar is expected to be in the current CLASSPATH.- Returns:
- system CLASSPATH value.
- See Also:
-
getIndentCharacter
public static char getIndentCharacter()Get indentCharacter used when serializing scene output.- Returns:
- indentCharacter (either indentCharacter_SPACE or indentCharacter_TAB).
- See Also:
-
setIndentCharacter
public static void setIndentCharacter(char newIndentCharacter) Set indentCharacter used when serializing scene output.- Parameters:
newIndentCharacter
- is new indent value (non-negative).- See Also:
-
getIndentIncrement
public static int getIndentIncrement()Get number of indent characters (space or tab characters) to indent when serializing scene output.- Returns:
- number of characters (non-negative).
- See Also:
-
setIndentIncrement
public static void setIndentIncrement(int newIndentIncrement) Set number of characters to indent when serializing scene output.- Parameters:
newIndentIncrement
- is new indentIncrement value (non-negative).- See Also:
-
isX3dCanonicalForm
public static boolean isX3dCanonicalForm()Indicate whether X3D Canonical Form is used for toStringX3D() XML output.- Returns:
- whether X3D Canonical Form is used.
- See Also:
-
setX3dCanonicalForm
public static void setX3dCanonicalForm()Ensure that X3D Canonical Form is used for XML output, resetting default values for indentation.- See Also:
-
isDebugModeActive
public static boolean isDebugModeActive()Indicate whether debug mode is active.- Returns:
- whether debug mode is active.
-
setDebugModeActive
public static void setDebugModeActive(boolean newDebugModeActive) Set whether debug mode is active.- Parameters:
newDebugModeActive
- whether debug mode is active.
-
isSFImagePixelOutputHexadecimal
public static boolean isSFImagePixelOutputHexadecimal()Indicate whether SFImage pixel output values are in hexadecimal format when serializing scene output.- Returns:
- whether default attributes are shown.
-
setSFImagePixelOutputHexadecimal
public static void setSFImagePixelOutputHexadecimal(boolean newSFImagePixelOutputHexadecimal) Set whether SFImage pixel output values are in hexadecimal format when serializing scene output.- Parameters:
newSFImagePixelOutputHexadecimal
- whether SFImage pixel output values are in hexadecimal format.
-
getStripDefaultAttributes
public static boolean getStripDefaultAttributes()Indicate whether default attributes (and their values) are stripped when serializing scene output.- Returns:
- whether default attributes are shown.
-
setStripDefaultAttributes
public static void setStripDefaultAttributes(boolean newStripDefaultAttributes) Set whether default attributes (and their values) are stripped when serializing scene output.- Parameters:
newStripDefaultAttributes
- whether default attributes are shown.
-
isValidationExceptionAllowed
public static boolean isValidationExceptionAllowed()Indicate whether partial results are allowed if validation exception occurs when serializing scene output.- Returns:
- whether validation exceptions are allowed (and operation continues)
-
setValidationExceptionAllowed
public static void setValidationExceptionAllowed(boolean newValidationExceptionAllowed) Set whether partial results are allowed (and operation continues) if validation exception occurs when serializing scene output. Can be useful technique for debugging, default value is false for strict operation. Warning: setting value to true permits creation of an invalid scene graph.- Parameters:
newValidationExceptionAllowed
- whether validation exceptions are allowed (and operation continues)
-
isCreationConnectionValidationExceptionAllowed
public static boolean isCreationConnectionValidationExceptionAllowed()Indicate whether continuation is allowed if validation exception occurs when creating an object. Warning: TODO experimental.- Returns:
- whether validation exceptions are allowed (and operation continues) during object creation
-
setCreationConnectionValidationExceptionAllowed
public static void setCreationConnectionValidationExceptionAllowed(boolean newCreationConnectionValidationExceptionAllowed) Set whether partial results are allowed (and operation continues) if validation exception occurs when creating an object. Can be useful technique for debugging, default value is true for permissive order of object creation. Warning: be sure to validate() this scene once construction is complete. Warning: TODO experimental.- Parameters:
newCreationConnectionValidationExceptionAllowed
- whether validation exceptions are allowed (and object creation continues)
-
isNormalizeCommentWhitespace
public static boolean isNormalizeCommentWhitespace()Indicate whether to normalize whitespace in comments, which can aid consistency in canonicalization and security.- Returns:
- whether to normalize whitespace in comments
- See Also:
-
setNormalizeCommentWhitespace
public static void setNormalizeCommentWhitespace(boolean newNormalizeCommentWhitespace) Set whether to normalize whitespace in comments, which can aid consistency in canonicalization and security.- Parameters:
newNormalizeCommentWhitespace
- whether to normalize whitespace in comments- See Also:
-
isOverwriteExistingFiles
public static boolean isOverwriteExistingFiles()Indicate whether to allow overwriting previously existing files.- Returns:
- whether creation of new files can overwrite prior versions
- See Also:
-
setOverwriteExistingFiles
public static void setOverwriteExistingFiles(boolean newOverwriteExistingFiles) Set whether to allow overwriting previously existing files.- Parameters:
newOverwriteExistingFiles
- whether creation of new files can overwrite prior versions- See Also:
-
isConsoleOutputVerbose
public static boolean isConsoleOutputVerbose()Get whether to show console output while processing X3D model- Returns:
- whether console output is verbose
-
setConsoleOutputVerbose
public static void setConsoleOutputVerbose(boolean newConsoleOutputVerbose) Set whether to show console output while processing X3D model- Parameters:
newConsoleOutputVerbose
- whether to show console output while processing X3D model- See Also:
-