org.qtitools.qti.value
Enum TextFormat

java.lang.Object
  extended by java.lang.Enum<TextFormat>
      extended by org.qtitools.qti.value.TextFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TextFormat>

public enum TextFormat
extends java.lang.Enum<TextFormat>

plain - Indicates that the text to be entered by the candidate is plain text. This format is suitable for short unstructured responses. Delivery engines should preserve white-space characters in candidate input except where a response consists only of white-space characters, in which case it should be treated as an empty string (NULL).

preFormatted - Indicates that the text to be entered by the candidate is pre-formatted and should be rendered in a way consistent with the definition of pre in [XHTML]. Delivery engines must preserve white-space characters except where a response consists only of white-space characters, in which case it should be treated as an empty string (NULL).

xhtml - Indicates that the text to be entered by the candidate is structured text. The value of the response variable is text marked up in XHTML. The delivery engine should present an interface suitable for capturing structured text, this might be plain typed text interpreted with a set of simple text markup conventions such as those used in wiki page editors or a complete WYSIWYG editor.

Author:
Jiri Kajaba

Enum Constant Summary
PLAIN
          plain type.
PRE_FORMATTED
          preFormatted type.
XHTML
          xhtml type.
 
Field Summary
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Method Summary
static TextFormat[] intersection(TextFormat[] firstSet, TextFormat[] secondSet)
          Returns intersection of two given types sets (order is not important).
 boolean isPlain()
          Returns true if this textFormat is plain; false otherwise.
 boolean isPreFormatted()
          Returns true if this textFormat is preFormatted; false otherwise.
 boolean isXhtml()
          Returns true if this textFormat is xhtml; false otherwise.
static TextFormat parseTextFormat(java.lang.String textFormat)
          Returns parsed TextFormat from given String.
 java.lang.String toString()
           
static TextFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TextFormat[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PLAIN

public static final TextFormat PLAIN
plain type.


PRE_FORMATTED

public static final TextFormat PRE_FORMATTED
preFormatted type.


XHTML

public static final TextFormat XHTML
xhtml type.

Field Detail

CLASS_TAG

public static final java.lang.String CLASS_TAG
Name of this class in xml schema.

See Also:
Constant Field Values
Method Detail

values

public static final TextFormat[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TextFormat c : TextFormat.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TextFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

isPlain

public boolean isPlain()
Returns true if this textFormat is plain; false otherwise.

Returns:
true if this textFormat is plain; false otherwise

isPreFormatted

public boolean isPreFormatted()
Returns true if this textFormat is preFormatted; false otherwise.

Returns:
true if this textFormat is preFormatted; false otherwise

isXhtml

public boolean isXhtml()
Returns true if this textFormat is xhtml; false otherwise.

Returns:
true if this textFormat is xhtml; false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<TextFormat>

parseTextFormat

public static TextFormat parseTextFormat(java.lang.String textFormat)
                                  throws QTIParseException
Returns parsed TextFormat from given String.

Parameters:
textFormat - String representation of TextFormat
Returns:
parsed TextFormat from given String
Throws:
QTIParseException - if given String is not valid TextFormat

intersection

public static TextFormat[] intersection(TextFormat[] firstSet,
                                        TextFormat[] secondSet)
Returns intersection of two given types sets (order is not important).

Parameters:
firstSet - first set of types
secondSet - second set of types
Returns:
intersection of two given types sets


Copyright © 2009. All Rights Reserved.