Sun Message Library for SWIFT API

com.stc.swift.runtime
Class SwiftOtdRep

java.lang.Object
  extended by com.stc.swift.runtime.SwiftOtdRep
All Implemented Interfaces:
com.stc.otd.runtime.OtdAsWSDLDocument, com.stc.otd.runtime.OtdNode, com.stc.otd.runtime.OtdRoot, com.stc.otd.runtime.OtdRoot2, com.stc.otd.runtime.OtdTrace

public abstract class SwiftOtdRep
extends java.lang.Object
implements com.stc.otd.runtime.OtdRoot2, com.stc.otd.runtime.OtdTrace, com.stc.otd.runtime.OtdAsWSDLDocument

SwiftOtdRep implementation.

Version:

Constructor Summary
SwiftOtdRep()
          Creates new SwiftOtdRep
SwiftOtdRep(SwiftOtdChild parent)
           
 
Method Summary
 java.lang.Object add(int child)
          Adds repitition to the given child.
 java.lang.Object add(int child, int rep)
          Adds the given repitition to the given child.
 java.lang.Object append(byte[] data)
          Append the given data to end of existing data.
 java.lang.Object append(int child, byte[] data)
          Append the given data to end of existing data.
 java.lang.Object append(int child, int rep, byte[] data)
          Append the given data to end of existing data.
 byte[] build(com.stc.otd.runtime.OtdOutputStream out)
          Build (marshals, serializes, renders) the internal data tree into an output stream.
 java.lang.String[] check()
          Validates the contents of the data tree.
 void children(java.lang.Object[][] children)
           
 int choice()
          For a choice node, returns the index of the valid child.
 void command(java.lang.String arg)
          Passes the given magic string to the OTD instance.
 boolean consumedDelim()
           
 void consumedDelim(boolean consumedDelim)
           
 boolean containsData()
           
 void containsData(boolean constainsData)
           
 java.lang.Object copy(int start, byte[] data)
          Copy the given data at specified point, overwrites existing data.
 java.lang.Object copy(int child, int start, byte[] data)
          Copy the given data at specified point, overwrites existing data.
 java.lang.Object copy(int child, int rep, int start, byte[] data)
          Copy the given data at specified point, overwrites existing data.
 int count()
          Returns the number of children instances contained in this repitition.
 int count(int child)
          Returns the number of repetition instances contained in given child.
 boolean dataInChildren()
           
 void dataInChildren(boolean dataInChildren)
           
 boolean dataP()
           
 java.lang.Object delete(int start, int upto)
          Delete data from start til upto, shifting left remaining data.
 java.lang.Object delete(int child, int start, int upto)
          Delete data from start til upto, shifting left remaining data.
 java.lang.Object delete(int child, int rep, int start, int upto)
          Delete data from start til upto, shifting left remaining data.
 java.lang.Object get(boolean b)
          If (Leaf Node) retrieves data Else the Repitition Object.
 java.lang.Object get(int child)
          Retrieves the given child repitition(default to 0).
 java.lang.Object get(int child, int rep)
          Retrieves the given child repitition(default to 0).
 java.io.PrintStream getDebugStream()
          Retrieves the debugging trace stream, if any.
 byte[] getDefaultData()
           
 java.lang.String getLastSuccessInfo()
           
 int getMaxLength()
           
 int getMaxRep()
           
 int getMinRep()
           
 MPR[] getMPRsApplicable()
          individual MT OTD should tell what are the MPRs that is applicable to the MT;
 java.lang.String getPath()
          Builds a printable representation to this object.
 int getSubType()
           
 int getType()
           
 boolean has(int child)
          Tests whether the specified child is present.
 boolean has(int child, int rep)
          Tests whether given repetitiion of the specified child is present.
 java.lang.Object insert(int start, byte[] data)
          Inserts the given data at specified point, shifts existing data right.
 java.lang.Object insert(int child, int start, byte[] data)
          Inserts the given data at specified point, shifts existing data right.
 java.lang.Object insert(int child, int rep, int start, byte[] data)
          Inserts the given data at specified point, shifts existing data right.
 boolean isRequired()
           
 boolean isType(int type)
           
 int length()
          Retrieves the length of the contained data in this object.
 java.util.Map mapOfChildren()
           
 void marshal(com.stc.otd.runtime.OtdOutputStream out)
          Marshals (serializes, renders) the internal data tree into an output stream.
 byte[] marshalToBytes()
          Marshals (serializes, renders) the internal data tree into an output byte array.
 java.lang.String marshalToString()
          Marshals (serializes, renders) the internal data tree into an StringBuffer.
 void marshalToString(java.lang.StringBuffer strBuffer)
          Marshals (serializes, renders) the internal data tree into an StringBuffer.
 com.stc.otd.runtime.OtdMeta meta(int child)
          Retrieves the OtdMeta object for the child given by the child id
 SwiftOtdChild parent()
           
 java.lang.Object parse(com.stc.otd.runtime.OtdInputStream in)
          Parse (unmarshals, deserializes, parses) the given input into an internal data tree.
 int print()
           
 void printClear(int bitMask)
           
 void printSet(int bitMask)
           
 void remove(int child)
          Removes the given child repitition(default to 0).
 void remove(int child, int rep)
          Removes the given child repitition(default to 0).
 void reset()
          Clears out any data and resources held by this OTD instance.
 void resetChildren()
          Clears out any data and resources held by this OTD instance.
 void saveLastMatchPath(SwiftOtdRep rep)
           
 void set(int child, int rep, java.lang.Object value)
          Stores the given child instance.
 void set(int child, java.util.Map reps)
          Assigns the repititions to the specified child.
 void set(int child, java.lang.Object value)
          Stores the given child instance.
 void set(java.util.Map children)
          Assigns the children as given in the map.
 void set(java.lang.Object value)
          Stores the given instance.
 void setBdAnchored(boolean bdAnchored)
           
 void setBdBound(boolean bdBound)
           
 void setBeginDelim(byte[] beginDelim)
           
 void setDebugStream(java.io.PrintStream out)
          Redirects the debugging trace output to the given stream.
 void setDefaultData(byte[] defaultData)
           
 void setDelimRequired(boolean delimRequired)
           
 void setEdAnchored(boolean edAnchored)
           
 void setEndDelim(byte[] endDelim)
           
 void setMarkers(byte[][] markers)
           
 void setMaxLength(int max)
           
 void setMaxRep(int maxRep)
           
 void setMinLength(int min)
           
 void setMinRep(int minRep)
           
 void setNofN(int[] nofN)
           
 void setOffset(int offset)
           
 void setPp(boolean pp)
           
 void setPpF(boolean ppF)
           
 void setSubType(int subType)
           
 void setTag(byte[] tag)
           
 void setType(int type)
           
 int size()
          Returns the number of possible children.
 int size(int child)
          Returns the number of repititions for given child.
 java.io.PrintStream trace()
           
 void trace(java.io.PrintStream trace)
           
 void unmarshal(byte[] bytes)
          Unmarshals (deserializes, parses) the given input into an internal data tree.
 void unmarshal(com.stc.otd.runtime.OtdInputStream in)
          Unmarshals (deserializes, parses) the given input into an internal data tree.
 void unmarshalChildren(byte[] bytes)
          Unmarshals (deserializes, parses) the given input into an internal data tree.
 void unmarshalFromBytes(byte[] in)
          Unmarshals (deserializes, parses) the given input into an internal data tree.
 void unmarshalFromString(java.lang.String str)
          Unmarshals (deserializes, parses) the given input into an internal data tree.
 void updateParentInfo()
           
 void validate()
          validate the OTD against applicable MFVRs & MPRs
 void validateMFVR()
          for those MTs that have MFVR this will be overwritten;
 void validateMPR()
          make this generic to all the MT OTDs
 java.lang.String value()
          Retrieves the data that represents this repitition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.stc.otd.runtime.OtdNode
