Class StringValue

    • Field Detail

      • EMPTY

        public static final StringValue EMPTY
        Empty StringValue
    • Constructor Detail

      • StringValue

        public StringValue​(String validXsdString)
        Convert string argument - assumed a valid xsd:string into a String value. Use with caution as no xsd:string format validation is done here. For internal purposes only. If you need proper input validation, use parse(String) instead.
        Parameters:
        validXsdString - A string containing a valid lexical representation of xsd:string
    • Method Detail

      • parse

        public static StringValue parse​(String val)
                                 throws IllegalArgumentException
        Convert the lexical XSD string argument into a String value, using DatatypeConverter.parseString(String).
        Parameters:
        val - A string containing a lexical representation of xsd:string
        Returns:
        instance
        Throws:
        IllegalArgumentException - if value is not a valid string representation of xsd:string
      • equalsIgnoreCase

        public boolean equalsIgnoreCase​(StringValue other)
        Same as String.equalsIgnoreCase(String) on string attribute values
        Parameters:
        other - other value to be compared against
        Returns:
        true if the other attribute value is not null, and it represents an equivalent String ignoring case; false otherwise
      • trim

        public StringValue trim()

        trim

        Returns:
        StringAttributeValue with value resulting from value.trim()
        See Also:
        String.trim()
      • toLowerCase

        public StringValue toLowerCase​(Locale locale)

        toLowerCase

        Parameters:
        locale - Locale
        Returns:
        StringAttributeValue with value resulting from value.toLowerCase(L)
        See Also:
        String.toLowerCase(Locale)
      • getInstance

        public static StringValue getInstance​(BooleanValue value)
        Converts BooleanAttributeValue to String
        Parameters:
        value - boolean
        Returns:
        string equivalent ("true" or "false")
      • printXML

        public String printXML()
        Converts the internal value (accessible via SimpleValue.getUnderlyingValue()) to a valid lexical representation for XML marshalling. Equivalent to the 'printMethod' in JAXB 'javaType' binding customizations. Implementations of this typically call DatatypeConverter. This method is called by SimpleValue.getContent() and its result cached by the same method for later use. Therefore, no need to cache the result in the implementation.
        Specified by:
        printXML in class SimpleValue<String>
        Returns:
        XML-valid lexical representation.