Class X3DConcreteFieldDefinition

java.lang.Object
org.web3d.x3d.jsail.fields.X3DConcreteFieldDefinition
All Implemented Interfaces:
X3DFieldDefinition

public abstract class X3DConcreteFieldDefinition
extends java.lang.Object
implements X3DFieldDefinition
Concrete implementation class corresponding to X3DField.


Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).

Representation of a node's field definition.

The field definition holds static field information such as the field access type, data type and name of the field.

The implementation of the toString() method of this class shall return the full IDL declaration of the field as per the specification, not the UTF8 or XML format. Implementation of .equals() shall return true if the two field definitions share the same access type, data type and name. It shall not include the underlying field's values at that point in time.

See Also:
SAI Java Specification: B.4.11 X3DFieldTypes, SAI Abstract Specification: 5.2.15 SAIFieldType, X3D Tooltips, X3D Scene Authoring Hints
  • Constructor Summary

    Constructors 
    Constructor Description
    X3DConcreteFieldDefinition()  
  • Method Summary

    Modifier and Type Method Description
    int getAccessType()
    Get the access type of the field.
    int getFieldType()
    Get the field type.
    java.lang.String getFieldTypeString()
    Get the field type.
    java.lang.String getName()
    Get the name of this field.
    void setAccessType​(int newValue)
    Set the access type of the field.
    void setFieldType​(int newValue)
    Set the field type of the field.
    void setName​(java.lang.String newValue)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getName

      public java.lang.String getName()
      Get the name of this field. This will be something like "children" or "translation". If the field is an exposed field then the name give will be the base name without any set_ or _changed added to the name, regardless of how the initial field was fetched.
      Specified by:
      getName in interface X3DFieldDefinition
      Returns:
      The name of this field
    • setName

      public void setName​(java.lang.String newValue)
    • getAccessType

      public int getAccessType()
      Get the access type of the field. This will be one of field, exposedField, eventIn or eventOut constants described in the X3DFieldTypes interface.
      Specified by:
      getAccessType in interface X3DFieldDefinition
      Returns:
      The access type of this field
      See Also:
      X3DFieldTypes
    • setAccessType

      public void setAccessType​(int newValue)
      Set the access type of the field. This will be one of field, exposedField, eventIn or eventOut constants described in the X3DFieldTypes interface.
      Parameters:
      newValue - The access type of this field
      Throws:
      InvalidFieldValueException - Illegal value provided, no change made
      See Also:
      X3DFieldTypes
    • getFieldType

      public int getFieldType()
      Get the field type. This string represents the field type such as MFNode, SFInt32. The definition of the returned int value is described in the X3DFieldType interface.
      Specified by:
      getFieldType in interface X3DFieldDefinition
      Returns:
      A constant describing the field type
      See Also:
      X3DFieldTypes
    • setFieldType

      public void setFieldType​(int newValue)
      Set the field type of the field. This will be one of SFBool, SFInt32, MFString (etc.) constants described in the X3DFieldTypes interface.
      Parameters:
      newValue - The access type of this field
      Throws:
      InvalidFieldValueException - Illegal value provided, no change made
      See Also:
      X3DFieldTypes
    • getFieldTypeString

      public java.lang.String getFieldTypeString()
      Get the field type. This string represents the field type such as MFNode, SFInt32, etc. A string is used to allow full extensibility.
      Specified by:
      getFieldTypeString in interface X3DFieldDefinition
      Returns:
      A string describing the field type