meta
 

Constructor Detail

SwiftOtdRep

public SwiftOtdRep()
Creates new SwiftOtdRep


SwiftOtdRep

public SwiftOtdRep(SwiftOtdChild parent)
Method Detail

setDebugStream

public void setDebugStream(java.io.PrintStream out)
Redirects the debugging trace output to the given stream. Setting the stream to null will switch of debugging.

Specified by:
setDebugStream in interface com.stc.otd.runtime.OtdTrace
Parameters:
out - the output stream

getDebugStream

public java.io.PrintStream getDebugStream()
Retrieves the debugging trace stream, if any.

Specified by:
getDebugStream in interface com.stc.otd.runtime.OtdTrace
Returns:
the stream, or null if none

command

public void command(java.lang.String arg)
Passes the given magic string to the OTD instance. The semantics for this are completely up to the OTD implementation.

Specified by:
command in interface com.stc.otd.runtime.OtdTrace
Parameters:
arg - some string, meaningful to the OTD only

parent

public SwiftOtdChild parent()

isType

public boolean isType(int type)

containsData

public boolean containsData()

containsData

public void containsData(boolean constainsData)

dataP

public boolean dataP()

consumedDelim

public void consumedDelim(boolean consumedDelim)

consumedDelim

public boolean consumedDelim()

