|
Sun Message Library for SWIFT API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stc.swift.runtime.SwiftOtdRep
public abstract class SwiftOtdRep
SwiftOtdRep implementation.
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 |
---|
public SwiftOtdRep()
public SwiftOtdRep(SwiftOtdChild parent)
Method Detail |
---|
public void setDebugStream(java.io.PrintStream out)
setDebugStream
in interface com.stc.otd.runtime.OtdTrace
out
- the output streampublic java.io.PrintStream getDebugStream()
getDebugStream
in interface com.stc.otd.runtime.OtdTrace
public void command(java.lang.String arg)
command
in interface com.stc.otd.runtime.OtdTrace
arg
- some string, meaningful to the OTD onlypublic SwiftOtdChild parent()
public boolean isType(int type)
public boolean containsData()
public void containsData(boolean constainsData)
public boolean dataP()
public void consumedDelim(boolean consumedDelim)
public boolean consumedDelim()
public void trace(java.io.PrintStream trace)
public java.io.PrintStream trace()
public int print()
public void printSet(int bitMask)
public void printClear(int bitMask)
public java.lang.String getLastSuccessInfo()
public void saveLastMatchPath(SwiftOtdRep rep)
public void setType(int type)
public int getType()
public void setSubType(int subType)
public int getSubType()
public void children(java.lang.Object[][] children)
public int getMinRep()
public void setMinRep(int minRep)
public int getMaxRep()
public void setMaxRep(int maxRep)
public void setNofN(int[] nofN)
public void setOffset(int offset)
public void setMinLength(int min)
public void setMaxLength(int max)
public int getMaxLength()
public void setEndDelim(byte[] endDelim)
public void setMarkers(byte[][] markers)
public void setBeginDelim(byte[] beginDelim)
public void setTag(byte[] tag)
public void setDefaultData(byte[] defaultData)
public byte[] getDefaultData()
public void setDelimRequired(boolean delimRequired)
public void setBdAnchored(boolean bdAnchored)
public void setBdBound(boolean bdBound)
public void setEdAnchored(boolean edAnchored)
public void setPp(boolean pp)
public void setPpF(boolean ppF)
public void dataInChildren(boolean dataInChildren)
public boolean dataInChildren()
public void updateParentInfo()
public java.util.Map mapOfChildren()
public void reset()
reset
in interface com.stc.otd.runtime.OtdRoot
public void resetChildren()
public boolean has(int child) throws java.lang.IndexOutOfBoundsException
has
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0
java.lang.IndexOutOfBoundsException
public boolean has(int child, int rep) throws java.lang.IndexOutOfBoundsException
has
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0rep
- index for requested child, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic int size()
NONE
-
public int size(int child)
size
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0
public int count()
NONE
-
public int count(int child) throws java.lang.IndexOutOfBoundsException
count
in interface com.stc.otd.runtime.OtdNode
child
- number of repititions of child
java.lang.IndexOutOfBoundsException
public int choice()
choice
in interface com.stc.otd.runtime.OtdNode
NONE
-
public java.lang.String[] check()
check
in interface com.stc.otd.runtime.OtdRoot
public java.lang.String value()
NONE.
-
public int length()
NONE.
-
public java.lang.Object get(boolean b)
NONE.
-
public java.lang.Object get(int child) throws java.lang.IndexOutOfBoundsException
get
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0
java.lang.IndexOutOfBoundsException
- for invalid childpublic java.lang.Object get(int child, int rep) throws java.lang.IndexOutOfBoundsException
get
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0rep
- index for requested child, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic com.stc.otd.runtime.OtdMeta meta(int child) throws java.lang.IndexOutOfBoundsException
child
- the integer representing the
java.lang.IndexOutOfBoundsException
- for invalid childpublic void remove(int child) throws java.lang.IndexOutOfBoundsException
remove
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0
java.lang.IndexOutOfBoundsException
- for invalid childpublic void remove(int child, int rep) throws java.lang.IndexOutOfBoundsException
remove
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0rep
- index for requested child, from 0
java.lang.IndexOutOfBoundsException
- for invalid index or childpublic void set(java.util.Map children) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
children
- containing the map of children to be assigned.
java.lang.IndexOutOfBoundsException
java.lang.IllegalArgumentException
public void set(int child, java.util.Map reps) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
reps
- to be assigned to the specified child.
java.lang.IndexOutOfBoundsException
java.lang.IllegalArgumentException
public void set(java.lang.Object value)
value
- the new child value
java.lang.IllegalArgumentException
- for a type or value errorpublic void set(int child, java.lang.Object value) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
set
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0value
- the new child value
java.lang.IndexOutOfBoundsException
- for invalid child
java.lang.IllegalArgumentException
- for a type or value errorpublic void set(int child, int rep, java.lang.Object value) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
set
in interface com.stc.otd.runtime.OtdNode
child
- index in this repitition, from 0rep
- index for requested child, from 0value
- the new child value
java.lang.IndexOutOfBoundsException
- for invalid index or child
java.lang.IllegalArgumentException
- for a type or value errorpublic java.lang.Object add(int child)
child
- index in this repitition, from 0
java.lang.IndexOutOfBoundsException
- for invalid child or reppublic java.lang.Object add(int child, int rep)
child
- index in this repitition, from 0rep
- index for requested child, from 0
java.lang.IndexOutOfBoundsException
- for invalid child or reppublic java.lang.String getPath()
public java.lang.Object insert(int start, byte[] data)
start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object insert(int child, int start, byte[] data)
child
- index in this repitition, from 0.start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object insert(int child, int rep, int start, byte[] data)
child
- index in this repitition, from 0rep
- index for requested child, from 0start
- byte of the insertion, from 0.data
- to be inserted.
public java.lang.Object copy(int start, byte[] data)
start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object copy(int child, int start, byte[] data)
child
- index in this repitition, from 0.start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object copy(int child, int rep, int start, byte[] data)
child
- index in this repitition, from 0rep
- index for requested child, from 0start
- byte of the copying, from 0.data
- to be copied.
public java.lang.Object append(byte[] data)
data
- to be appended.
public java.lang.Object append(int child, byte[] data)
child
- index in this repitition, from 0.data
- to be appended.
public java.lang.Object append(int child, int rep, byte[] data)
child
- index in this repitition, from 0.rep
- index for requested child, from 0.data
- to be appended.
public java.lang.Object delete(int start, int upto)
start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public java.lang.Object delete(int child, int start, int upto)
child
- index in this repitition, from 0.start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public java.lang.Object delete(int child, int rep, int start, int upto)
child
- index in this repitition, from 0rep
- index for requested child, from 0start
- byte of the deleting, from 0.upto
- byte of the deleting, from 0.
public byte[] marshalToBytes() throws com.stc.otd.runtime.MarshalException, java.io.IOException
marshalToBytes
in interface com.stc.otd.runtime.OtdRoot2
java.io.IOException
- for output problems
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic void marshalToString(java.lang.StringBuffer strBuffer) throws com.stc.otd.runtime.MarshalException, java.io.IOException
strBuffer
- the StringBuffer to place the output to.
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic java.lang.String marshalToString() throws com.stc.otd.runtime.MarshalException, java.io.IOException
marshalToString
in interface com.stc.otd.runtime.OtdRoot2
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic void marshal(com.stc.otd.runtime.OtdOutputStream out) throws com.stc.otd.runtime.MarshalException, java.io.IOException
marshal
in interface com.stc.otd.runtime.OtdRoot
out
- the stream to place the output to.
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic byte[] build(com.stc.otd.runtime.OtdOutputStream out) throws com.stc.otd.runtime.MarshalException, java.io.IOException
out
- the stream to place the output to.
java.io.IOException
- ioexception
com.stc.otd.runtime.MarshalException
- for an inconsistent internal treepublic void unmarshalFromString(java.lang.String str) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
unmarshalFromString
in interface com.stc.otd.runtime.OtdRoot2
str
- the String containing data for parsing.
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic void unmarshalFromBytes(byte[] in) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
unmarshalFromBytes
in interface com.stc.otd.runtime.OtdRoot2
in
- the input, as a byte array
java.io.IOException
- for input problems
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic void unmarshal(byte[] bytes) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
bytes
- the byte[] containing data for parsing.
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic void unmarshalChildren(byte[] bytes) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
bytes
- the byte[] containing data for parsing.
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic void unmarshal(com.stc.otd.runtime.OtdInputStream in) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
unmarshal
in interface com.stc.otd.runtime.OtdRoot
in
- the input, as a byte stream
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic java.lang.Object parse(com.stc.otd.runtime.OtdInputStream in) throws com.stc.otd.runtime.UnmarshalException, java.io.IOException
in
- the input, as a byte stream
java.io.IOException
- ioexception
com.stc.otd.runtime.UnmarshalException
- for a lexical or other mismatchpublic boolean isRequired()
public void validate() throws MessageValidationException
MessageValidationException
- - if violates
either MFVRs or MPRs;public void validateMPR() throws MPRException
MPRException
public MPR[] getMPRsApplicable() throws java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.IllegalAccessException
public void validateMFVR() throws MFVRException
MFVRException
|
Sun Message Library for SWIFT API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |