Package org.web3d.x3d.jsail.Core
Class fieldValueObject
java.lang.Object
org.web3d.x3d.jsail.X3DConcreteElement
org.web3d.x3d.jsail.X3DConcreteStatement
org.web3d.x3d.jsail.Core.fieldValueObject
public class fieldValueObject extends X3DConcreteStatement
Functional summary: a fieldValue statement re-initializes the default value of a field in a ProtoInstance. Each fieldValue statement can contain either attribute-value or node content. This concrete class represents an X3D fieldValue statement.
X3D statement tooltip: [X3D statement] A fieldValue statement re-initializes the default value of a field in a parent ProtoInstance. Note that a field statement with a matching name must be already defined by the corresponding ProtoDeclare or ExternProtoDeclare statement.
X3D statement tooltip: [X3D statement] A fieldValue statement re-initializes the default value of a field in a parent ProtoInstance. Note that a field statement with a matching name must be already defined by the corresponding ProtoDeclare or ExternProtoDeclare statement.
- Hint: first add a parent ProtoInstance node before defining a new fieldValue.
- Warning: fieldValue content type must match the content type defined in the corresponding ProtoDeclare or ExternProtoDeclare field statement.
- Hint: in addition to defining a simple-type value attribute, a fieldValue statement can alternatively hold initializing SFNode/MFNode values as contained node(s).
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMPONENTString constant COMPONENT defines X3D component for the fieldValue element: Corestatic intLEVELInteger constant LEVEL provides default X3D Core component level for this element: 2static java.lang.StringNAMEString constant NAME provides name of this element: fieldValue.static java.lang.StringNAME_DEFAULT_VALUESFString field named name has default value equal to an empty string.static java.lang.StringVALUE_DEFAULT_VALUESFString field named value has default value equal to an empty string. -
Constructor Summary
Constructors Constructor Description fieldValueObject()Constructor for fieldValueObject to initialize member variables with default values.fieldValueObject(java.lang.String fieldValueName)Utility constructor that also assigns fieldValueNamefieldValueObject(java.lang.String fieldValueName, java.lang.String defaultValue)Utility constructor that also assigns fieldValueName, defaultValue -
Method Summary
Modifier and Type Method Description fieldValueObjectaddChild(X3DNode newValue)Utility method to add single child element to contained list of existing children nodes (if any).fieldValueObjectaddChildren(ProtoInstanceObject newValue)Add single ProtoInstanceObject (with appropriate node type and containerField value) to MFNode array for children field.voidaddChildren(X3DNode newValue)Add single node to existing array of children nodes (if any).voidaddChildren(X3DNode[] newValue)Add array of children nodes to array of existing nodes (if any).fieldValueObjectaddComments(java.lang.String newComment)Add comment as CommentsBlock to children fieldfieldValueObjectaddComments(java.lang.String[] newComments)Add comments as String[] array to children fieldfieldValueObjectaddComments(CommentsBlock newCommentsBlock)Add CommentsBlock to children fieldfieldValueObjectappendValue(boolean newValue)Append boolean to fieldValue for value attribute.fieldValueObjectappendValue(double newValue)Append double to fieldValue for value attribute.fieldValueObjectappendValue(float newValue)Append float to fieldValue for value attribute.fieldValueObjectappendValue(int newValue)Append integer to fieldValue for value attribute.fieldValueObjectappendValue(java.lang.String newValue)Append String to fieldValue for value attribute.fieldValueObjectappendValue(MFBoolObject newValue)Append MFBoolObject to fieldValue for value attribute.fieldValueObjectappendValue(MFColorObject newValue)Append MFColorObject to fieldValue for value attribute.fieldValueObjectappendValue(MFColorRGBAObject newValue)Append MFColorRGBAObject to fieldValue for value attribute.fieldValueObjectappendValue(MFDoubleObject newValue)Append MFDoubleObject to fieldValue for value attribute.fieldValueObjectappendValue(MFFloatObject newValue)Append MFFloatObject to fieldValue for value attribute.fieldValueObjectappendValue(MFImageObject newValue)Append MFImageObject to fieldValue for value attribute.fieldValueObjectappendValue(MFInt32Object newValue)Append MFInt32Object to fieldValue for value attribute.fieldValueObjectappendValue(MFMatrix3dObject newValue)Append MFMatrix3dObject to fieldValue for value attribute.fieldValueObjectappendValue(MFMatrix3fObject newValue)Append MFMatrix3fObject to fieldValue for value attribute.fieldValueObjectappendValue(MFMatrix4dObject newValue)Append MFMatrix4dObject to fieldValue for value attribute.fieldValueObjectappendValue(MFMatrix4fObject newValue)Append MFMatrix4fObject to fieldValue for value attribute.fieldValueObjectappendValue(MFRotationObject newValue)Append MFRotationObject to fieldValue for value attribute.fieldValueObjectappendValue(MFStringObject newValue)Append MFStringObject to fieldValue for value attribute.fieldValueObjectappendValue(MFTimeObject newValue)Append MFTimeObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec2dObject newValue)Append MFVec2dObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec2fObject newValue)Append MFVec2fObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec3dObject newValue)Append MFVec3dObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec3fObject newValue)Append MFVec3fObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec4dObject newValue)Append MFVec4dObject to fieldValue for value attribute.fieldValueObjectappendValue(MFVec4fObject newValue)Append MFVec4fObject to fieldValue for value attribute.fieldValueObjectappendValue(SFBoolObject newValue)Append SFBoolObject to fieldValue for value attribute.fieldValueObjectappendValue(SFColorObject newValue)Append SFColorObject to fieldValue for value attribute.fieldValueObjectappendValue(SFColorRGBAObject newValue)Append SFColorRGBAObject to fieldValue for value attribute.fieldValueObjectappendValue(SFDoubleObject newValue)Append SFDoubleObject to fieldValue for value attribute.fieldValueObjectappendValue(SFFloatObject newValue)Append SFFloatObject to fieldValue for value attribute.fieldValueObjectappendValue(SFImageObject newValue)Append SFImageObject to fieldValue for value attribute.fieldValueObjectappendValue(SFInt32Object newValue)Append SFInt32Object to fieldValue for value attribute.fieldValueObjectappendValue(SFMatrix3dObject newValue)Append SFMatrix3dObject to fieldValue for value attribute.fieldValueObjectappendValue(SFMatrix3fObject newValue)Append SFMatrix3fObject to fieldValue for value attribute.fieldValueObjectappendValue(SFMatrix4dObject newValue)Append SFMatrix4dObject to fieldValue for value attribute.fieldValueObjectappendValue(SFMatrix4fObject newValue)Append SFMatrix4fObject to fieldValue for value attribute.fieldValueObjectappendValue(SFRotationObject newValue)Append SFRotationObject to fieldValue for value attribute.fieldValueObjectappendValue(SFStringObject newValue)Append SFStringObject to fieldValue for value attribute.fieldValueObjectappendValue(SFTimeObject newValue)Append SFTimeObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec2dObject newValue)Append SFVec2dObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec2fObject newValue)Append SFVec2fObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec3dObject newValue)Append SFVec3dObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec3fObject newValue)Append SFVec3fObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec4dObject newValue)Append SFVec4dObject to fieldValue for value attribute.fieldValueObjectappendValue(SFVec4fObject newValue)Append SFVec4fObject to fieldValue for value attribute.fieldValueObjectclearChildren()Utility method to clear MFNode value of children field.fieldValueObjectclearValues()Clear all values in a fieldValue declaration.X3DConcreteElementfindElementByNameValue(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.X3DConcreteElementfindElementByNameValue(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.X3DConcreteNodefindNodeByDEF(java.lang.String DEFvalue)Recursive method to provide object reference to node by DEF, if found as this node or in a contained node.java.lang.StringgetAccessType(java.lang.String fieldName)Indicate accessType corresponding to given fieldName.java.util.ArrayList<X3DNode>getChildren()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.java.lang.StringgetComponent()Defines X3D component for the fieldValue element: CoreintgetComponentLevel()Provides default X3D component level for this element: 2java.lang.StringgetElementName()Provides name of this element: fieldValuejava.lang.StringgetFieldType(java.lang.String fieldName)Indicate type corresponding to given fieldName.java.lang.StringgetName()Provide String value from inputOutput SFString field named name.java.lang.StringgetType()Discover base type of this fieldValue declaration from corresponding ProtoDeclare/ExternProtoDeclare field declaration.java.lang.StringgetValue()Provide String value from inputOutput SFString field named value.MFBoolObjectgetValueMFBool()Get typed value of this fieldValue declaration.MFColorObjectgetValueMFColor()Get typed value of this fieldValue declaration.MFColorRGBAObjectgetValueMFColorRGBA()Get typed value of this fieldValue declaration.MFDoubleObjectgetValueMFDouble()Get typed value of this fieldValue declaration.MFFloatObjectgetValueMFFloat()Get typed value of this fieldValue declaration.MFImageObjectgetValueMFImage()Get typed value of this fieldValue declaration.MFInt32ObjectgetValueMFInt32()Get typed value of this fieldValue declaration.MFMatrix3dObjectgetValueMFMatrix3d()Get typed value of this fieldValue declaration.MFMatrix3fObjectgetValueMFMatrix3f()Get typed value of this fieldValue declaration.MFMatrix4dObjectgetValueMFMatrix4d()Get typed value of this fieldValue declaration.MFMatrix4fObjectgetValueMFMatrix4f()Get typed value of this fieldValue declaration.MFRotationObjectgetValueMFRotation()Get typed value of this fieldValue declaration.MFStringObjectgetValueMFString()Get typed value of this fieldValue declaration.MFTimeObjectgetValueMFTime()Get typed value of this fieldValue declaration.MFVec2dObjectgetValueMFVec2d()Get typed value of this fieldValue declaration.MFVec2fObjectgetValueMFVec2f()Get typed value of this fieldValue declaration.MFVec3dObjectgetValueMFVec3d()Get typed value of this fieldValue declaration.MFVec3fObjectgetValueMFVec3f()Get typed value of this fieldValue declaration.MFVec4dObjectgetValueMFVec4d()Get typed value of this fieldValue declaration.MFVec4fObjectgetValueMFVec4f()Get typed value of this fieldValue declaration.SFBoolObjectgetValueSFBool()If type matches, then get typed value of a SFBool fieldValue declaration.SFColorObjectgetValueSFColor()If type matches, then get typed value of a SFColor fieldValue declaration.SFColorRGBAObjectgetValueSFColorRGBA()If type matches, then get typed value of a SFColorRGBA fieldValue declaration.SFDoubleObjectgetValueSFDouble()If type matches, then get typed value of a SFDouble fieldValue declaration.SFFloatObjectgetValueSFFloat()If type matches, then get typed value of a SFFloat fieldValue declaration.SFImageObjectgetValueSFImage()If type matches, then get typed value of a SFImage fieldValue declaration.SFInt32ObjectgetValueSFInt32()If type matches, then get typed value of a SFInt32 fieldValue declaration.SFMatrix3dObjectgetValueSFMatrix3d()If type matches, then get typed value of a SFMatrix3d fieldValue declaration.SFMatrix3fObjectgetValueSFMatrix3f()If type matches, then get typed value of a SFMatrix3f fieldValue declaration.SFMatrix4dObjectgetValueSFMatrix4d()If type matches, then get typed value of a SFMatrix4d fieldValue declaration.SFMatrix4fObjectgetValueSFMatrix4f()If type matches, then get typed value of a SFMatrix4f fieldValue declaration.SFRotationObjectgetValueSFRotation()If type matches, then get typed value of a SFRotation fieldValue declaration.SFStringObjectgetValueSFString()If type matches, then get typed value of a SFString fieldValue declaration.SFTimeObjectgetValueSFTime()If type matches, then get typed value of a SFTime fieldValue declaration.SFVec2dObjectgetValueSFVec2d()If type matches, then get typed value of a SFVec2d fieldValue declaration.SFVec2fObjectgetValueSFVec2f()If type matches, then get typed value of a SFVec2f fieldValue declaration.SFVec3dObjectgetValueSFVec3d()If type matches, then get typed value of a SFVec3d fieldValue declaration.SFVec3fObjectgetValueSFVec3f()If type matches, then get typed value of a SFVec3f fieldValue declaration.SFVec4dObjectgetValueSFVec4d()If type matches, then get typed value of a SFVec4d fieldValue declaration.SFVec4fObjectgetValueSFVec4f()If type matches, then get typed value of a SFVec4f fieldValue declaration.booleanhasChildren()Indicate whether an object is available for inputOutput MFNode field children.booleanhasChildrenElements()Indicate whether a node or statement is found in inputOutput MFNode field children.booleanhasElementByNameValue(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.booleanhasNodeByDEF(java.lang.String DEFvalue)Recursive method to determine whether node with DEFvalue is found, meaning both objects are attached to same scene graph.voidinitialize()Initialize all member variables to default values.fieldValueObjectsetChildren(java.util.ArrayList<X3DNode> newValue)Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.voidsetChildren(X3DNode newValue)Set single children node, replacing prior array of existing nodes (if any).fieldValueObjectsetName(java.lang.String newValue)Accessor method to assign String value to inputOutput SFString field named name.fieldValueObjectsetName(SFStringObject newValue)Assign typed object value to SFString name field, similar tosetName(String).fieldValueObjectsetValue(boolean newValue)Set typed value of a boolean fieldValue declaration.fieldValueObjectsetValue(boolean[] newValue)Set typed value of a boolean[] fieldValue declaration.fieldValueObjectsetValue(double newValue)Set typed value of a double fieldValue declaration.fieldValueObjectsetValue(double[] newValue)Set typed value of a double[] array fieldValue declaration.fieldValueObjectsetValue(float newValue)Set typed value of a float fieldValue declaration.fieldValueObjectsetValue(float[] newValue)Set typed value of a float[] array fieldValue declaration.fieldValueObjectsetValue(int newValue)Set typed value of a integer fieldValue declaration.fieldValueObjectsetValue(int[] newValue)Set typed value of a integer array fieldValue declaration.fieldValueObjectsetValue(java.lang.String newValue)Accessor method to assign String value to inputOutput SFString field named value.fieldValueObjectsetValue(java.lang.String[] newValue)Assign typed object String[] array value to fieldValue, similar tosetValue(String).fieldValueObjectsetValue(MFBoolObject newValue)Set typed value of a MFBool fieldValue declaration.fieldValueObjectsetValue(MFColorObject newValue)Set typed value of a MFColor fieldValue declaration.fieldValueObjectsetValue(MFColorRGBAObject newValue)Set typed value of a MFColorRGBA fieldValue declaration.fieldValueObjectsetValue(MFDoubleObject newValue)Set typed value of a MFDouble fieldValue declaration.fieldValueObjectsetValue(MFFloatObject newValue)Set typed value of a MFFloat fieldValue declaration.fieldValueObjectsetValue(MFImageObject newValue)Set typed value of a MFImage fieldValue declaration.fieldValueObjectsetValue(MFInt32Object newValue)Set typed value of a MFInt32 fieldValue declaration.fieldValueObjectsetValue(MFMatrix3dObject newValue)Set typed value of a MFMatrix3d fieldValue declaration.fieldValueObjectsetValue(MFMatrix3fObject newValue)Set typed value of a MFMatrix3f fieldValue declaration.fieldValueObjectsetValue(MFMatrix4dObject newValue)Set typed value of a MFMatrix4d fieldValue declaration.fieldValueObjectsetValue(MFMatrix4fObject newValue)Set typed value of a MFMatrix4f fieldValue declaration.fieldValueObjectsetValue(MFRotationObject newValue)Set typed value of a MFRotation fieldValue declaration.fieldValueObjectsetValue(MFStringObject newValue)Assign typed object MFString value to fieldValue, similar tosetValue(String).fieldValueObjectsetValue(MFTimeObject newValue)Set typed value of a MFTime fieldValue declaration.fieldValueObjectsetValue(MFVec2dObject newValue)Set typed value of a MFVec2d fieldValue declaration.fieldValueObjectsetValue(MFVec2fObject newValue)Set typed value of a MFVec2f fieldValue declaration.fieldValueObjectsetValue(MFVec3dObject newValue)Set typed value of a MFVec3d fieldValue declaration.fieldValueObjectsetValue(MFVec3fObject newValue)Set typed value of a MFVec3f fieldValue declaration.fieldValueObjectsetValue(MFVec4dObject newValue)Set typed value of a MFVec4d fieldValue declaration.fieldValueObjectsetValue(MFVec4fObject newValue)Set typed value of a MFVec4f fieldValue declaration.fieldValueObjectsetValue(SFBoolObject newValue)Set typed value of a SFBool fieldValue declaration.fieldValueObjectsetValue(SFColorObject newValue)Set typed value of a SFColor fieldValue declaration.fieldValueObjectsetValue(SFColorRGBAObject newValue)Set typed value of a SFColorRGBA fieldValue declaration.fieldValueObjectsetValue(SFDoubleObject newValue)Set typed value of a SFDouble fieldValue declaration.fieldValueObjectsetValue(SFFloatObject newValue)Set typed value of a SFFloat fieldValue declaration.fieldValueObjectsetValue(SFImageObject newValue)Set typed value of a SFImage fieldValue declaration.fieldValueObjectsetValue(SFInt32Object newValue)Set typed value of a SFInt32 fieldValue declaration.fieldValueObjectsetValue(SFMatrix3dObject newValue)Set typed value of a SFMatrix3d fieldValue declaration.fieldValueObjectsetValue(SFMatrix3fObject newValue)Set typed value of a SFMatrix3f fieldValue declaration.fieldValueObjectsetValue(SFMatrix4dObject newValue)Set typed value of a SFMatrix4d fieldValue declaration.fieldValueObjectsetValue(SFMatrix4fObject newValue)Set typed value of a SFMatrix4f fieldValue declaration.fieldValueObjectsetValue(SFRotationObject newValue)Set typed value of a SFRotation fieldValue declaration.fieldValueObjectsetValue(SFStringObject newValue)Assign typed object SFString value field, similar tosetValue(String).fieldValueObjectsetValue(SFTimeObject newValue)Set typed value of a SFTime fieldValue declaration.fieldValueObjectsetValue(SFVec2dObject newValue)Set typed value of a SFVec2d fieldValue declaration.fieldValueObjectsetValue(SFVec2fObject newValue)Set typed value of a SFVec2f fieldValue declaration.fieldValueObjectsetValue(SFVec3dObject newValue)Set typed value of a SFVec3d fieldValue declaration.fieldValueObjectsetValue(SFVec3fObject newValue)Set typed value of a SFVec3f fieldValue declaration.fieldValueObjectsetValue(SFVec4dObject newValue)Set typed value of a SFVec4d fieldValue declaration.fieldValueObjectsetValue(SFVec4fObject newValue)Set typed value of a SFVec4f fieldValue declaration.java.lang.StringtoStringClassicVRML(int indentLevel)Recursive method to provide ClassicVRML string serialization.java.lang.StringtoStringVRML97(int indentLevel)Recursive method to provide VRML97 string serialization.java.lang.StringtoStringX3D(int indentLevel)Recursive method to provide X3D string serialization of this model subgraph, utilizing XML encoding and conforming to X3D Canonical Form.java.lang.Stringvalidate()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.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
-
NAME
public static final java.lang.String NAMEString constant NAME provides name of this element: fieldValue.- See Also:
- Constant Field Values
-
COMPONENT
public static final java.lang.String COMPONENTString constant COMPONENT defines X3D component for the fieldValue element: Core- See Also:
- Constant Field Values
-
LEVEL
public static final int LEVELInteger constant LEVEL provides default X3D Core component level for this element: 2- See Also:
- Constant Field Values
-
NAME_DEFAULT_VALUE
public static final java.lang.String NAME_DEFAULT_VALUESFString field named name has default value equal to an empty string.- See Also:
- Constant Field Values
-
VALUE_DEFAULT_VALUE
public static final java.lang.String VALUE_DEFAULT_VALUESFString field named value has default value equal to an empty string.- See Also:
- Constant Field Values
-
-
Constructor Details
-
fieldValueObject
public fieldValueObject()Constructor for fieldValueObject to initialize member variables with default values. -
fieldValueObject
public fieldValueObject(java.lang.String fieldValueName)Utility constructor that also assigns fieldValueName- Parameters:
fieldValueName- unique DEF name for this X3D node
-
fieldValueObject
public fieldValueObject(java.lang.String fieldValueName, java.lang.String defaultValue)Utility constructor that also assigns fieldValueName, defaultValue- Parameters:
fieldValueName- unique name for this fielddefaultValue- string version of defaultValue for this field
-
-
Method Details
-
getElementName
public final java.lang.String getElementName()Provides name of this element: fieldValue- Specified by:
getElementNamein classX3DConcreteElement- Returns:
- name of this element
-
getComponent
public final java.lang.String getComponent()Defines X3D component for the fieldValue element: Core- Specified by:
getComponentin classX3DConcreteElement- Returns:
- X3D component for this element
-
getComponentLevel
public final int getComponentLevel()Provides default X3D component level for this element: 2- Specified by:
getComponentLevelin 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:
getFieldTypein 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:
getAccessTypein 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:
initializein classX3DConcreteStatement
-
getChildren
Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNode.- Returns:
- value of children field
- See Also:
X3DNode
-
setChildren
Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNode.- Parameters:
newValue- is new value for the children field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addChildren
Add single node to existing array of children nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNode and ProtoInstance.- Parameters:
newValue- is new value to be appended the children field.
-
addChildren
Add single ProtoInstanceObject (with appropriate node type and containerField value) to MFNode array for children field.
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to ShaderPart and ProtoInstance.- Parameters:
newValue- is new value to be appended the parts field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addChild
Utility method to add single child element to contained list of existing children nodes (if any).- Parameters:
newValue- is new node value to be appended the children field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addChildren
Add array of children nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNode.- Parameters:
newValue- is new value array to be appended the children field.
-
setChildren
Set single children node, replacing prior array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are restricted to X3DNode.- Parameters:
newValue- is new node for the children field (restricted to X3DNode)
-
clearChildren
Utility method to clear MFNode value of children field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
hasChildren
public boolean hasChildren()Indicate whether an object is available for inputOutput MFNode field children.- Returns:
- whether a properly typed node or ProtoInstance array or CommentsBlock is available.
- See Also:
getChildren()
-
addComments
Add comment as CommentsBlock to children field- Specified by:
addCommentsin classX3DConcreteElement- Parameters:
newComment- initial value- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
addComments
Add comments as String[] array to children field- Specified by:
addCommentsin classX3DConcreteElement- Parameters:
newComments- array of comments- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive setAttribute method invocations).
-
addComments
Add CommentsBlock to children field- Specified by:
addCommentsin classX3DConcreteElement- Parameters:
newCommentsBlock- block of comments to add- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getName
public java.lang.String getName()Provide String value from inputOutput SFString field named name.
Tooltip: Name of the ProtoInstance field being re-initialized (corresponding to field name already defined in ProtoDeclare or ExternProtoDeclare).- Hint: well-defined names can simplify design and debugging through improved author understanding.
- Hint: X3D Scene Authoring Hints, Naming Conventions https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions
- Returns:
- value of name field
-
setName
Accessor method to assign String value to inputOutput SFString field named name.
Tooltip: Name of the ProtoInstance field being re-initialized (corresponding to field name already defined in ProtoDeclare or ExternProtoDeclare).- Hint: well-defined names can simplify design and debugging through improved author understanding.
- Hint: X3D Scene Authoring Hints, Naming Conventions https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions
@see X3D Scene Authoring Hints: Naming Conventions- Parameters:
newValue- is new value for the name field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setName
Assign typed object value to SFString name field, similar tosetName(String).- Parameters:
newValue- is new value for the name field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getValue
public java.lang.String getValue()Provide String value from inputOutput SFString field named value.
Tooltip: Initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Hint: initialize SFNode/MFNode field value using contained content element(s), instead of a simple attribute value.
- Returns:
- value of value field
-
setValue
Accessor method to assign String value to inputOutput SFString field named value.
Tooltip: Initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Hint: initialize SFNode/MFNode field value using contained content element(s), instead of a simple attribute value.
- Parameters:
newValue- is new value for the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFBoolObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFBoolObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFColorObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFColorObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFColorRGBAObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFColorRGBAObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFDoubleObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFDoubleObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFFloatObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFFloatObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFImageObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFImageObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFInt32Object to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFInt32Object to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFMatrix3dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFMatrix3dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFMatrix3fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFMatrix3fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFMatrix4dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFMatrix4dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFMatrix4fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFMatrix4fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFRotationObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFRotationObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFStringObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFStringObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFTimeObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFTimeObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec2dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec2dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec2fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec2fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec3dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec3dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec3fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec3fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec4dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec4dObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append SFVec4fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append MFVec4fObject to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append boolean to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append integer to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append float to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append double to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
appendValue
Append String to fieldValue for value attribute.
Tooltip: fieldValue contains initial value for this field, which overrides default initialization value defined in original ProtoDeclare field.- Parameters:
newValue- is new value to append to the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setValue
Assign typed object MFString value to fieldValue, similar tosetValue(String).- Parameters:
newValue- is new value for the value field.- Returns:
fieldObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setValue
Assign typed object String[] array value to fieldValue, similar tosetValue(String).- Parameters:
newValue- is new value for the value field.- Returns:
fieldObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setValue
Assign typed object SFString value field, similar tosetValue(String).- Parameters:
newValue- is new value for the value field.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
hasChildrenElements
public boolean hasChildrenElements()Indicate whether a node or statement is found in inputOutput MFNode field children.- Returns:
- whether a node or statement is found; ignores CommentsBlock.
- See Also:
getChildren()
-
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:
toStringX3Din classX3DConcreteElement- Parameters:
indentLevel- number of levels of indentation for this element- Returns:
- X3D string
- See Also:
X3DObject.FILE_EXTENSION_X3D,X3DObject.FILE_EXTENSION_XML,X3DObject.toStringXML(),X3DObject.toFileXML(String),X3DObject.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:
toStringClassicVRMLin classX3DConcreteElement- Parameters:
indentLevel- number of levels of indentation for this element- Returns:
- ClassicVRML string
- See Also:
X3DObject.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:
toStringVRML97in classX3DConcreteElement- Parameters:
indentLevel- number of levels of indentation for this element- Returns:
- VRML97 string
- See Also:
X3DObject.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:
findElementByNameValuein 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:
findElementByNameValuein 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:
findNodeByDEFin 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:
validatein classX3DConcreteElement- Returns:
- validation results (if any)
-
getType
public java.lang.String getType()Discover base type of this fieldValue declaration from corresponding ProtoDeclare/ExternProtoDeclare field declaration. Note that returned value might be empty string if never set in original field object. If found, provides String value ["SFBool" | "MFBool" | "SFColor" | "MFColor" | "SFColorRGBA" | "MFColorRGBA" | "SFDouble" | "MFDouble" | "SFFloat" | "MFFloat" | "SFImage" | "MFImage" | "SFInt32" | "SFNode" | "MFNode" | "MFInt32" | "SFRotation" | "MFRotation" | "SFString" | "MFString" | "SFTime" | "MFTime" | "SFVec2d" | "MFVec2d" | "SFVec2f" | "MFVec2f" | "SFVec3d" | "MFVec3d" | "SFVec3f" | "MFVec3f" | "SFVec4d" | "MFVec4d" | "SFVec4f" | "MFVec4f" | "SFMatrix3d" | "MFMatrix3d" | "SFMatrix3f" | "MFMatrix3f" | "SFMatrix4d" | "MFMatrix4d" | "SFMatrix4f" | "MFMatrix4f"] from inputOutput SFString field named type.- Returns:
- type value from corresponding field declaration, otherwise "fieldValueTypeNotFound"
- See Also:
fieldObject
-
getValueSFBool
If type matches, then get typed value of a SFBool fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFBool fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFBool
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFBool fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFColor
If type matches, then get typed value of a SFColor fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFColor fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFColor
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFColor fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFColorRGBA
If type matches, then get typed value of a SFColorRGBA fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFColorRGBA fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFColorRGBA
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFColorRGBA fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFDouble
If type matches, then get typed value of a SFDouble fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFDouble fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFDouble
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFDouble fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFFloat
If type matches, then get typed value of a SFFloat fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFFloat fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFFloat
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFFloat fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFImage
If type matches, then get typed value of a SFImage fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFImage fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFImage
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFImage fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFInt32
If type matches, then get typed value of a SFInt32 fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFInt32 fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFInt32
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFInt32 fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFMatrix3d
If type matches, then get typed value of a SFMatrix3d fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFMatrix3d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFMatrix3d
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFMatrix3d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFMatrix3f
If type matches, then get typed value of a SFMatrix3f fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFMatrix3f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFMatrix3f
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFMatrix3f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFMatrix4d
If type matches, then get typed value of a SFMatrix4d fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFMatrix4d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFMatrix4d
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFMatrix4d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFMatrix4f
If type matches, then get typed value of a SFMatrix4f fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFMatrix4f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFMatrix4f
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFMatrix4f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFRotation
If type matches, then get typed value of a SFRotation fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFRotation fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFRotation
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFRotation fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFString
If type matches, then get typed value of a SFString fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
getValueMFString
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
getValueSFTime
If type matches, then get typed value of a SFTime fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFTime fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFTime
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFTime fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec2d
If type matches, then get typed value of a SFVec2d fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec2d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec2d
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec2d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec2f
If type matches, then get typed value of a SFVec2f fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec2f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec2f
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec2f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec3d
If type matches, then get typed value of a SFVec3d fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec3d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec3d
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec3d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec3f
If type matches, then get typed value of a SFVec3f fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec3f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec3f
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec3f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec4d
If type matches, then get typed value of a SFVec4d fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec4d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec4d
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec4d fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueSFVec4f
If type matches, then get typed value of a SFVec4f fieldValue declaration.- Returns:
- typed value object (if values are available), otherwise returns default object
-
setValue
Set typed value of a SFVec4f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
getValueMFVec4f
Get typed value of this fieldValue declaration.- Returns:
- typed value object, if values are available
-
setValue
Set typed value of a MFVec4f fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
clearValues
Clear all values in a fieldValue declaration.- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a boolean fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a boolean[] fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a integer fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a integer array fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a float fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a float[] array fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a double fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-
setValue
Set typed value of a double[] array fieldValue declaration. WARNING: must first setType() in ancestor fieldObject declaration to ensure validity of the proper corresponding X3D type.- Parameters:
newValue- is new value to assign- Returns:
fieldValueObject- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).
-