trace

public void trace(java.io.PrintStream trace)

trace

public java.io.PrintStream trace()

print

public int print()

printSet

public void printSet(int bitMask)

printClear

public void printClear(int bitMask)

getLastSuccessInfo

public java.lang.String getLastSuccessInfo()

saveLastMatchPath

public void saveLastMatchPath(SwiftOtdRep rep)

setType

public void setType(int type)

getType

public int getType()

setSubType

public void setSubType(int subType)

getSubType

public int getSubType()

children

public void children(java.lang.Object[][] children)

getMinRep

public int getMinRep()

setMinRep

public void setMinRep(int minRep)

getMaxRep

public int getMaxRep()

setMaxRep

public void setMaxRep(int maxRep)

setNofN

public void setNofN(int[] nofN)

setOffset

public void setOffset(int offset)

setMinLength

public void setMinLength(int min)

setMaxLength

public void setMaxLength(int max)

getMaxLength

public int getMaxLength()

setEndDelim

public void setEndDelim(byte[] endDelim)

setMarkers

public void setMarkers(byte[][] markers)

setBeginDelim

public void setBeginDelim(byte[] beginDelim)

setTag

public void setTag(byte[] tag)

setDefaultData

public void setDefaultData(byte[] defaultData)

getDefaultData

public byte[] getDefaultData()

setDelimRequired

public void setDelimRequired(boolean delimRequired)

setBdAnchored

public void setBdAnchored(boolean bdAnchored)

setBdBound

public void setBdBound(boolean bdBound)

setEdAnchored

public void setEdAnchored(boolean edAnchored)

setPp

public void setPp(boolean pp)

setPpF

public void setPpF(boolean ppF)

dataInChildren

public void dataInChildren(boolean dataInChildren)

dataInChildren

public boolean dataInChildren()

updateParentInfo

public void updateParentInfo()

mapOfChildren

public java.util.Map mapOfChildren()

reset

public void reset()
Clears out any data and resources held by this OTD instance.

Specified by:
reset in interface com.stc.otd.runtime.OtdRoot

resetChildren

public void resetChildren()
Clears out any data and resources held by this OTD instance.


has

public boolean has(int child)
            throws java.lang.IndexOutOfBoundsException
Tests whether the specified child is present.

Specified by:
has in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
Returns:
boolean result of presence check
Throws:
java.lang.IndexOutOfBoundsException

has

public boolean has(int child,
                   int rep)
            throws java.lang.IndexOutOfBoundsException
Tests whether given repetitiion of the specified child is present.

Specified by:
has in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
Returns:
boolean result of presence check
Throws:
java.lang.IndexOutOfBoundsException - for invalid index or child

size

public int size()
Returns the number of possible children.

Parameters:
NONE -
Returns:
number of possible children for repitition.

size

public int size(int child)
Returns the number of repititions for given child.

Specified by:
size in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
Returns:
count of possible repititions for specified children.

count

public int count()
Returns the number of children instances contained in this repitition.

Parameters:
NONE -
Returns:
count of children instances for repitition.

count

public int count(int child)
          throws java.lang.IndexOutOfBoundsException
Returns the number of repetition instances contained in given child.

Specified by:
count in interface com.stc.otd.runtime.OtdNode
Parameters:
child - number of repititions of child
Returns:
count of children instances for specified repitition.
Throws:
java.lang.IndexOutOfBoundsException

choice

public int choice()
For a choice node, returns the index of the valid child. A choice node has a number of children, only one of which can occur below any given parent instance. If there is no current valid child, it returns -1.

