Class SFString

java.lang.Object
org.web3d.x3d.jsail.fields.X3DConcreteField
org.web3d.x3d.jsail.fields.SFString
All Implemented Interfaces:
SFString, X3DField

public class SFString
extends X3DConcreteField
implements SFString
This utility class provides a concrete implementation corresponding to SFString X3D field type.


Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI). SFString defines a single string encoded with the UTF-8 universal character set.

Related field object: MFString
See Also:
X3D Tooltips: type SFString, SAI Java Specification: B.4.11 X3DFieldTypes, SAI Abstract Specification: 5.2.15 SAIFieldType, X3D Abstract Specification: SFStringAndMFString, X3D Tooltips, X3D Tooltips: field, X3D Tooltips: fieldValue, X3D Scene Authoring Hints
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String DEFAULT_VALUE
    Default value for this field type is an empty String.
    static java.lang.String DEFAULT_VALUE_STRING
    Default string value for this field type is "".
    static java.lang.String NAME
    String constant NAME provides name of this element: SFString
    static java.lang.String NameCharFilter
    XML Regular Expression NameChar.
    static java.lang.String NameFilter
    XML Regular Expression NameFilter.
    static java.lang.String NameStartCharFilter
    XML Regular Expression NameStartChar.
    static java.lang.String NmtokenFilter
    XML Regular Expression Nmtoken.
    static java.util.regex.Pattern PATTERN
    Precompiled regular expression (regex) pattern for this field type using default REGEX value.
    static java.lang.String REGEX
    Default regular expression (regex) pattern for this field type is (\s|\S)*
    static int TUPLE_SIZE
    Default tuple size for this field type is 1 (i.e. number of component values making up a single-field SF object).

    Fields inherited from class org.web3d.x3d.jsail.fields.X3DConcreteField

    validationResult
  • Constructor Summary

    Constructors
    Constructor Description
    SFString()
    Constructor for SFString performs value initialization.
    SFString​(java.lang.String newValue)
    Constructor for SFString using a corresponding Java primitive String as new initial value.
    SFString​(SFString newValue)
    Constructor to copy an SFString value as initial value for this new field object.
  • Method Summary

    Modifier and Type Method Description
    void appendValue​(java.lang.String newValue)
    Append an additional String to this field.
    boolean equals​(SFString comparisonSFString)
    Determine whether two objects contain equal values.
    java.lang.String getPrimitiveValue()
    Provides current value of the field as a Java primitive type.
    java.lang.String getValue()
    Get the current value.
    void initialize()
    Initialization for SFString applies default initial value.
    static boolean isArray()
    Whether or not this field type is an array (false)
    boolean isDefaultValue()
    Determine whether current value matches DEFAULT_VALUE
    static boolean isNMTOKEN​(java.lang.String value)
    Utility method to determine if string meets XML NMTOKEN requirements
    boolean matches()
    Test PATTERN match via regular expression (regex) check of current object's toString() value.
    static boolean matches​(java.lang.String value)
    Test PATTERN match with regular expression (regex) of provided value.
    static boolean meetsX3dInteroperabilityNamingConventions​(java.lang.String value)
    Utility method to determine if string meets suggested X3D naming conventions: starts with letter or underscore character, includes letter character numeral or underscore characters.
    void prependValue​(java.lang.String newValue)
    Append an additional String to this field.
    void setValue​(java.lang.String newValue)
    Assign a new value to this field.
    SFString setValue​(SFString newValue)
    Apply an SFString value to this field.
    SFString setValueByString​(java.lang.String newValue)
    Utility accessor for SFString using String value
    java.lang.String toString()
    Provides current value as a String.
    static java.lang.String toString​(java.lang.String value)
    Static utility method to provide String representation of a correctly typed input value.
    java.lang.String toStringX3D()
    Provide String representation of this object, properly escaped for XML-based X3D syntax and conforming to X3D Canonical Form.
    static java.lang.String toStringX3D​(java.lang.String value)
    Static utility method to provide String representation of input String, properly escaped using XML-based X3D syntax.
    java.lang.String validate()
    Validate current value via regular expression (regex) check of current object's toString() value, reporting errors only if found.
    java.lang.String validateRegex()
    Validate current value via regular expression (regex) check of current object's toString() value, reporting errors only if found.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.web3d.x3d.sai.X3DField

    addX3DEventListener, getDefinition, isReadable, isWritable, removeX3DEventListener