cox.jmatt.java.MathTools.test
Enum MTFI.FIType

java.lang.Object
  extended by java.lang.Enum<MTFI.FIType>
      extended by cox.jmatt.java.MathTools.test.MTFI.FIType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MTFI.FIType>
Enclosing class:
MTFI

public static enum MTFI.FIType
extends java.lang.Enum<MTFI.FIType>

The Format Item Type enum provides the valid types a MTFI can be. Since the characteristics of each are slightly different the enum elements here also store type-specific data and formatting information.

Again, ordinarily there will be no need to handle this enum directly since MTest handles it internally.


Enum Constant Summary
GRAPH_MARK
          This item is a plain text placeholder for where a graph or image should be inserted into the test.
PAGE_BREAK
          This is a marker to indicate where a page break should occur.
TEXT_BLOCK
          This item represents multiple long sentences or perhaps multiline instructions or even multiple paragraphs.
TEXT_LINE
          This is a single line of text: one sentence or two short ones.
TEXT_NOTE
          This is an answer key element.
UNKNOWN
          This is an 'Oops!' marker that should never be seen.
 
Method Summary
 java.lang.String getTemplate()
          Return the default template for this item type.
 java.lang.String getXMLTemplate()
          Return the appropriate XML-formatting template.
 boolean hasID()
          Does this item have an XML ID attribute? (Graph marks yes, no for the others.)
 boolean printAnswer()
          Should this print with Answer part?
 boolean printProblem()
          Should this print with Problem part?
static MTFI.FIType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MTFI.FIType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TEXT_LINE

public static final MTFI.FIType TEXT_LINE

This is a single line of text: one sentence or two short ones. Format-wise it should not contain any newlines.

This element appears with the Problem and Answer part of a test and appears in replacement tokens <1> and <2> when formatting.


TEXT_BLOCK

public static final MTFI.FIType TEXT_BLOCK

This item represents multiple long sentences or perhaps multiline instructions or even multiple paragraphs. It may contain any types of characters needed, including newlines and other String-formatting characters.

This element appears with the Problem part of a test and appears in replacement token <1> when formatting.


TEXT_NOTE

public static final MTFI.FIType TEXT_NOTE

This is an answer key element. Structurally it is identical to a TEXT_LINE except that it appears with the Answers.

This element appears with the Answer part of a test and appears in replacement token <2> when formatting.


GRAPH_MARK

public static final MTFI.FIType GRAPH_MARK

This item is a plain text placeholder for where a graph or image should be inserted into the test. The only content is a short ID.

This element has a standard, fixed format that appears with the Problems only.


PAGE_BREAK

public static final MTFI.FIType PAGE_BREAK
This is a marker to indicate where a page break should occur. It has no content and appears in a standard format with the Problems.


UNKNOWN

public static final MTFI.FIType UNKNOWN
This is an 'Oops!' marker that should never be seen. It is used to catch mis-constructed MTFIs. If one is encountered it will not appear, ever, but a Debug-level message is printed.

Method Detail

values

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

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

valueOf

public static MTFI.FIType 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
java.lang.NullPointerException - if the argument is null

printProblem

public boolean printProblem()
Should this print with Problem part?


printAnswer

public boolean printAnswer()
Should this print with Answer part?


hasID

public boolean hasID()
Does this item have an XML ID attribute? (Graph marks yes, no for the others.)


getTemplate

public java.lang.String getTemplate()
Return the default template for this item type.


getXMLTemplate

public java.lang.String getXMLTemplate()
Return the appropriate XML-formatting template.