Class X3DObject

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COMPONENT
      String constant COMPONENT defines X3D component for the X3D element: Core
      static java.lang.String FILE_EXTENSION_CLASSICVRML
      File extension for X3D ClassicVRML Encoding, with dot prepended: .x3dv
      static java.lang.String FILE_EXTENSION_EXI
      File extension for Efficient XML Interchange (EXI) compressed XML file, with dot prepended: .exi
      static java.lang.String FILE_EXTENSION_GIF
      File extension for Graphics Interchange Format (GIF) image format, with dot prepended: .gif
      static java.lang.String FILE_EXTENSION_GZIP
      File extension for GZIP compressed file, with dot prepended: .gz
      static java.lang.String FILE_EXTENSION_HTML
      File extension for HTML Encoding, with dot prepended: .html
      static java.lang.String FILE_EXTENSION_JAVA
      File extension for Java source code, with dot prepended: .java
      static java.lang.String FILE_EXTENSION_JAVASCRIPT
      File extension for JavaScript source code, with dot prepended: .js
      static java.lang.String FILE_EXTENSION_JPEG
      File extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpeg
      static java.lang.String FILE_EXTENSION_JPG
      File extension for Joint Photographic Experts Group (JPEG) image format, with dot prepended: .jpg
      static java.lang.String FILE_EXTENSION_JSON
      File extension for JavaScript Object Notation (JSON) source data, with dot prepended: .json
      static java.lang.String FILE_EXTENSION_MARKDOWN
      File extension for markdown encoding, with dot prepended: .md
      static 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: .png
      static java.lang.String FILE_EXTENSION_PYTHON
      File extension for Python programming-language source code, with dot prepended: .py
      static java.lang.String FILE_EXTENSION_STL
      File extension for STL (stereolithography) file format with dot prepended: .stl
      static java.lang.String FILE_EXTENSION_SVG
      File extension for Scalable Vector Graphics (SVG), with dot prepended: .svg
      static java.lang.String FILE_EXTENSION_TEXT
      File extension for text files, with dot prepended: .txt
      static java.lang.String FILE_EXTENSION_VRML97
      File extension for VRML97 Encoding, with dot prepended: .wrl
      static java.lang.String FILE_EXTENSION_X3D
      File extension for X3D XML Encoding, with dot prepended: .x3d
      static java.lang.String FILE_EXTENSION_X3DB
      File extension for X3D Compressed Binary Encoding, with dot prepended: .x3db
      static java.lang.String FILE_EXTENSION_XHTML
      File extension for XHTML Encoding, with dot prepended: .xhtml
      static java.lang.String FILE_EXTENSION_XML
      File extension for Extensible Markup Language, with dot prepended: .xml
      static java.lang.String FILE_EXTENSION_ZIP
      File extension for ZIP compressed file, with dot prepended: .zip
      static 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: 1
      static 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 VRML 97 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 java.util.ArrayList<java.lang.String> profileNameChoices
      List of specification-defined enumeration values, with additional author-defined enumeration values not allowed.
      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 v3.0 approved by ISO in 2004.
      static java.lang.String VERSION_3_1
      Tooltip: X3D v3.1 Amendment 1 approved by ISO in 2005.
      static java.lang.String VERSION_3_2
      Tooltip: X3D v3.2 Amendment 2 approved by ISO in 2007.
      static java.lang.String VERSION_3_3
      Tooltip: X3D v3.3 approved by ISO in 2013 as International Standard (IS).
      static java.lang.String VERSION_4_0
      Tooltip: X3D v4.0 under construction by Web3D Consortium.
      static java.lang.String VERSION_DEFAULT_VALUE
      SFString field named version has default value "3.3" (Java syntax) or 3.3 (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.util.ArrayList<java.lang.String> x3dVersionChoices
      List of specification-defined enumeration values, with additional author-defined enumeration values not allowed.
      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: Core
      int getComponentLevel()
      Provides default X3D component level for this element: 1
      java.lang.String getElementName()
      Provides name of this element: X3D
      java.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 profileNameChoices) ["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 x3dVersionChoices) ["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 in 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 to setProfile(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 to setVersion(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 model
      boolean 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 JavaScriptSerializer.js to create a JavaScript file.
      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 JavaScriptSerializer.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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait