public class X3DLoaderObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
DEFAULT_DTD_VALIDATE
Default dtdValidate value for documentBuilderFactory
|
boolean |
DEFAULT_XSD_VALIDATE
Default xsdValidate value for documentBuilderFactory
|
protected java.lang.String |
indentLevel |
protected int |
lineBreakWidth |
Constructor and Description |
---|
X3DLoaderObject()
Default constructor to initialize X3DLoaderObject
|
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Document |
getDomDocument()
Provide DOM document version of externally loaded X3D file
|
java.lang.String |
getValidationResult()
Provide detailed log of validation results following loading and serialization
|
X3DConcreteElement |
getX3dObjectTree()
Provide X3DJSAIL object tree if loading succeeds
|
boolean |
isDtdValidationPerformed()
Accessor method indicating whether DTD validation is performed when loading an X3D file
|
boolean |
isLoadSuccessful()
Accessor method to indicate whether loading was successful and loaded X3dObjectTree is available
|
boolean |
isXmlSchemaValidationPerformed()
Accessor method indicating whether DTD validation is performed when loading an X3D file
|
boolean |
loadModelFromFileX3D(java.io.File x3dFile)
Load the XML X3D file using DOM, report success
|
boolean |
loadModelFromFileX3D(java.lang.String fileName)
Load the XML X3D file using DOM, report whether successful.
|
boolean |
loadModelFromFileX3D(java.lang.String path,
java.lang.String fileName)
Load the XML X3D file using DOM, report whether successful.
|
void |
setDtdValidationPerformed(boolean newDtdValidationValue)
Accessor method to set whether DTD validation is performed when loading an X3D file, reconfiguring documentBuilderFactory
|
void |
setXmlSchemaValidation(boolean newXmlSchemaValidationValue)
Accessor method to set whether XML Schema validation is performed when loading an X3D file, reconfiguring documentBuilderFactory
|
java.lang.String |
toStringX3D(org.w3c.dom.Node node)
Convenience method, use DOM to create X3D string from a previously loaded document with default zero indent.
|
X3DConcreteElement |
toX3dObjectTree(org.w3c.dom.Node node)
Recursive method that uses DOM to create X3DJSAIL objects from a previously loaded document,
taking advantage of Java Reflection and String-based field accessors with protected access that are not otherwise usable.
|
X3DConcreteElement |
toX3dObjectTree(org.w3c.dom.Node node,
X3DConcreteElement parentElement)
Recursive method that uses DOM to create X3DJSAIL objects from a previously loaded document,
taking advantage of Java Reflection and String-based field accessors with protected access that are not otherwise usable.
|
public final boolean DEFAULT_DTD_VALIDATE
public final boolean DEFAULT_XSD_VALIDATE
protected java.lang.String indentLevel
protected int lineBreakWidth
public X3DLoaderObject()
public boolean loadModelFromFileX3D(java.lang.String fileName)
fileName
- path and name of .x3d or .xml file (XML encoding)loadModelFromFileX3D(File)
public boolean loadModelFromFileX3D(java.lang.String path, java.lang.String fileName)
path
- directory path to file of interestfileName
- path and name of .x3d or .xml file (XML encoding)loadModelFromFileX3D(File)
public boolean loadModelFromFileX3D(java.io.File x3dFile)
x3dFile
- existing x3d file (XML encoding)loadModelFromFileX3D(String)
public org.w3c.dom.Document getDomDocument()
public java.lang.String toStringX3D(org.w3c.dom.Node node)
node
- DOM Node to processX3DObject.FILE_EXTENSION_X3D
,
X3DObject.FILE_EXTENSION_XML
public X3DConcreteElement toX3dObjectTree(org.w3c.dom.Node node)
node
- DOM Node to processpublic X3DConcreteElement toX3dObjectTree(org.w3c.dom.Node node, X3DConcreteElement parentElement)
node
- DOM Node to processparentElement
- the parent of this scene object, if anypublic boolean isDtdValidationPerformed()
public void setDtdValidationPerformed(boolean newDtdValidationValue)
newDtdValidationValue
- whether DTD validation is performedpublic boolean isXmlSchemaValidationPerformed()
public void setXmlSchemaValidation(boolean newXmlSchemaValidationValue)
newXmlSchemaValidationValue
- whether XML Schema validation is performedpublic X3DConcreteElement getX3dObjectTree()
public boolean isLoadSuccessful()
public java.lang.String getValidationResult()
Copyright ©2005-2017 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.