Specified by:
choice in interface com.stc.otd.runtime.OtdNode
Parameters:
NONE -
Returns:
the child index, or -1

check

public java.lang.String[] check()
Validates the contents of the data tree. This calls the code generated from the check overlay. Some check overlay code may be invoked automatically during unmarshal(). NOTE: WE WANT some more deep structure in the error messages, to tie in with the node-IDs to the GUIs can refer to them

Specified by:
check in interface com.stc.otd.runtime.OtdRoot
Returns:
null if okay, else a list of error strings

value

public java.lang.String value()
Retrieves the data that represents this repitition.

Parameters:
NONE. -
Returns:
an String, the data representing this repitition.

length

public int length()
Retrieves the length of the contained data in this object.

Parameters:
NONE. -
Returns:
the length of data for object.

get

public java.lang.Object get(boolean b)
If (Leaf Node) retrieves data Else the Repitition Object.

Parameters:
NONE. -
Returns:
an String or the Repitition Object.

get

public java.lang.Object get(int child)
                     throws java.lang.IndexOutOfBoundsException
Retrieves the given child repitition(default to 0). If child is a leaf node expect to return a primitive Java type value that is boxed. e.g. Integer for int.

Specified by:
get in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
Returns:
if (leaf node) then current value else repitition(0).
Throws:
java.lang.IndexOutOfBoundsException - for invalid child

get

public java.lang.Object get(int child,
                            int rep)
                     throws java.lang.IndexOutOfBoundsException
Retrieves the given child repitition(default to 0). If child is a leaf node expect to return a primitive Java type value that is boxed. e.g. Integer for int.

Specified by:
get in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
Returns:
the current value
Throws:
java.lang.IndexOutOfBoundsException - for invalid index or child

meta

public com.stc.otd.runtime.OtdMeta meta(int child)
                                 throws java.lang.IndexOutOfBoundsException
Retrieves the OtdMeta object for the child given by the child id

Parameters:
child - the integer representing the
Returns:
the OtdMeta object for the child
Throws:
java.lang.IndexOutOfBoundsException - for invalid child

remove

public void remove(int child)
            throws java.lang.IndexOutOfBoundsException
Removes the given child repitition(default to 0).

Specified by:
remove in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
Throws:
java.lang.IndexOutOfBoundsException - for invalid child

remove

public void remove(int child,
                   int rep)
            throws java.lang.IndexOutOfBoundsException
Removes the given child repitition(default to 0).

Specified by:
remove in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
Throws:
java.lang.IndexOutOfBoundsException - for invalid index or child

set

public void set(java.util.Map children)
         throws java.lang.IndexOutOfBoundsException,
                java.lang.IllegalArgumentException
Assigns the children as given in the map. May contain holes.

Parameters:
children - containing the map of children to be assigned.
Throws:
java.lang.IndexOutOfBoundsException
java.lang.IllegalArgumentException

set

public void set(int child,
                java.util.Map reps)
         throws java.lang.IndexOutOfBoundsException,
                java.lang.IllegalArgumentException
Assigns the repititions to the specified child. May contain holes.

Parameters:
reps - to be assigned to the specified child.
Throws:
java.lang.IndexOutOfBoundsException
java.lang.IllegalArgumentException

set

public void set(java.lang.Object value)
Stores the given instance. Primitive Java type values are passed boxed, e.g. Integer for int.

Parameters:
value - the new child value
Throws:
java.lang.IllegalArgumentException - for a type or value error

set

public void set(int child,
                java.lang.Object value)
         throws java.lang.IndexOutOfBoundsException,
                java.lang.IllegalArgumentException
Stores the given child instance. Primitive Java type values are passed boxed, e.g. Integer for int.

Specified by:
set in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
value - the new child value
Throws:
java.lang.IndexOutOfBoundsException - for invalid child
java.lang.IllegalArgumentException - for a type or value error

set

public void set(int child,
                int rep,
                java.lang.Object value)
         throws java.lang.IndexOutOfBoundsException,
                java.lang.IllegalArgumentException
Stores the given child instance. Primitive Java type values are passed boxed, e.g. Integer for int.

Specified by:
set in interface com.stc.otd.runtime.OtdNode
Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
value - the new child value
Throws:
java.lang.IndexOutOfBoundsException - for invalid index or child
java.lang.IllegalArgumentException - for a type or value error

add

public java.lang.Object add(int child)
Adds repitition to the given child.

Parameters:
child - index in this repitition, from 0
Throws:
java.lang.IndexOutOfBoundsException - for invalid child or rep

add

public java.lang.Object add(int child,
                            int rep)
Adds the given repitition to the given child.

Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
Throws:
java.lang.IndexOutOfBoundsException - for invalid child or rep

getPath

public java.lang.String getPath()
Builds a printable representation to this object.

Returns:
Path represented as String.

insert

public java.lang.Object insert(int start,
                               byte[] data)
Inserts the given data at specified point, shifts existing data right.

Parameters:
start - byte of the insertion, from 0.
data - to be inserted.
Returns:
the result of inserting the data

insert

public java.lang.Object insert(int child,
                               int start,
                               byte[] data)
Inserts the given data at specified point, shifts existing data right.

Parameters:
child - index in this repitition, from 0.
start - byte of the insertion, from 0.
data - to be inserted.
Returns:
the result of inserting the data

insert

public java.lang.Object insert(int child,
                               int rep,
                               int start,
                               byte[] data)
Inserts the given data at specified point, shifts existing data right.

Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
start - byte of the insertion, from 0.
data - to be inserted.
Returns:
the result of inserting the data

copy

public java.lang.Object copy(int start,
                             byte[] data)
Copy the given data at specified point, overwrites existing data.

Parameters:
start - byte of the copying, from 0.
data - to be copied.
Returns:
the result of copying the data

copy

public java.lang.Object copy(int child,
                             int start,
                             byte[] data)
Copy the given data at specified point, overwrites existing data.

Parameters:
child - index in this repitition, from 0.
start - byte of the copying, from 0.
data - to be copied.
Returns:
the result of copying the data

copy

public java.lang.Object copy(int child,
                             int rep,
                             int start,
                             byte[] data)
Copy the given data at specified point, overwrites existing data.

Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
start - byte of the copying, from 0.
data - to be copied.
Returns:
the result of copying the data

append

public java.lang.Object append(byte[] data)
Append the given data to end of existing data.

Parameters:
data - to be appended.
Returns:
the result of appending the data.

append

public java.lang.Object append(int child,
                               byte[] data)
Append the given data to end of existing data.

Parameters:
child - index in this repitition, from 0.
data - to be appended.
Returns:
the result of appending the data.

append

public java.lang.Object append(int child,
                               int rep,
                               byte[] data)
Append the given data to end of existing data.

Parameters:
child - index in this repitition, from 0.
rep - index for requested child, from 0.
data - to be appended.
Returns:
the result of appending the data

delete

public java.lang.Object delete(int start,
                               int upto)
Delete data from start til upto, shifting left remaining data.

Parameters:
start - byte of the deleting, from 0.
upto - byte of the deleting, from 0.
Returns:
the result of deleting the data

delete

public java.lang.Object delete(int child,
                               int start,
                               int upto)
Delete data from start til upto, shifting left remaining data.

Parameters:
child - index in this repitition, from 0.
start - byte of the deleting, from 0.
upto - byte of the deleting, from 0.
Returns:
the result of deleting the data

delete

public java.lang.Object delete(int child,
                               int rep,
                               int start,
                               int upto)
Delete data from start til upto, shifting left remaining data.

Parameters:
child - index in this repitition, from 0
rep - index for requested child, from 0
start - byte of the deleting, from 0.
upto - byte of the deleting, from 0.
Returns:
the result of deleting the data

marshalToBytes

public byte[] marshalToBytes()
                      throws com.stc.otd.runtime.MarshalException,
                             java.io.IOException
Marshals (serializes, renders) the internal data tree into an output byte array.

Specified by:
marshalToBytes in interface com.stc.otd.runtime.OtdRoot2
Throws:
java.io.IOException - for output problems
com.stc.otd.runtime.MarshalException - for an inconsistent internal tree

marshalToString

public void marshalToString(java.lang.StringBuffer strBuffer)
                     throws com.stc.otd.runtime.MarshalException,
                            java.io.IOException
Marshals (serializes, renders) the internal data tree into an StringBuffer.

Parameters:
strBuffer - the StringBuffer to place the output to.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.MarshalException - for an inconsistent internal tree

