Package org.web3d.x3d.jsail.Core
Class X3DObject
java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteStatement
org.web3d.x3d.jsail.Core.X3DObject
public class X3DObject extends X3DConcreteStatement
X3D is the root node for an Extensible 3D (X3D) Graphics model. This concrete class represents an X3D statement.
X3D statement tooltip: [X3D statement] X3D is the top-most XML element for an Extensible 3D (X3D) Graphics model. The X3D element contains a single head element for metadata, and a single Scene element which is root node of the 3D scene graph.
X3D statement tooltip: [X3D statement] X3D is the top-most XML element for an Extensible 3D (X3D) Graphics model. The X3D element contains a single head element for metadata, and a single Scene element which is root node of the 3D scene graph.
- Hint: for more on XML declaration and DOCTYPE (DTD) statements, see https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation
- Hint: additional attributes are under consideration for use when embedding X3D version 4 scenes within HTML version 5 web pages.
- Hint: X3D Architecture 7.2.5.2 Header statement https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#HeaderStatement
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPONENT
String constant COMPONENT defines X3D component for the X3D element: Corestatic java.lang.String
FILE_EXTENSION_CLASSICVRML
File extension for X3D ClassicVRML Encoding, with dot prepended: .x3dvstatic java.lang.String
FILE_EXTENSION_EXI
File extension for Efficient XML Interchange (EXI) compressed XML file, with dot prepended: .existatic java.lang.String
FILE_EXTENSION_GIF
File extension for Graphics Interchange Format (GIF) image format, with dot prepended: .gifstatic java.lang.String
FILE_EXTENSION_GZIP
File extension for GZIP compressed file, with dot prepended: .gzstatic java.lang.String
FILE_EXTENSION_HTML
File extension for HTML Encoding, with dot prepended: .htmlstatic java.lang.String
FILE_EXTENSION_JAVA
File extension for Java source code, with dot prepended: .javastatic java.lang.String
FILE_EXTENSION_JAVASCRIPT
File extension for JavaScript source code, with dot prepended: .jsstatic java.lang.String
FILE_EXTENSION_JPEG
File extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpegstatic java.lang.String
FILE_EXTENSION_JPG
File extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpgstatic java.lang.String
FILE_EXTENSION_JSON
File extension for JavaScript Object Notation (JSON) source data, with dot prepended: .jsonstatic java.lang.String
FILE_EXTENSION_MARKDOWN
File extension for markdown encoding, with dot prepended: .mdstatic java.lang.String
FILE_EXTENSION_PLY
File extension for PLY file format (Polygon File Format, or Stanford Triangle Format) with dot prepended: .ply.static java.lang.String
FILE_EXTENSION_PNG
File extension for Portable Network Graphics (PNG) image format, with dot prepended: .pngstatic java.lang.String
FILE_EXTENSION_PYTHON
File extension for Python programming-language source code, with dot prepended: .pystatic java.lang.String
FILE_EXTENSION_STL
File extension for STL (stereolithography) file format with dot prepended: .stlstatic java.lang.String
FILE_EXTENSION_SVG
File extension for Scalable Vector Graphics (SVG), with dot prepended: .svgstatic java.lang.String
FILE_EXTENSION_TEXT
File extension for text files, with dot prepended: .txtstatic java.lang.String
FILE_EXTENSION_VRML97
File extension for VRML97 Encoding, with dot prepended: .wrlstatic java.lang.String
FILE_EXTENSION_X3D
File extension for X3D XML Encoding, with dot prepended: .x3dstatic java.lang.String
FILE_EXTENSION_X3DB
File extension for X3D Compressed Binary Encoding, with dot prepended: .x3dbstatic java.lang.String
FILE_EXTENSION_XHTML
File extension for XHTML Encoding, with dot prepended: .xhtmlstatic java.lang.String
FILE_EXTENSION_XML
File extension for Extensible Markup Language, with dot prepended: .xmlstatic java.lang.String
FILE_EXTENSION_ZIP
File extension for ZIP compressed file, with dot prepended: .zipstatic headObject
HEAD_DEFAULT_VALUE
SFNode field named head has default value null (Java syntax) or NULL (XML syntax).static int
LEVEL
Integer constant LEVEL provides default X3D Core component level for this element: 1static java.lang.String
NAME
String constant NAME provides name of this element: X3D.static java.lang.String
PROFILE_CADINTERCHANGE
Tooltip: CADInterchange Profile adds support for CADGeometry component nodes to Interchange Profile.static java.lang.String
PROFILE_CORE
Tooltip: Core Profile includes no nodes and is provided as the basis for custom componentization.static java.lang.String
PROFILE_DEFAULT_VALUE
SFString field named profile has default value "Immersive" (Java syntax) or Immersive (XML syntax).static java.lang.String
PROFILE_FULL
Tooltip: The Full Profile corresponds to all Immersive X3D nodes plus all approved/implemented extensions.static java.lang.String
PROFILE_IMMERSIVE
Tooltip: Immersive Profile equals all of the nodes in the VRML97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene.static java.lang.String
PROFILE_INTERACTIVE
Tooltip: Interactive Profile adds interaction nodes (Anchor, KeySensor) to the minimum subset of nodes needed to display lightweight compelling content.static java.lang.String
PROFILE_INTERCHANGE
Tooltip: Interchange Profile equals the minimum subset of nodes needed to display lightweight compelling content.static java.lang.String
PROFILE_MEDICALINTERCHANGE
Tooltip: The MedicalInterchange profile adds support for VolumeRendering component to Interchange profile.static java.lang.String
PROFILE_MPEG4INTERACTIVE
Tooltip: MPEGInteractive Profile defines base interoperability with MPEG4 standards to a small subset of nodes needed to display lightweight compelling content.static SceneObject
SCENE_DEFAULT_VALUE
SFNode field named Scene has default value null (Java syntax) or NULL (XML syntax).static java.lang.String
VERSION_3_0
Tooltip: X3D version 3.0 approved by ISO in 2004.static java.lang.String
VERSION_3_1
Tooltip: X3D version 3.1 Amendment 1 approved by ISO in 2005.static java.lang.String
VERSION_3_2
Tooltip: X3D version 3.2 Amendment 2 approved by ISO in 2007.static java.lang.String
VERSION_3_3
Tooltip: X3D version 3.3 approved by ISO in 2013 as International Standard (IS).static java.lang.String
VERSION_4_0
Tooltip: X3D version 4.0 under final development by Web3D Consortium.static java.lang.String
VERSION_DEFAULT_VALUE
SFString field named version has default value "4.0" (Java syntax) or 4.0 (XML syntax).static java.lang.String
X3D_XML_SCHEMA_3_0_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
X3D_XML_SCHEMA_3_1_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
X3D_XML_SCHEMA_3_2_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
X3D_XML_SCHEMA_3_3_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
X3D_XML_SCHEMA_4_0_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
X3D_XML_SCHEMA_4_1_ATTRIBUTES
XML Schema attributes for X3D element.static java.lang.String
XML_DOCTYPE_X3D_3_0
XML document type declaration.static java.lang.String
XML_DOCTYPE_X3D_3_1
XML document type declaration.static java.lang.String
XML_DOCTYPE_X3D_3_2
XML document type declaration.static java.lang.String
XML_DOCTYPE_X3D_3_3
XML document type declaration.static java.lang.String
XML_DOCTYPE_X3D_4_0
XML document type declaration.static java.lang.String
XML_DOCTYPE_X3D_4_1
XML document type declaration.static java.lang.String
XML_HEADER
XML declaration appears on first line of an XML document. -
Constructor Summary
Constructors Constructor Description X3DObject()
Constructor for X3DObject to initialize member variables with default values. -
Method Summary
Modifier and Type Method Description X3DObject
addComments(java.lang.String newComment)
Add comment as String to contained commentsList.X3DObject
addComments(java.lang.String[] newComments)
Add comments as String[] array to contained commentsList.X3DObject
addComments(CommentsBlock newCommentsBlock)
Add CommentsBlock to contained commentsList.X3DObject
clearHead()
Utility method to clear SFNode value of head field.X3DObject
clearScene()
Utility method to clear SFNode value of Scene field.static boolean
fileNameMeetsX3dNamingConventions(java.lang.String fileName)
Check whether fileName ending in .x3d meets X3D naming conventions, ignoring prior path (if any).X3DConcreteElement
findElementByNameValue(java.lang.String nameValue)
Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element.X3DConcreteElement
findElementByNameValue(java.lang.String nameValue, java.lang.String elementName)
Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element.X3DConcreteNode
findNodeByDEF(java.lang.String DEFvalue)
Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.boolean
fromFileEXI(java.lang.String exiFileName)
Load new model from an EXI file, using unzip to extract the model plus any associated files into the same path location.boolean
fromFileGZIP(java.lang.String gzipFileName)
Load new model from a gz gzip file, using ungzip to extract the model into the same path location.boolean
fromFileZIP(java.lang.String zipFileName, java.lang.String outputFileName)
Load new model from a zip file, using unzip to extract the model plus any associated files into the same path location.boolean
fromFileZIP(java.lang.String zipFileName, java.lang.String outputFileName, java.lang.String modelFileName)
Load new model from a zip file, using unzip to extract the model plus any associated files into the same path location.java.lang.String
getAccessType(java.lang.String fieldName)
Indicate accessType corresponding to given fieldName.java.lang.String
getComponent()
Defines X3D component for the X3D element: Coreint
getComponentLevel()
Provides default X3D component level for this element: 1java.lang.String
getElementName()
Provides name of this element: X3Djava.lang.String
getFieldType(java.lang.String fieldName)
Indicate type corresponding to given fieldName.headObject
getHead()
Provide headObject instance (using a properly typed node) from inputOutput SFNode field head.java.lang.String
getProfile()
Provide String enumeration value (baseType xs:NMTOKEN) ["Core" | "Interchange" | "CADInterchange" | "Interactive" | "Immersive" | "MedicalInterchange" | "MPEG4Interactive" | "Full"] from inputOutput SFString field named profile.SceneObject
getScene()
Provide SceneObject instance (using a properly typed node) from inputOutput SFNode field Scene.static java.io.File
getTempFileFromX3dJsailJar(java.lang.String internalPath, java.lang.String fileName)
java.lang.String
getVersion()
Provide String enumeration value (baseType xs:NMTOKEN) ["3.0" | "3.1" | "3.2" | "3.3" | "4.0"] from inputOutput SFString field named version.void
handleArguments(java.lang.String[] args)
Utility method for standalone programs that get created with stylesheet X3dToJava.xslt, also sets loaded X3D model fileInputStream global CommandLine to this X3DObject.boolean
hasElementByNameValue(java.lang.String nameValue, java.lang.String elementName)
Recursive method to determine whether node or statement with given name attribute is found, meaning both objects are attached to same scene graph.boolean
hasHead()
Indicate whether an object is available for inputOutput SFNode field head.boolean
hasNodeByDEF(java.lang.String DEFvalue)
Recursive method to determine whether node with DEFvalue is found, meaning both objects are attached to same scene graph.boolean
hasScene()
Indicate whether an object is available for inputOutput SFNode field Scene.void
initialize()
Initialize all member variables to default values.boolean
isEmpty()
Determine if this X3D model is empty and no content is present.static boolean
isFileNameNMTOKEN(java.lang.String fileName)
Check whether fileName is satisfactory NMTOKEN, ignoring prior path (if any).boolean
loadModelFromFileX3D(java.io.File x3dFile)
Load X3D model from file to initialize or replace contents of this X3DObject.boolean
loadModelFromFileX3D(java.lang.String fileName)
Load X3D model from file to initialize or replace contents of this X3DObject.boolean
loadModelFromFileX3D(java.lang.String path, java.lang.String fileName)
Load X3D model from file to initialize or replace contents of this X3DObject.boolean
replace(X3DObject newX3DObject)
Replaces current X3DObject with new X3DObject.X3DObject
setHead(headObject newValue)
Accessor method to assign headObject instance (using a properly typed node) to inputOutput SFNode field head.void
setIncludeSubdirectoryPaths(boolean value)
X3DObject
setProfile(java.lang.String newValue)
Accessor method to assign String enumeration value ("Core" | "Interchange" | "CADInterchange" | "Interactive" | "Immersive" | "MedicalInterchange" | "MPEG4Interactive" | "Full") to inputOutput SFString field named profile.X3DObject
setProfile(SFStringObject newValue)
Assign typed object value to SFString profile field, similar tosetProfile(String)
.X3DObject
setScene(SceneObject newValue)
Accessor method to assign SceneObject instance (using a properly typed node) to inputOutput SFNode field Scene.X3DObject
setVersion(java.lang.String newValue)
Accessor method to assign String enumeration value ("3.0" | "3.1" | "3.2" | "3.3" | "4.0") to inputOutput SFString field named version.X3DObject
setVersion(SFStringObject newValue)
Assign typed object value to SFString version field, similar tosetVersion(String)
.boolean
supportsX3dComponent(java.lang.String otherComponent, int minimumLevel)
Confirm whether given component is supported by current X3D model, Warning: no support for level tests yet.boolean
supportsX3dProfile(java.lang.String otherProfile)
Confirm whether given profile is supported by current X3D modelboolean
supportsX3dVersion(java.lang.String otherVersion)
Confirm whether given version is supported by current X3D object.java.io.File
toFileClassicVRML(java.lang.String fileName)
Serialize scene graph using toStringClassicVRML() to create a new X3D file with extension x3dv.java.io.File
toFileCobweb(java.lang.String sourceSceneName, java.lang.String resultFileName)
Deprecated.java.io.File
toFileEXI(java.lang.String resultFileName)
Save current model as an EXI file.java.io.File
toFileGZIP(java.lang.String resultFileName)
Save current model as a GZIP file.java.io.File
toFileHtmlDocumentation(java.lang.String fileName)
Serialize scene graph using toFileX3D() and then create a new pretty-print HTML file with extension .html, suitable for documentation purposes.java.io.File
toFileJava(java.lang.String fileName)
Serialize scene graph using X3dToJava.xslt stylesheet to create a new Java source file with extension java, no default license included.java.io.File
toFileJava(java.lang.String fileName, boolean includeWeb3dLicense)
Serialize scene graph using X3dToJava.xslt stylesheet to create a new Java source file with extension java.java.io.File
toFileJavaScript(java.lang.String fileName)
Serialize scene graph using NodeSerializer.js to create a JavaScript file.java.io.File
toFileJavaScript(java.lang.String fileName, boolean includeWeb3dLicense)
java.io.File
toFileJSON(java.lang.String fileName)
Serialize scene graph using X3dToJson.xslt stylesheet to create a new JSON-encoding X3D file with extension json.java.io.File
toFileModelMetaMarkdown(java.lang.String fileName)
Create model meta information as `name`=`value` pairs, providing markdown output as an output file having extension .md.java.io.File
toFilePython(java.lang.String fileName)
Serialize scene graph using X3dToPython.xslt stylesheet to create a new Python-language X3D file with extension py.java.io.File
toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName)
Utility method for toFileStylesheetConversion() with no stylesheet parameters.java.io.File
toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName, java.lang.String parameterName1, java.lang.String parameterValue1)
Utility method for toFileStylesheetConversion() with a single stylesheet name=value parameter pair.java.io.File
toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName, java.lang.String parameterName1, java.lang.String parameterValue1, java.lang.String parameterName2, java.lang.String parameterValue2)
Serialize current X3DObject scene graph using toFileX3D() and then create a new file with corresponding filename extension (e.g.java.io.File
toFileVRML97(java.lang.String fileName)
Serialize scene graph using toStringVRML97() to create a new X3D file with extension wrl.java.io.File
toFileX_ITE(java.lang.String sourceSceneName, java.lang.String resultFileName)
Create displayable scene page rendered with X_ITE (formerly Cobweb) using STYLESHEET_X3DOM and special settings, by serializing XML syntax within an XHTML file having extension .xhtml.java.io.File
toFileX3D(java.lang.String fileName)
Serialize scene graph using toStringX3D() to create a new XML-encoding X3D file with extension x3d or xml.java.io.File
toFileX3DOM(java.lang.String fileName)
Create displayable scene page rendered with X3DOM, using STYLESHEET_X3DOM by serializing XML syntax within an XHTML file having extension .xhtml.java.io.File
toFileX3dTidy(java.lang.String fileName)
Create alternate cleaned-up X3D scene using STYLESHEET_X3DTIDY within an output file having extension .x3d.java.io.File
toFileXML(java.lang.String fileName)
Serialize scene graph using toStringX3D() to create a new XML-encoding X3D file with extension x3d or xml.java.io.File
toFileZIP(java.lang.String zipFileName, java.lang.String modelName)
Save current model as a ZIP file.java.lang.String
toStringClassicVRML(int indentLevel)
Recursive method to provide ClassicVRML string serialization.java.lang.String
toStringHtmlDocumentation()
Serialize scene graph using STYLESHEET_HTML_DOCUMENTATION to create a new X3DOM html page as a string.java.lang.String
toStringJava()
Serialize scene graph using toFileJava() to create new Java source as a string.java.lang.String
toStringJavaScript()
Serialize scene graph using NodeSerializer.js to create a JavaScript string.java.lang.String
toStringJSON()
Serialize scene graph using X3dToJson.xslt stylesheet to create a new JSON-encoding string.java.lang.String
toStringModelMetaMarkdown()
Produce model meta information as `name`=`value` pairs, providing markdown output as a string.java.lang.String
toStringPython()
Serialize scene graph using X3dToPython.xslt stylesheet to create a new Python-language string.java.lang.String
toStringVRML97(int indentLevel)
Recursive method to provide VRML97 string serialization.java.lang.String
toStringX_ITE(java.lang.String sourceSceneName)
Serialize scene graph using STYLESHEET_X3DOM (with appropriate parameters) to create a new X_ITE html page as a string.java.lang.String
toStringX3D(int indentLevel)
Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.java.lang.String
toStringX3DOM()
Serialize scene graph using STYLESHEET_X3DOM to create a new X3DOM html page as a string.java.lang.String
toStringX3dTidy()
Produce alternate cleaned-up X3D scene using STYLESHEET_X3DTIDY, providing output as a string.java.lang.String
toStringXML()
Provide XML string serialization of this model subgraph, utilizing X3D XML encoding and conforming to X3D Canonical Form.java.lang.String
toStringXML(int indentLevel)
Provide XML string serialization of this model subgraph, utilizing X3D XML encoding and conforming to X3D Canonical Form.java.lang.String
validate()
Recursive method to validate this element plus all contained nodes and statements, using both datatype-specification value checks and regular expression (regex) checking of corresponding string values.java.lang.String
validationReport()
Provide thorough X3DJSAIL validation results for this X3D model.Methods inherited from class org.web3d.x3d.jsail.X3DConcreteElement
clearParentObject, findAncestorElementByName, findAncestorProtoBody, findAncestorSceneObject, findAncestorX3DObject, getPackageName, getParentObject, getValidationResult, hasAncestorElementByName, hasAncestorProtoBody, hasAncestorSceneObject, hasAncestorX3DObject, hasParentObject, isValid, setParentObject, toStringClassicVRML, toStringVRML97, toStringX3D
-
Field Details
-
XML_HEADER
public static final java.lang.String XML_HEADERXML declaration appears on first line of an XML document.
<?xml version="1.0" encoding="UTF-8"?> -
XML_DOCTYPE_X3D_4_1
public static final java.lang.String XML_DOCTYPE_X3D_4_1XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document.
<?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.1//EN" "http://www.web3d.org/specifications/x3d-4.1.dtd"> -
XML_DOCTYPE_X3D_4_0
public static final java.lang.String XML_DOCTYPE_X3D_4_0XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document. <?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "http://www.web3d.org/specifications/x3d-4.0.dtd"> -
XML_DOCTYPE_X3D_3_3
public static final java.lang.String XML_DOCTYPE_X3D_3_3XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document.
<?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd"> -
XML_DOCTYPE_X3D_3_2
public static final java.lang.String XML_DOCTYPE_X3D_3_2XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document.
<?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd"> -
XML_DOCTYPE_X3D_3_1
public static final java.lang.String XML_DOCTYPE_X3D_3_1XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document.
<?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN" "http://www.web3d.org/specifications/x3d-3.1.dtd"> -
XML_DOCTYPE_X3D_3_0
public static final java.lang.String XML_DOCTYPE_X3D_3_0XML document type declaration. DOCTYPE supports element/attribute structural validation and follows the initial XML declaration, before the first element in an XML document.
<?DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd"> -
X3D_XML_SCHEMA_3_0_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_3_0_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.0.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
X3D_XML_SCHEMA_3_1_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_3_1_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.1.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
X3D_XML_SCHEMA_3_2_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_3_2_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.2.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
X3D_XML_SCHEMA_3_3_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_3_3_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
X3D_XML_SCHEMA_4_0_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_4_0_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
X3D_XML_SCHEMA_4_1_ATTRIBUTES
public static final java.lang.String X3D_XML_SCHEMA_4_1_ATTRIBUTESXML Schema attributes for X3D element.
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.1.xsd'- See Also:
- X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema, W3C Recommendation, XML Schema Part 1, Structures Second Edition, Section 2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation, W3C Recommendation, XML Schema Part 0: Primer Second Edition, Constant Field Values
-
PROFILE_CORE
public static final java.lang.String PROFILE_CORETooltip: Core Profile includes no nodes and is provided as the basis for custom componentization. Allowed X3D statements for all profiles are: connect ExternProtoDeclare EXPORT field fieldValue IMPORT IS ProtoBody ProtoDeclare ProtoInterface ProtoInstance ROUTE X3D. Allowed X3D nodes for this profile are: MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "Core" (Java syntax) or Core (XML syntax). -
PROFILE_INTERCHANGE
public static final java.lang.String PROFILE_INTERCHANGETooltip: Interchange Profile equals the minimum subset of nodes needed to display lightweight compelling content. Allowed X3D nodes for this profile are: Appearance Background Box Color ColorInterpolator ColorRGBA Cone Coordinate CoordinateInterpolator Cylinder DirectionalLight Group ImageTexture IndexedFaceSet IndexedLineSet IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet LineSet Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OrientationInterpolator PixelTexture PointSet PositionInterpolator ScalarInterpolator Shape Sphere TextureCoordinate TextureCoordinateGenerator TextureTransform TimeSensor Transform TriangleFanSet TriangleSet TriangleStripSet Viewpoint WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "Interchange" (Java syntax) or Interchange (XML syntax). -
PROFILE_CADINTERCHANGE
public static final java.lang.String PROFILE_CADINTERCHANGETooltip: CADInterchange Profile adds support for CADGeometry component nodes to Interchange Profile. Allowed X3D nodes for this profile are: Anchor Appearance CADAssembly CADFace CADLayer CADPart Billboard Collision Color ColorRGBA Coordinate DirectionalLight FragmentShader Group ImageTexture IndexedLineSet IndexedQuadSet IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet Inline LineProperties LineSet LOD Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiShader MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal PixelTexture PointSet QuadSet Shader ShaderAppearance Shape TextureCoordinate TextureCoordinateGenerator TextureTransform Transform TriangleFanSet TriangleSet TriangleStripSet Viewpoint VertexShader WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "CADInterchange" (Java syntax) or CADInterchange (XML syntax). -
PROFILE_INTERACTIVE
public static final java.lang.String PROFILE_INTERACTIVETooltip: Interactive Profile adds interaction nodes (Anchor, KeySensor) to the minimum subset of nodes needed to display lightweight compelling content. Allowed X3D nodes for this profile are: Anchor Appearance Background BooleanFilter BooleanSequencer BooleanToggle BooleanTrigger Box Color ColorInterpolator ColorRGBA Cone Coordinate CoordinateInterpolator Cylinder CylinderSensor DirectionalLight ElevationGrid Group ImageTexture IndexedFaceSet IndexedLineSet IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet Inline IntegerSequencer IntegerTrigger KeySensor LineSet Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OrientationInterpolator IndexedTriangleStripSet Inline IntegerSequencer IntegerTrigger KeySensor LineSet Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OrientationInterpolator PixelTexture PlaneSensor PointLight PointSet PositionInterpolator ProximitySensor ScalarInterpolator Shape Sphere SphereSensor SpotLight StringSensor Switch TextureCoordinate TextureCoordinateGenerator TextureTransform TimeSensor TimeTrigger TouchSensor Transform TriangleFanSet TriangleSet TriangleStripSet Viewpoint VisibilitySensor WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "Interactive" (Java syntax) or Interactive (XML syntax). -
PROFILE_IMMERSIVE
public static final java.lang.String PROFILE_IMMERSIVETooltip: Immersive Profile equals all of the nodes in the VRML97 Specification, plus various X3D node additions including KeySensor, StringSensor and Scene. Allowed X3D nodes for this profile are: Anchor Appearance AudioClip Background Billboard BooleanFilter BooleanSequencer BooleanToggle BooleanTrigger Box Collision Color ColorInterpolator ColorRGBA Cone Coordinate CoordinateInterpolator Cylinder CylinderSensor DirectionalLight ElevationGrid Extrusion Fog FontStyle Group ImageTexture IndexedFaceSet IndexedLineSet IndexedTriangleFan IndexedTriangleSet IndexedTriangleStripSet Inline IntegerSequencer IntegerTrigger KeySensor LineProperties LineSet LoadSensor LOD Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MovieTexture MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OrientationInterpolator PixelTexture PlaneSensor PointLight PointSet Polyline2D Polypoint2D PositionInterpolator ProximitySensor Rectangle2D ScalarInterpolator Script Shape Sound Sphere SphereSensor SpotLight StringSensor Switch Text TextureCoordinate TextureCoordinateGenerator TextureTransform TimeSensor TimeTrigger TouchSensor TriangleFanSet TriangleSet TriangleSet2D TriangleStripSet Transform Viewpoint VisibilitySensor WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "Immersive" (Java syntax) or Immersive (XML syntax). -
PROFILE_MEDICALINTERCHANGE
public static final java.lang.String PROFILE_MEDICALINTERCHANGETooltip: The MedicalInterchange profile adds support for VolumeRendering component to Interchange profile. Allowed X3D nodes for this profile are: Anchor Arc2D ArcClose2D Appearance Background Billboard BlendedVolumeStyle BooleanFilter BooleanSequencer BooleanToggle BooleanTrigger BoundaryEnhancementVolumeStyle Box CartoonVolumeStyle Circle2D ClipPlane Collision Color ColorInterpolator ColorRGBA ComposedVolumeStyle CompositeTexture3D Cone Coordinate CoordinateDouble CoordinateInterpolator Cylinder DirectionalLight Disk2D EdgeEnhancementVolumeStyle FillProperties FontStyle Group ImageTexture ImageTexture3D IndexedFaceSet IndexedLineSet IndexedTriangleFanSet IndexedTriangleSet IndexedTriangleStripSet Inline IntegerSequencer IntegerTrigger IsoSurfaceVolumeData LineProperties LineSet LOD Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString MultiTexture MultiTextureCoordinate MultiTextureTransform NavigationInfo Normal NormalInterpolator OctTree OpacityMapVolumeStyle OrientationInterpolator OrthoViewpoint PixelTexture PixelTexture3D PointSet Polyline2D Polypoint2D PositionInterpolator ProjectionVolumeStyle Rectangle2D ScalarInterpolator SegmentedVolumeData ShadedVolumeStyle Shape SilhouetteEnhancementVolumeStyle Sphere StaticGroup Switch Text TextureCoordinate TextureCoordinate3D TextureCoordinate4D TextureCoordinateGenerator TextureMatrixTransform TextureProperties TextureTransform TextureTransform3D TimeSensor TimeTrigger ToneMappedVolumeStyle Transform TriangleFanSet TriangleSet TriangleStripSet Viewpoint ViewpointGroup VolumeData WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "MedicalInterchange" (Java syntax) or MedicalInterchange (XML syntax). -
PROFILE_MPEG4INTERACTIVE
public static final java.lang.String PROFILE_MPEG4INTERACTIVETooltip: MPEGInteractive Profile defines base interoperability with MPEG4 standards to a small subset of nodes needed to display lightweight compelling content. Allowed X3D nodes for this profile are: Anchor Appearance Background Box Color ColorInterpolator ColorRGBA Cone Coordinate CoordinateInterpolator Cylinder CylinderSensor DirectionalLight ElevationGrid Group ImageTexture IndexedFaceSet IndexedLineSet Inline LineSet Material MetadataBoolean MetadataDouble MetadataFloat MetadataInteger MetadataSet MetadataString NavigationInfo NormalInterpolator OrientationInterpolator PixelTexture PlaneSensor PointLight PointSet PositionInterpolator ProximitySensor ScalarInterpolator Shape Sphere SphereSensor SpotLight Switch TextureCoordinate TextureTransform TimeSensor TouchSensor Transform Viewpoint WorldInfo. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "MPEG4Interactive" (Java syntax) or MPEG4Interactive (XML syntax). -
PROFILE_FULL
public static final java.lang.String PROFILE_FULLTooltip: The Full Profile corresponds to all Immersive X3D nodes plus all approved/implemented extensions. All X3D nodes and statements are allowed in this profile. SFString field named profile with X3DUOM simpleType profileNameChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "Full" (Java syntax) or Full (XML syntax). -
VERSION_3_0
public static final java.lang.String VERSION_3_0Tooltip: X3D version 3.0 approved by ISO in 2004. SFString field named version with X3DUOM simpleType x3dVersionChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "3.0" (Java syntax) or 3.0 (XML syntax). -
VERSION_3_1
public static final java.lang.String VERSION_3_1Tooltip: X3D version 3.1 Amendment 1 approved by ISO in 2005. Backwards compatibility maintained with version 3.0. SFString field named version with X3DUOM simpleType x3dVersionChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "3.1" (Java syntax) or 3.1 (XML syntax). -
VERSION_3_2
public static final java.lang.String VERSION_3_2Tooltip: X3D version 3.2 Amendment 2 approved by ISO in 2007. Backwards compatibility maintained with versions 3.0 and 3.1. SFString field named version with X3DUOM simpleType x3dVersionChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "3.2" (Java syntax) or 3.2 (XML syntax). -
VERSION_3_3
public static final java.lang.String VERSION_3_3Tooltip: X3D version 3.3 approved by ISO in 2013 as International Standard (IS). Backwards compatibility maintained with versions 3.0, 3.1 and 3.2. SFString field named version with X3DUOM simpleType x3dVersionChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "3.3" (Java syntax) or 3.3 (XML syntax). -
VERSION_4_0
public static final java.lang.String VERSION_4_0Tooltip: X3D version 4.0 under final development by Web3D Consortium. Backwards compatibility maintained with versions 3.0, 3.1, 3.2 and 3.3. SFString field named version with X3DUOM simpleType x3dVersionChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "4.0" (Java syntax) or 4.0 (XML syntax). -
NAME
public static final java.lang.String NAMEString constant NAME provides name of this element: X3D.- See Also:
- Constant Field Values
-
COMPONENT
public static final java.lang.String COMPONENTString constant COMPONENT defines X3D component for the X3D element: Core- See Also:
- Constant Field Values
-
LEVEL
public static final int LEVELInteger constant LEVEL provides default X3D Core component level for this element: 1- See Also:
- Constant Field Values
-
HEAD_DEFAULT_VALUE
SFNode field named head has default value null (Java syntax) or NULL (XML syntax). -
PROFILE_DEFAULT_VALUE
public static final java.lang.String PROFILE_DEFAULT_VALUESFString field named profile has default value "Immersive" (Java syntax) or Immersive (XML syntax).- See Also:
- Constant Field Values
-
SCENE_DEFAULT_VALUE
SFNode field named Scene has default value null (Java syntax) or NULL (XML syntax). -
VERSION_DEFAULT_VALUE
public static final java.lang.String VERSION_DEFAULT_VALUESFString field named version has default value "4.0" (Java syntax) or 4.0 (XML syntax).- See Also:
- Constant Field Values
-
FILE_EXTENSION_X3D
public static final java.lang.String FILE_EXTENSION_X3DFile extension for X3D XML Encoding, with dot prepended: .x3d- See Also:
- X3D XML Encoding, Constant Field Values
-
FILE_EXTENSION_CLASSICVRML
public static final java.lang.String FILE_EXTENSION_CLASSICVRMLFile extension for X3D ClassicVRML Encoding, with dot prepended: .x3dv- See Also:
- X3D ClassicVRML Encoding, Constant Field Values
-
FILE_EXTENSION_X3DB
public static final java.lang.String FILE_EXTENSION_X3DBFile extension for X3D Compressed Binary Encoding, with dot prepended: .x3db -
FILE_EXTENSION_VRML97
public static final java.lang.String FILE_EXTENSION_VRML97File extension for VRML97 Encoding, with dot prepended: .wrl- See Also:
- VRML97 Encoding, Constant Field Values
-
FILE_EXTENSION_XML
public static final java.lang.String FILE_EXTENSION_XMLFile extension for Extensible Markup Language, with dot prepended: .xml -
FILE_EXTENSION_SVG
public static final java.lang.String FILE_EXTENSION_SVGFile extension for Scalable Vector Graphics (SVG), with dot prepended: .svg- See Also:
- SVG Working Group, Constant Field Values
-
FILE_EXTENSION_HTML
public static final java.lang.String FILE_EXTENSION_HTMLFile extension for HTML Encoding, with dot prepended: .html- See Also:
- HTML5: HTML syntax, Constant Field Values
-
FILE_EXTENSION_MARKDOWN
public static final java.lang.String FILE_EXTENSION_MARKDOWNFile extension for markdown encoding, with dot prepended: .md -
FILE_EXTENSION_PLY
public static final java.lang.String FILE_EXTENSION_PLYFile extension for PLY file format (Polygon File Format, or Stanford Triangle Format) with dot prepended: .ply. -
FILE_EXTENSION_STL
public static final java.lang.String FILE_EXTENSION_STLFile extension for STL (stereolithography) file format with dot prepended: .stl -
FILE_EXTENSION_XHTML
public static final java.lang.String FILE_EXTENSION_XHTMLFile extension for XHTML Encoding, with dot prepended: .xhtml- See Also:
- HTML5: XHTML syntax, Constant Field Values
-
FILE_EXTENSION_TEXT
public static final java.lang.String FILE_EXTENSION_TEXTFile extension for text files, with dot prepended: .txt- See Also:
- Constant Field Values
-
FILE_EXTENSION_GIF
public static final java.lang.String FILE_EXTENSION_GIFFile extension for Graphics Interchange Format (GIF) image format, with dot prepended: .gif -
FILE_EXTENSION_JPG
public static final java.lang.String FILE_EXTENSION_JPGFile extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpg -
FILE_EXTENSION_JPEG
public static final java.lang.String FILE_EXTENSION_JPEGFile extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpeg -
FILE_EXTENSION_PNG
public static final java.lang.String FILE_EXTENSION_PNGFile extension for Portable Network Graphics (PNG) image format, with dot prepended: .png -
FILE_EXTENSION_JAVA
public static final java.lang.String FILE_EXTENSION_JAVAFile extension for Java source code, with dot prepended: .java -
FILE_EXTENSION_JAVASCRIPT
public static final java.lang.String FILE_EXTENSION_JAVASCRIPTFile extension for JavaScript source code, with dot prepended: .js -
FILE_EXTENSION_JSON
public static final java.lang.String FILE_EXTENSION_JSONFile extension for JavaScript Object Notation (JSON) source data, with dot prepended: .json -
FILE_EXTENSION_PYTHON
public static final java.lang.String FILE_EXTENSION_PYTHONFile extension for Python programming-language source code, with dot prepended: .py -
FILE_EXTENSION_EXI
public static final java.lang.String FILE_EXTENSION_EXIFile extension for Efficient XML Interchange (EXI) compressed XML file, with dot prepended: .exi -
FILE_EXTENSION_GZIP
public static final java.lang.String FILE_EXTENSION_GZIPFile extension for GZIP compressed file, with dot prepended: .gz -
FILE_EXTENSION_ZIP
public static final java.lang.String FILE_EXTENSION_ZIPFile extension for ZIP compressed file, with dot prepended: .zip
-
-
Constructor Details
-
X3DObject
public X3DObject()Constructor for X3DObject to initialize member variables with default values.
-
-
Method Details
-
getElementName
public final java.lang.String getElementName()Provides name of this element: X3D- Specified by:
getElementName
in classX3DConcreteElement
- Returns:
- name of this element
-
getComponent
public final java.lang.String getComponent()Defines X3D component for the X3D element: Core- Specified by:
getComponent
in classX3DConcreteElement
- Returns:
- X3D component for this element
-
getComponentLevel
public final int getComponentLevel()Provides default X3D component level for this element: 1- Specified by:
getComponentLevel
in classX3DConcreteElement
- Returns:
- default X3D component level for this element
-
getFieldType
public java.lang.String getFieldType(java.lang.String fieldName)Indicate type corresponding to given fieldName.- Specified by:
getFieldType
in classX3DConcreteElement
- Parameters:
fieldName
- name of field in this X3D statement- Returns:
- X3D type (SFvec3f etc.), otherwise ConfigurationProperties.ERROR_UNKNOWN_FIELD_TYPE if not recognized
- See Also:
ConfigurationProperties.ERROR_UNKNOWN_FIELD_TYPE
-
getAccessType
public java.lang.String getAccessType(java.lang.String fieldName)Indicate accessType corresponding to given fieldName.- Specified by:
getAccessType
in classX3DConcreteElement
- Parameters:
fieldName
- name of field in this X3D statement- Returns:
- X3D accessType (inputOnly etc.), otherwise ConfigurationProperties.ERROR_UNKNOWN_FIELD_ACCESSTYPE if not recognized
- See Also:
ConfigurationProperties.ERROR_UNKNOWN_FIELD_ACCESSTYPE
-
initialize
public final void initialize()Initialize all member variables to default values.- Overrides:
initialize
in classX3DConcreteStatement
-
toStringXML
public java.lang.String toStringXML()Provide XML string serialization of this model subgraph, utilizing X3D XML encoding and conforming to X3D Canonical Form. -
toStringXML
public java.lang.String toStringXML(int indentLevel)Provide XML string serialization of this model subgraph, utilizing X3D XML encoding and conforming to X3D Canonical Form.- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- X3D string
- See Also:
FILE_EXTENSION_X3D
,FILE_EXTENSION_XML
,toStringXML()
,toFileXML(String)
,toFileX3D(String)
, X3D XML Encoding, X3D Compressed Binary Encoding: X3D Canonical Form, X3D Canonicalization (C14N) Tool
-
toFileXML
public java.io.File toFileXML(java.lang.String fileName)Serialize scene graph using toStringX3D() to create a new XML-encoding X3D file with extension x3d or xml.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .x3d- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toStringXML()
,toFileXML(String)
,toFileX3D(String)
, Buffered I/O Methods for Text Files
-
isFileNameNMTOKEN
public static boolean isFileNameNMTOKEN(java.lang.String fileName)Check whether fileName is satisfactory NMTOKEN, ignoring prior path (if any).- Parameters:
fileName
- name of file to check- Returns:
- whether fileName is satisfactory NMTOKEN
- See Also:
SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
-
fileNameMeetsX3dNamingConventions
public static boolean fileNameMeetsX3dNamingConventions(java.lang.String fileName)Check whether fileName ending in .x3d meets X3D naming conventions, ignoring prior path (if any). Not observing these conventions can cause errors when converting to a Java file name.- Parameters:
fileName
- name of file to check- Returns:
- whether fileName ending in .x3d is satisfactory NMTOKEN
- See Also:
FILE_EXTENSION_X3D
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
-
toFileX3D
public java.io.File toFileX3D(java.lang.String fileName)Serialize scene graph using toStringX3D() to create a new XML-encoding X3D file with extension x3d or xml.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .x3d- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
X3DConcreteElement.toStringX3D()
,toStringXML()
,toFileXML(String)
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
, Buffered I/O Methods for Text Files
-
toFileClassicVRML
public java.io.File toFileClassicVRML(java.lang.String fileName)Serialize scene graph using toStringClassicVRML() to create a new X3D file with extension x3dv.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .x3dv- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
X3DConcreteElement.toStringClassicVRML()
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
, Buffered I/O Methods for Text Files
-
toFileVRML97
public java.io.File toFileVRML97(java.lang.String fileName)Serialize scene graph using toStringVRML97() to create a new X3D file with extension wrl.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .wrl- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
X3DConcreteElement.toStringVRML97()
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
, Buffered I/O Methods for Text Files
-
toFileStylesheetConversion
public java.io.File toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName)Utility method for toFileStylesheetConversion() with no stylesheet parameters.- Parameters:
stylesheetName
- name of stylesheet to applyfileName
- name of file to create and save, can include local directory path, must end with allowed file extension (e.g. ".html")- Returns:
- File containing result (if operation succeeds), null otherwise
-
toFileStylesheetConversion
public java.io.File toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName, java.lang.String parameterName1, java.lang.String parameterValue1)Utility method for toFileStylesheetConversion() with a single stylesheet name=value parameter pair.- Parameters:
stylesheetName
- name of stylesheet to applyfileName
- name of file to create and save, can include local directory path, must end with allowed file extension (e.g. ".html")parameterName1
- first stylesheet parameter nameparameterValue1
- first stylesheet parameter value- Returns:
- File containing result (if operation succeeds), null otherwise
-
toFileStylesheetConversion
public java.io.File toFileStylesheetConversion(java.lang.String stylesheetName, java.lang.String fileName, java.lang.String parameterName1, java.lang.String parameterValue1, java.lang.String parameterName2, java.lang.String parameterValue2)Serialize current X3DObject scene graph using toFileX3D() and then create a new file with corresponding filename extension (e.g. .html) using an embedded stylesheet.- Parameters:
stylesheetName
- name of stylesheet to applyfileName
- name of file to create and save, can include local directory path, must end with allowed file extension (e.g. ".html")parameterName1
- first stylesheet parameter nameparameterValue1
- first stylesheet parameter valueparameterName2
- second stylesheet parameter nameparameterValue2
- second stylesheet parameter value- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileX3DOM(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
,ConfigurationProperties.X3DJSAIL_JAR_RELEASE_VERSIONS
, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileHtmlDocumentation
public java.io.File toFileHtmlDocumentation(java.lang.String fileName)Serialize scene graph using toFileX3D() and then create a new pretty-print HTML file with extension .html, suitable for documentation purposes. Also create SVG output file (with same base name) for Extrusion crossSection, if found.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
ConfigurationProperties.STYLESHEET_HTML_DOCUMENTATION
,ConfigurationProperties.STYLESHEET_ExtrusionCrossSectionSVG
,X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileX3DOM(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
getTempFileFromX3dJsailJar
public static java.io.File getTempFileFromX3dJsailJar(java.lang.String internalPath, java.lang.String fileName) -
toStringJSON
public java.lang.String toStringJSON()Serialize scene graph using X3dToJson.xslt stylesheet to create a new JSON-encoding string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileJSON(String)
,ConfigurationProperties.isNormalizeCommentWhitespace()
, X3D JSON Encoding, X3D to JSON Stylesheet Converter
-
toStringPython
public java.lang.String toStringPython()Serialize scene graph using X3dToPython.xslt stylesheet to create a new Python-language string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFilePython(String)
,ConfigurationProperties.isNormalizeCommentWhitespace()
, Python.org, Python (programming language), Python X3D Package x3d.py
-
toStringJava
public java.lang.String toStringJava()Serialize scene graph using toFileJava() to create new Java source as a string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileJava(String)
-
toStringJavaScript
public java.lang.String toStringJavaScript()Serialize scene graph using NodeSerializer.js to create a JavaScript string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileJavaScript(String)
-
toFileJavaScript
public java.io.File toFileJavaScript(java.lang.String fileName)Serialize scene graph using NodeSerializer.js to create a JavaScript file.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .js- Returns:
- File containing result (if operation succeeds), empty otherwise
- See Also:
toStringJavaScript()
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
-
toFileJavaScript
public java.io.File toFileJavaScript(java.lang.String fileName, boolean includeWeb3dLicense) -
toStringHtmlDocumentation
public java.lang.String toStringHtmlDocumentation()Serialize scene graph using STYLESHEET_HTML_DOCUMENTATION to create a new X3DOM html page as a string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileHtmlDocumentation(String)
,FILE_EXTENSION_HTML
,FILE_EXTENSION_XHTML
,ConfigurationProperties.STYLESHEET_HTML_DOCUMENTATION
, X3DOM open-source X3D player
-
toStringModelMetaMarkdown
public java.lang.String toStringModelMetaMarkdown()Produce model meta information as `name`=`value` pairs, providing markdown output as a string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileModelMetaMarkdown(String)
,FILE_EXTENSION_MARKDOWN
,ConfigurationProperties.STYLESHEET_MODEL_META_TO_MARKDOWN
-
toStringX3dTidy
public java.lang.String toStringX3dTidy()Produce alternate cleaned-up X3D scene using STYLESHEET_X3DTIDY, providing output as a string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileX3dTidy(String)
,FILE_EXTENSION_X3D
,ConfigurationProperties.STYLESHEET_X3DTIDY
, X3D Tidy for Scene Cleanup, Corrections and Modifications
-
toStringX3DOM
public java.lang.String toStringX3DOM()Serialize scene graph using STYLESHEET_X3DOM to create a new X3DOM html page as a string.- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileX3DOM(String)
,FILE_EXTENSION_HTML
,FILE_EXTENSION_XHTML
,ConfigurationProperties.STYLESHEET_X3DOM
, X3DOM open-source X3D player
-
toStringX_ITE
public java.lang.String toStringX_ITE(java.lang.String sourceSceneName)Serialize scene graph using STYLESHEET_X3DOM (with appropriate parameters) to create a new X_ITE html page as a string.- Parameters:
sourceSceneName
- X3D file to load and view- Returns:
- String containing result (if operation succeeds), empty otherwise
- See Also:
toFileX_ITE(String,String)
, X_ITE open-source X3D player,FILE_EXTENSION_HTML
,FILE_EXTENSION_XHTML
,ConfigurationProperties.STYLESHEET_X3DOM
,ConfigurationProperties.STYLESHEET_X_ITE
-
toFileJSON
public java.io.File toFileJSON(java.lang.String fileName)Serialize scene graph using X3dToJson.xslt stylesheet to create a new JSON-encoding X3D file with extension json.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toStringJSON()
,X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,toFileX3DOM(String)
,FILE_EXTENSION_JSON
,FILE_EXTENSION_JAVASCRIPT
,ConfigurationProperties.STYLESHEET_JSON
,ConfigurationProperties.isNormalizeCommentWhitespace()
, X3dToJson.xslt, examples/HelloWorldProgramOutput.json, X3D JSON Encoding, X3D to JSON Stylesheet Converter, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFilePython
public java.io.File toFilePython(java.lang.String fileName)Serialize scene graph using X3dToPython.xslt stylesheet to create a new Python-language X3D file with extension py.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toStringPython()
,toStringJSON()
,X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,toFileX3DOM(String)
,FILE_EXTENSION_PYTHON
,ConfigurationProperties.STYLESHEET_PYTHON
,ConfigurationProperties.isNormalizeCommentWhitespace()
, X3dToPython.xslt, examples/HelloWorldProgramOutput.py, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileJava
public java.io.File toFileJava(java.lang.String fileName)Serialize scene graph using X3dToJava.xslt stylesheet to create a new Java source file with extension java, no default license included.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toFileJava(String,boolean)
, X3dToJava.xslt, examples/HelloWorldProgramOutput.java
-
toFileJava
public java.io.File toFileJava(java.lang.String fileName, boolean includeWeb3dLicense)Serialize scene graph using X3dToJava.xslt stylesheet to create a new Java source file with extension java.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .htmlincludeWeb3dLicense
- whether to insert default open-source Web3D license at top of source file- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,toFileX3DOM(String)
,FILE_EXTENSION_JSON
,FILE_EXTENSION_JAVASCRIPT
,ConfigurationProperties.STYLESHEET_JSON
, X3dToJava.xslt, examples/HelloWorldProgramOutput.java, X3D JSON Encoding, X3D to JSON Stylesheet Converter, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
setIncludeSubdirectoryPaths
public void setIncludeSubdirectoryPaths(boolean value) -
toFileModelMetaMarkdown
public java.io.File toFileModelMetaMarkdown(java.lang.String fileName)Create model meta information as `name`=`value` pairs, providing markdown output as an output file having extension .md.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toStringModelMetaMarkdown()
,X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
,ConfigurationProperties.STYLESHEET_MODEL_META_TO_MARKDOWN
, X3D Tidy for Scene Cleanup, Corrections and Modifications, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileX3dTidy
public java.io.File toFileX3dTidy(java.lang.String fileName)Create alternate cleaned-up X3D scene using STYLESHEET_X3DTIDY within an output file having extension .x3d.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
toStringX3dTidy()
,X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
,ConfigurationProperties.STYLESHEET_X3DTIDY
, X3D Tidy for Scene Cleanup, Corrections and Modifications, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileX3DOM
public java.io.File toFileX3DOM(java.lang.String fileName)Create displayable scene page rendered with X3DOM, using STYLESHEET_X3DOM by serializing XML syntax within an XHTML file having extension .xhtml.- Parameters:
fileName
- name of file to create and save, can include local directory path, must end with .xhtml (preferred) or .html- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- X3DOM open-source X3D player,
X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,SFStringObject.isNMTOKEN(String)
,SFStringObject.meetsX3dInteroperabilityNamingConventions(String)
,ConfigurationProperties.STYLESHEET_X3DOM
, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileX_ITE
public java.io.File toFileX_ITE(java.lang.String sourceSceneName, java.lang.String resultFileName)Create displayable scene page rendered with X_ITE (formerly Cobweb) using STYLESHEET_X3DOM and special settings, by serializing XML syntax within an XHTML file having extension .xhtml.- Parameters:
sourceSceneName
- X3D file to load and viewresultFileName
- name of file to create and save, can include local directory path, must end with .html (preferred) or .xhtml- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- X_ITE open-source X3D player,
X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX3DOM(String)
,toFileX_ITE(String,String)
,toFileCobweb(String,String)
,ConfigurationProperties.STYLESHEET_X3DOM
, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
toFileCobweb
@Deprecated public java.io.File toFileCobweb(java.lang.String sourceSceneName, java.lang.String resultFileName)Deprecated.Create displayable scene page rendered with X_ITE (formerly Cobweb) using STYLESHEET_X3DOM and special settings, by serializing XML syntax within an XHTML file having extension .xhtml.- Parameters:
sourceSceneName
- X3D file to load and viewresultFileName
- name of file to create and save, can include local directory path, must end with .html (preferred) or .xhtml- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- X_ITE open-source X3D player,
X3DConcreteElement.toStringX3D()
,toFileX3D(String)
,toFileJava(String)
,toFileJSON(String)
,toFilePython(String)
,toFileHtmlDocumentation(String)
,toFileX3DOM(String)
,toFileX_ITE(String,String)
,ConfigurationProperties.STYLESHEET_X3DOM
, Saxonica > Saxon > Using XSLT > Invoking XSLT from an application, Saxon-HE 9.7, Java Tutorials: Transforming XML Data with XSLT, Java Tutorials: Transforming XML Data with XSLT, sample files, Buffered I/O Methods for Text Files
-
fromFileZIP
public boolean fromFileZIP(java.lang.String zipFileName, java.lang.String outputFileName)Load new model from a zip file, using unzip to extract the model plus any associated files into the same path location.- Parameters:
zipFileName
- name of zip file to load, can include local directory path, must end with .zipoutputFileName
- name of output file to save, can include local directory path, must end with .x3d or .xml- Returns:
- boolean if operation succeeds in creating this X3DObject, false otherwise
- See Also:
fromFileZIP(String,String,String)
-
fromFileZIP
public boolean fromFileZIP(java.lang.String zipFileName, java.lang.String outputFileName, java.lang.String modelFileName)Load new model from a zip file, using unzip to extract the model plus any associated files into the same path location.
Warning: If nomodelFileName
is provided, then the first.x3d
model encountered in the zip file is returned (if any).
Warning: this method overwrites any previously existing file versions when decompressing.- Parameters:
zipFileName
- name of zip file to load, can include local directory path, must end with .zipoutputFileName
- name of output file to save, can include local directory path, must end with .x3d or .xmlmodelFileName
- name of model file to load, can include local directory path, must end with .x3d- Returns:
- boolean if operation succeeds in creating this X3DObject, false otherwise
- See Also:
- Wikipedia: ZIP file format,
Java Package java.util.zip for ZIP and GZIP file formats,
FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,fromFileEXI(String)
,fromFileGZIP(String)
,toFileZIP(String,String)
,fromFileZIP(String,String)
-
fromFileGZIP
public boolean fromFileGZIP(java.lang.String gzipFileName)Load new model from a gz gzip file, using ungzip to extract the model into the same path location.
Warning: this method overwrites any previously existing file versions when decompressing.- Parameters:
gzipFileName
- name of file to load, can include local directory path, must end with .exi- Returns:
- boolean if operation succeeds in creating this X3DObject, false otherwise
- See Also:
- Wikipedia: GZIP file format,
Java Package java.util.zip for ZIP and GZIP file formats,
FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,fromFileEXI(String)
,fromFileZIP(String,String)
,toFileGZIP(String)
-
fromFileEXI
public boolean fromFileEXI(java.lang.String exiFileName)Load new model from an EXI file, using unzip to extract the model plus any associated files into the same path location.
Warning: this method overwrites any previously existing file versions when decompressing.- Parameters:
exiFileName
- name of file to load, can include local directory path, must end with .exi- Returns:
- boolean if operation succeeds in creating this X3DObject, false otherwise
- See Also:
- OpenEXI
Nagasena Tutorial,
EXIFICIENT Java
Implementations,
Wikipedia:
Efficient XML Interchange (EXI) file format,
ConfigurationProperties.getExiEngine()
,ConfigurationProperties.setExiEngine(String)
,FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,toFileEXI(String)
,fromFileZIP(String,String)
,fromFileGZIP(String)
-
isEmpty
public boolean isEmpty()Determine if this X3D model is empty and no content is present.- Returns:
- true if no head and no Scene found, otherwise false
-
loadModelFromFileX3D
public boolean loadModelFromFileX3D(java.lang.String fileName)Load X3D model from file to initialize or replace contents of this X3DObject. Supports .x3d or .xml file encodings.- Parameters:
fileName
- name of model file that replaces current X3DObject- Returns:
- true if replacement successful, false otherwise
-
loadModelFromFileX3D
public boolean loadModelFromFileX3D(java.lang.String path, java.lang.String fileName)Load X3D model from file to initialize or replace contents of this X3DObject. Supports .x3d or .xml file encodings.- Parameters:
path
- directory path to file of interestfileName
- name of model file that replaces current X3DObject- Returns:
- true if replacement successful, false otherwise
-
loadModelFromFileX3D
public boolean loadModelFromFileX3D(java.io.File x3dFile)Load X3D model from file to initialize or replace contents of this X3DObject. Supports .x3d or .xml file encodings.- Parameters:
x3dFile
- model file that replaces current X3DObject- Returns:
- true if replacement successful, false otherwise
-
replace
Replaces current X3DObject with new X3DObject.- Parameters:
newX3DObject
- replaces current X3DObject- Returns:
- true if replacement successful, false otherwise
-
toFileEXI
public java.io.File toFileEXI(java.lang.String resultFileName)Save current model as an EXI file.- Parameters:
resultFileName
- name of file to create and save, can include local directory path, must end with .exi- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- OpenEXI Nagasena Tutorial,
ConfigurationProperties.getExiEngine()
,ConfigurationProperties.setExiEngine(String)
,FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,fromFileEXI(String)
,toFileGZIP(String)
,toFileZIP(String,String)
,toFileX3D(String)
-
toFileGZIP
public java.io.File toFileGZIP(java.lang.String resultFileName)Save current model as a GZIP file.- Parameters:
resultFileName
- name of file to create and save, can include local directory path, must end with .gz (TODO or .tgz)- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- OpenEXI Nagasena Tutorial,
FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,toFileEXI(String)
,toFileZIP(String,String)
,toFileX3D(String)
-
toFileZIP
public java.io.File toFileZIP(java.lang.String zipFileName, java.lang.String modelName)Save current model as a ZIP file.- Parameters:
zipFileName
- name of zip archive file to create and save, can include local directory path, must end with .zipmodelName
- name of X3D file to create and save within the .zip archive- Returns:
- File containing result (if operation succeeds), null otherwise
- See Also:
- OpenEXI Nagasena Tutorial,
FILE_EXTENSION_EXI
,FILE_EXTENSION_GZIP
,FILE_EXTENSION_ZIP
,toFileEXI(String)
,toFileGZIP(String)
,toFileX3D(String)
-
validationReport
public java.lang.String validationReport()Provide thorough X3DJSAIL validation results for this X3D model.- Returns:
- "success" or validation results plus exception information (if any)
-
handleArguments
public void handleArguments(java.lang.String[] args)Utility method for standalone programs that get created with stylesheet X3dToJava.xslt, also sets loaded X3D model fileInputStream global CommandLine to this X3DObject. Invocation switches are listed in CommandLine.USAGE help.- Parameters:
args
- command-line arguments- See Also:
CommandLine
,CommandLine.USAGE
,CommandLine.USAGE_LONG
, X3dToJava.xslt, examples/HelloWorldProgramOutput.java
-
getHead
Provide headObject instance (using a properly typed node) from inputOutput SFNode field head.
Tooltip: Include a head element to contain component, unit or meta statements for this X3D model. *- Returns:
- value of head field
-
setHead
Accessor method to assign headObject instance (using a properly typed node) to inputOutput SFNode field head.
Tooltip: Include a head element to contain component, unit or meta statements for this X3D model. *- Parameters:
newValue
- is new value for the head field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
clearHead
Utility method to clear SFNode value of head field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
hasHead
public boolean hasHead()Indicate whether an object is available for inputOutput SFNode field head.- Returns:
- whether a concrete statement or CommentsBlock is available.
- See Also:
getHead()
-
getProfile
public java.lang.String getProfile()Provide String enumeration value (baseType xs:NMTOKEN) ["Core" | "Interchange" | "CADInterchange" | "Interactive" | "Immersive" | "MedicalInterchange" | "MPEG4Interactive" | "Full"] from inputOutput SFString field named profile.
Tooltip: profile attribute is required and defines the player or tool support needed for this model.- Hint: Core profile corresponds to minimalist extensible profile with Metadata* nodes, useful for defining custom scene capabilities via addition of individual component statements. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/coreprofile.html
- Hint: Interchange profile corresponds to minimum lightweight subset of nodes needed to display (or import/export) compelling 3D content. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interchange.html
- Hint: Interactive profile corresponds to Interchange geometry plus simple user interaction. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interactive.html
- Hint: Immersive profile is common and approximately matches VRML97 with Script and Prototypes. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/immersive.html
- Hint: CADInterchange profile (X3D version 3.1 or later) corresponds to Interchange geometry plus distillation of computer-aided design (CAD) models. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/CADInterchange.html
- Hint: MedicalInterchange profile (X3D version 3.3 or later) adds support for VolumeRendering component to Interchange profile. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/MedInterchange.html
- Hint: Full profile contains all nodes defined in X3D specification. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/fullProfile.html
- Warning: PROFILE is capitalized and is a separate statement in the ClassicVRML Encoding.
- Hint: X3D Architecture 7.2.5.3 PROFILE statement https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#PROFILEStatement
Available enumeration values for string comparison:CORE
,INTERCHANGE
,CADINTERCHANGE
,INTERACTIVE
,IMMERSIVE
,MEDICALINTERCHANGE
,MPEG4INTERACTIVE
,FULL
.- Returns:
- value of profile field
-
setProfile
Accessor method to assign String enumeration value ("Core" | "Interchange" | "CADInterchange" | "Interactive" | "Immersive" | "MedicalInterchange" | "MPEG4Interactive" | "Full") to inputOutput SFString field named profile.
Warning: authors can only choose from a strict list of enumeration values (CORE
,INTERCHANGE
,CADINTERCHANGE
,INTERACTIVE
,IMMERSIVE
,MEDICALINTERCHANGE
,MPEG4INTERACTIVE
,FULL
).
Tooltip: profile attribute is required and defines the player or tool support needed for this model.- Hint: Core profile corresponds to minimalist extensible profile with Metadata* nodes, useful for defining custom scene capabilities via addition of individual component statements. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/coreprofile.html
- Hint: Interchange profile corresponds to minimum lightweight subset of nodes needed to display (or import/export) compelling 3D content. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interchange.html
- Hint: Interactive profile corresponds to Interchange geometry plus simple user interaction. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/interactive.html
- Hint: Immersive profile is common and approximately matches VRML97 with Script and Prototypes. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/immersive.html
- Hint: CADInterchange profile (X3D version 3.1 or later) corresponds to Interchange geometry plus distillation of computer-aided design (CAD) models. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/CADInterchange.html
- Hint: MedicalInterchange profile (X3D version 3.3 or later) adds support for VolumeRendering component to Interchange profile. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/MedInterchange.html
- Hint: Full profile contains all nodes defined in X3D specification. https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/fullProfile.html
- Warning: PROFILE is capitalized and is a separate statement in the ClassicVRML Encoding.
- Hint: X3D Architecture 7.2.5.3 PROFILE statement https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#PROFILEStatement
- Parameters:
newValue
- is new value for the profile field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setProfile
Assign typed object value to SFString profile field, similar tosetProfile(String)
.- Parameters:
newValue
- is new value for the profile field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getScene
Provide SceneObject instance (using a properly typed node) from inputOutput SFNode field Scene.
Tooltip: Include a Scene element to contain scene-graph nodes for this X3D model.- Warning: Scene is a child of X3D statement, and must follow the (optional) head statement.
- Returns:
- value of Scene field
-
setScene
Accessor method to assign SceneObject instance (using a properly typed node) to inputOutput SFNode field Scene.
Tooltip: Include a Scene element to contain scene-graph nodes for this X3D model.- Warning: Scene is a child of X3D statement, and must follow the (optional) head statement.
- Parameters:
newValue
- is new value for the Scene field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
clearScene
Utility method to clear SFNode value of Scene field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
hasScene
public boolean hasScene()Indicate whether an object is available for inputOutput SFNode field Scene.- Returns:
- whether a concrete statement or CommentsBlock is available.
- See Also:
getScene()
-
getVersion
public java.lang.String getVersion()Provide String enumeration value (baseType xs:NMTOKEN) ["3.0" | "3.1" | "3.2" | "3.3" | "4.0"] from inputOutput SFString field named version.
Tooltip: Default is highest value matching schema and DOCTYPE in the scene.- Hint: X3D version 3.0 standardization occurred in 2004, version 3.1 standardization occurred in 2006, version 3.2 standardization occurred in 2008, version 3.3 standardization occurred in 2012, version 4.0 undergoing final implementation, evaluation and publication in 2020.
- Warning: X3D version 4.0 is experimental and under development, focused on HTML5/DOM interoperability.
- Warning: X3D version 4.1 is experimental and under development, focused on Mixed and Augmented Reality (MAR).
- Hint: X3D version 4 Overview at https://www.web3d.org/x3d4
- Hint: X3D version 4 Implementations Status at http://www.web3d.org/x3dv4-implementations
Available enumeration values for string comparison:3_0
,3_1
,3_2
,3_3
,4_0
.- Returns:
- value of version field
-
setVersion
Accessor method to assign String enumeration value ("3.0" | "3.1" | "3.2" | "3.3" | "4.0") to inputOutput SFString field named version.
Warning: authors can only choose from a strict list of enumeration values (3_0
,3_1
,3_2
,3_3
,4_0
).
Tooltip: Default is highest value matching schema and DOCTYPE in the scene.- Hint: X3D version 3.0 standardization occurred in 2004, version 3.1 standardization occurred in 2006, version 3.2 standardization occurred in 2008, version 3.3 standardization occurred in 2012, version 4.0 undergoing final implementation, evaluation and publication in 2020.
- Warning: X3D version 4.0 is experimental and under development, focused on HTML5/DOM interoperability.
- Warning: X3D version 4.1 is experimental and under development, focused on Mixed and Augmented Reality (MAR).
- Hint: X3D version 4 Overview at https://www.web3d.org/x3d4
- Hint: X3D version 4 Implementations Status at http://www.web3d.org/x3dv4-implementations
- Parameters:
newValue
- is new value for the version field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setVersion
Assign typed object value to SFString version field, similar tosetVersion(String)
.- Parameters:
newValue
- is new value for the version field.- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addComments
Add comment as String to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newComment
- initial value- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
addComments
Add comments as String[] array to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newComments
- array of comments- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
addComments
Add CommentsBlock to contained commentsList.- Specified by:
addComments
in classX3DConcreteElement
- Parameters:
newCommentsBlock
- block of comments to add- Returns:
X3DObject
- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
toStringX3D
public java.lang.String toStringX3D(int indentLevel)Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.- Specified by:
toStringX3D
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- X3D string
- See Also:
FILE_EXTENSION_X3D
,FILE_EXTENSION_XML
,toStringXML()
,toFileXML(String)
,toFileX3D(String)
, X3D XML Encoding, X3D Compressed Binary Encoding: X3D Canonical Form, X3D Canonicalization (C14N) Tool
-
toStringClassicVRML
public java.lang.String toStringClassicVRML(int indentLevel)Recursive method to provide ClassicVRML string serialization.- Specified by:
toStringClassicVRML
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- ClassicVRML string
- See Also:
FILE_EXTENSION_CLASSICVRML
, X3D Resources: Virtual Reality Modeling Language (VRML) 97, Extensible 3D (X3D) encodings Part 2: Classic VRML encoding, Extensible 3D (X3D) encodings Part 2: Classic VRML encoding, Annex A: Grammar
-
toStringVRML97
public java.lang.String toStringVRML97(int indentLevel)Recursive method to provide VRML97 string serialization.- Specified by:
toStringVRML97
in classX3DConcreteElement
- Parameters:
indentLevel
- number of levels of indentation for this element- Returns:
- VRML97 string
- See Also:
FILE_EXTENSION_VRML97
, X3D Resources: Virtual Reality Modeling Language (VRML) 97, Virtual Reality Modeling Language (VRML) 97 specification, VRML 97 v2.1 Amendment
-
findElementByNameValue
Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element. Elements with name fields include meta, Metadata* nodes, field/fieldValue, ProtoDeclare/ExternProtoDeclare/ProtoInstance, CAD and HAnim nodes.
Warning: first start with findAncestorSceneObject() to check entire scene graph, or findAncestorX3DObject() to check entire model document.
Warning: more than one element may be found that has the same name, this method does not handle that case.- Specified by:
findElementByNameValue
in classX3DConcreteElement
- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- object reference to found element, null otherwise
- See Also:
findNodeByDEF(String)
,X3DConcreteElement.hasAncestorSceneObject()
,X3DConcreteElement.findAncestorX3DObject()
-
findElementByNameValue
public X3DConcreteElement findElementByNameValue(java.lang.String nameValue, java.lang.String elementName)Recursive method to provide object reference to node or statement by name attribute, if found as part of this element or in a contained element. Elements with name fields include meta, Metadata* nodes, field/fieldValue, ProtoDeclare/ExternProtoDeclare/ProtoInstance, CAD and HAnim nodes.
Warning: first start with findAncestorSceneObject() to check entire scene graph, or findAncestorX3DObject() to check entire model document.
Warning: more than one element may be found that has the same name, this method does not handle that case.- Specified by:
findElementByNameValue
in classX3DConcreteElement
- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)elementName
- identifies the element of interest (meta MetadataString ProtoDeclare CADassembly ProtoInstance HAnimHumanoid etc.)- Returns:
- object reference to found element, null otherwise
- See Also:
findNodeByDEF(String)
,X3DConcreteElement.hasAncestorSceneObject()
,X3DConcreteElement.findAncestorX3DObject()
-
hasElementByNameValue
public boolean hasElementByNameValue(java.lang.String nameValue, java.lang.String elementName)Recursive method to determine whether node or statement with given name attribute is found, meaning both objects are attached to same scene graph.- Parameters:
nameValue
- is value of the name field being searched for in this element and child elements(if any)elementName
- identifies the element of interest (meta MetadataString ProtoDeclare CADassembly ProtoInstance HAnimHumanoid etc.)- Returns:
- whether node is found
- See Also:
findElementByNameValue(String, String)
-
findNodeByDEF
Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.
Warning: first start with findAncestorSceneObject() to check entire scene graph, or findAncestorX3DObject() to check entire model document.
Warning: more than one element may be found that has the same DEF, this method does not handle that case.- Specified by:
findNodeByDEF
in classX3DConcreteElement
- Parameters:
DEFvalue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- object reference to found node, null otherwise
- See Also:
findElementByNameValue(String)
,X3DConcreteElement.hasAncestorSceneObject()
,X3DConcreteElement.findAncestorX3DObject()
-
hasNodeByDEF
public boolean hasNodeByDEF(java.lang.String DEFvalue)Recursive method to determine whether node with DEFvalue is found, meaning both objects are attached to same scene graph.- Parameters:
DEFvalue
- is value of the name field being searched for in this element and child elements(if any)- Returns:
- whether node is found
- See Also:
findNodeByDEF(String)
-
validate
public java.lang.String validate()Recursive method to validate this element plus all contained nodes and statements, using both datatype-specification value checks and regular expression (regex) checking of corresponding string values.- Specified by:
validate
in classX3DConcreteElement
- Returns:
- validation results (if any)
-
supportsX3dVersion
Confirm whether given version is supported by current X3D object.- Parameters:
otherVersion
- other X3D version to check- Returns:
- whether current X3D version is greater than or equal to otherVersion
- Throws:
InvalidFieldValueException
- if provided with illegal value
-
supportsX3dProfile
Confirm whether given profile is supported by current X3D model- Parameters:
otherProfile
- different X3D profile for comparison- Returns:
- whether current X3D model supports otherProfile
- Throws:
InvalidFieldValueException
- if provided with illegal value
-
supportsX3dComponent
public boolean supportsX3dComponent(java.lang.String otherComponent, int minimumLevel) throws InvalidFieldValueExceptionConfirm whether given component is supported by current X3D model, Warning: no support for level tests yet. TODO.- Parameters:
otherComponent
- other component to checkminimumLevel
- minimum level of component support needed- Returns:
- comparison result
- Throws:
InvalidFieldValueException
- if provided with illegal value(s)
-