casxml
Class CASWriter

java.lang.Object
  extended by casxml.CASWriter

public class CASWriter
extends java.lang.Object

Writes the animation data for a sequence of AnimatedSigns in CAS 2.1 format to an underlying writer, supplied at construction time. The work is all done in the constructor, which is usually accessed via the class method writeDocument(java.io.Writer, java.lang.String, sigmlanim.AnimatedSign[]).


Nested Class Summary
static class CASWriter.CASWriterException
          CASWriter checked exception class.
 
Field Summary
static java.lang.String CAS_VERSION
          Current CAS version number in string format.
static int LINE_LIMIT
          The column limit after which a new line is started (at a convenient break point).
static java.lang.String STD_ENCODING
          The standard XML encoding.
static java.lang.String STD_INDENT
          The standard XML indentation unit, two spaces.
 
Constructor Summary
CASWriter(java.io.Writer wrtr, java.lang.String av, AnimatedSign[] signs)
          Constructs a new CAS writer, for the given avatar and animated sign sequence, to the given writer, using the standard XML encoding, indentation unit and CAS version number (2.1).
CASWriter(java.io.Writer wrtr, java.lang.String enc, java.lang.String av, AnimatedSign[] signs)
          Constructs a new CAS writer specifying the given XML encoding, for the given avatar and animated sign sequence, to the given writer, using the standard XML indentation unit and CAS version number (2.1).
CASWriter(java.io.Writer wrtr, java.lang.String enc, java.lang.String inunit, java.lang.String vn, java.lang.String av, AnimatedSign[] signs)
          Constructs a new CAS writer specifying the given XML encoding, for the given avatar and animated sign sequence, to the given writer, using the given indentation unit and CAS version number.
 
Method Summary
static boolean approxOne(float x, float EPS)
           
static boolean approxOneForRot(float x)
           
static boolean approxZero(float x, float EPS)
           
static boolean approxZeroForRot(float x)
           
static void writeDocument(java.io.Writer wrtr, java.lang.String av, AnimatedSign[] signs)
          Writes the given animation, for the given avatar, in CAS 2.1 format to the given writer, specifying the standard encoding (UTF-8).
static void writeDocument(java.io.Writer wrtr, java.lang.String enc, java.lang.String av, AnimatedSign[] signs)
          Writes the given animation, for the given avatar, in CAS 2.1 format to the given writer, specifying the given encoding.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAS_VERSION

public static final java.lang.String CAS_VERSION
Current CAS version number in string format.

See Also:
Constant Field Values

STD_ENCODING

public static final java.lang.String STD_ENCODING
The standard XML encoding.

See Also:
Constant Field Values

STD_INDENT

public static final java.lang.String STD_INDENT
The standard XML indentation unit, two spaces.

See Also:
Constant Field Values

LINE_LIMIT

public static final int LINE_LIMIT
The column limit after which a new line is started (at a convenient break point).

See Also:
Constant Field Values
Constructor Detail

CASWriter

public CASWriter(java.io.Writer wrtr,
                 java.lang.String av,
                 AnimatedSign[] signs)
          throws CASWriter.CASWriterException
Constructs a new CAS writer, for the given avatar and animated sign sequence, to the given writer, using the standard XML encoding, indentation unit and CAS version number (2.1).

Throws:
CASWriter.CASWriterException

CASWriter

public CASWriter(java.io.Writer wrtr,
                 java.lang.String enc,
                 java.lang.String av,
                 AnimatedSign[] signs)
          throws CASWriter.CASWriterException
Constructs a new CAS writer specifying the given XML encoding, for the given avatar and animated sign sequence, to the given writer, using the standard XML indentation unit and CAS version number (2.1).

Throws:
CASWriter.CASWriterException

CASWriter

public CASWriter(java.io.Writer wrtr,
                 java.lang.String enc,
                 java.lang.String inunit,
                 java.lang.String vn,
                 java.lang.String av,
                 AnimatedSign[] signs)
          throws CASWriter.CASWriterException
Constructs a new CAS writer specifying the given XML encoding, for the given avatar and animated sign sequence, to the given writer, using the given indentation unit and CAS version number.

Throws:
CASWriter.CASWriterException
Method Detail

writeDocument

public static void writeDocument(java.io.Writer wrtr,
                                 java.lang.String av,
                                 AnimatedSign[] signs)
                          throws CASWriter.CASWriterException
Writes the given animation, for the given avatar, in CAS 2.1 format to the given writer, specifying the standard encoding (UTF-8).

Throws:
CASWriter.CASWriterException

writeDocument

public static void writeDocument(java.io.Writer wrtr,
                                 java.lang.String enc,
                                 java.lang.String av,
                                 AnimatedSign[] signs)
                          throws CASWriter.CASWriterException
Writes the given animation, for the given avatar, in CAS 2.1 format to the given writer, specifying the given encoding.

Throws:
CASWriter.CASWriterException

approxOneForRot

public static final boolean approxOneForRot(float x)

approxOne

public static final boolean approxOne(float x,
                                      float EPS)

approxZeroForRot

public static final boolean approxZeroForRot(float x)

approxZero

public static final boolean approxZero(float x,
                                       float EPS)