marshalToString

public java.lang.String marshalToString()
                                 throws com.stc.otd.runtime.MarshalException,
                                        java.io.IOException
Marshals (serializes, renders) the internal data tree into an StringBuffer.

Specified by:
marshalToString in interface com.stc.otd.runtime.OtdRoot2
Returns:
the OTD as a string
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.MarshalException - for an inconsistent internal tree

marshal

public void marshal(com.stc.otd.runtime.OtdOutputStream out)
             throws com.stc.otd.runtime.MarshalException,
                    java.io.IOException
Marshals (serializes, renders) the internal data tree into an output stream.

Specified by:
marshal in interface com.stc.otd.runtime.OtdRoot
Parameters:
out - the stream to place the output to.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.MarshalException - for an inconsistent internal tree

build

public byte[] build(com.stc.otd.runtime.OtdOutputStream out)
             throws com.stc.otd.runtime.MarshalException,
                    java.io.IOException
Build (marshals, serializes, renders) the internal data tree into an output stream.

Parameters:
out - the stream to place the output to.
Returns:
if (delimiter not used) delimiter else byte[0].
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.MarshalException - for an inconsistent internal tree

unmarshalFromString

public void unmarshalFromString(java.lang.String str)
                         throws com.stc.otd.runtime.UnmarshalException,
                                java.io.IOException
Unmarshals (deserializes, parses) the given input into an internal data tree.

Specified by:
unmarshalFromString in interface com.stc.otd.runtime.OtdRoot2
Parameters:
str - the String containing data for parsing.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

unmarshalFromBytes

public void unmarshalFromBytes(byte[] in)
                        throws com.stc.otd.runtime.UnmarshalException,
                               java.io.IOException
Unmarshals (deserializes, parses) the given input into an internal data tree.

Specified by:
unmarshalFromBytes in interface com.stc.otd.runtime.OtdRoot2
Parameters:
in - the input, as a byte array
Throws:
java.io.IOException - for input problems
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

unmarshal

public void unmarshal(byte[] bytes)
               throws com.stc.otd.runtime.UnmarshalException,
                      java.io.IOException
Unmarshals (deserializes, parses) the given input into an internal data tree.

Parameters:
bytes - the byte[] containing data for parsing.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

unmarshalChildren

public void unmarshalChildren(byte[] bytes)
                       throws com.stc.otd.runtime.UnmarshalException,
                              java.io.IOException
Unmarshals (deserializes, parses) the given input into an internal data tree.

Parameters:
bytes - the byte[] containing data for parsing.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

unmarshal

public void unmarshal(com.stc.otd.runtime.OtdInputStream in)
               throws com.stc.otd.runtime.UnmarshalException,
                      java.io.IOException
Unmarshals (deserializes, parses) the given input into an internal data tree.

Specified by:
unmarshal in interface com.stc.otd.runtime.OtdRoot
Parameters:
in - the input, as a byte stream
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

parse

public java.lang.Object parse(com.stc.otd.runtime.OtdInputStream in)
                       throws com.stc.otd.runtime.UnmarshalException,
                              java.io.IOException
Parse (unmarshals, deserializes, parses) the given input into an internal data tree.

Parameters:
in - the input, as a byte stream
Returns:
if (unmarshal) else if (optional) null else Exception.
Throws:
java.io.IOException - ioexception
com.stc.otd.runtime.UnmarshalException - for a lexical or other mismatch

isRequired

public boolean isRequired()

validate

public void validate()
              throws MessageValidationException
validate the OTD against applicable MFVRs & MPRs

Throws:
MessageValidationException - - if violates either MFVRs or MPRs;

validateMPR

public void validateMPR()
                 throws MPRException
make this generic to all the MT OTDs

Throws:
MPRException

getMPRsApplicable

public MPR[] getMPRsApplicable()
                        throws java.lang.InstantiationException,
                               java.lang.IllegalAccessException
individual MT OTD should tell what are the MPRs that is applicable to the MT;

Returns:
MPRs applicable to the MT, null if there is NO such MPRs;
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

validateMFVR

public void validateMFVR()
                  throws MFVRException
for those MTs that have MFVR this will be overwritten;

Throws:
MFVRException

Sun Message Library for SWIFT API

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.