|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rbnb.api.Rmap
public class Rmap
Hierarchical description of data.
An Rmap consists of six major parts:
TimeRange,TimeRange,Rmaps, andRmaps.
The optional name is a string that provides part of the unique
identification for this Rmap within its parent
Rmap's group or child list.
The optional time TimeRange provides the remainder of the
unique identification for this Rmap within its parent
Rmap's group or child list.
The optional frame index TimeRange provides the frame index(es)
represented by this Rmap. A "frame" is defined as a single
Rmap hierarchy sent by a source application to the server. The
server provides a monotonically increasing index for each frame.
A parent Rmap can contain only a single Rmap with
a particular combination of name and time (including no name and no
TimeRange). Rmaps are sorted in a list (group or
child) by name (nameless Rmaps come first) and then by time
(timeless Rmaps come first).
The optional DataBlock describes and optionally provides the
data belonging to this Rmap and its children.
The optional group list contains Rmaps that inherit the
children of this Rmap as children of themselves.
The optional children list contains Rmaps that belong to this
Rmap and its group members.
DataBlock,
DataReference,
DataArray,
TimeRange,
Serialized Form| Field Summary | |
|---|---|
static char |
PATHDELIMITER
the delimiter between names in a fully specified channel name path. |
| Constructor Summary | |
|---|---|
Rmap()
Class constructor. |
|
Rmap(String nameI)
Class constructor to build an Rmap from a name. |
|
Rmap(String nameI,
DataBlock dblockI,
TimeRange trangeI)
Class constructor to build an Rmap from a name, data block,
and TimeRange. |
|
| Method Summary | |
|---|---|
Rmap |
addChannel(String channelNameI)
Adds a new Rmap hierarchy (channel name) to an existing
hierarchy. |
void |
addChild(Rmap childI)
Adds a child Rmap to this Rmap. |
void |
addChildAt(Rmap childI,
int indexI)
Adds a child Rmap to this Rmap at the
specified index. |
void |
addDataWithTimeReference(Object dataI,
int ndataI,
int ptsizeI,
byte dtypeI,
byte worderI,
DataArray referenceI)
Adds data to this Rmap hierarchy with a
DataArray supplying the TimeRanges. |
void |
addMember(Rmap memberI)
Adds a member Rmap to this Rmap. |
Object |
clone()
Clones this Rmap. |
boolean |
collapse()
Collapses this Rmap hierarchy. |
int |
compareNames(Rmap otherI)
Compares the name of this Rmap to the name of the input
Rmap. |
int |
compareNames(String nameI)
Compares the name of this Rmap to the input name. |
static int |
compareNames(String nameI,
String name2I)
Compares the input names. |
int |
compareTo(Object sidI,
Object otherI)
Compares the sorting value of this Rmap to the input
sorting value according to the type sort specified by the sort
identifier. |
int |
compareTo(Rmap rmapI)
Compares the input Rmap to this one. |
static Rmap |
createFromName(String nameI)
Creates an Rmap hierarchy from the input name. |
DataArray |
extract(String chanNameI)
Extracts the time and data for a particular channel. |
DataArray |
extract(String chanNameI,
boolean frameFlagI,
boolean timeFlagI,
boolean dataFlagI)
Extracts the frame indexes, time, and/or data for a particular channel. |
String[] |
extractFolders()
Extracts the names of folders from this Rmap hierarchy. |
String[] |
extractFoldersAndChannels()
Extracts the names of channels and folders from this Rmap
hierarchy. |
String[] |
extractNames()
Extracts the names from this Rmap hierarchy. |
Rmap |
extractRmap(Rmap requestI,
boolean dataFlagI)
Extracts Rmaps from this Rmap that match the
input request Rmap. |
Rmap |
findChild(Rmap childI)
Finds a matching child Rmap. |
Rmap |
findDescendant(String nameI,
boolean addI)
Finds a descendant Rmap by name. |
Rmap |
findMember(Rmap memberI)
Finds a matching member Rmap. |
Rmap |
getChildAt(int indexI)
Gets the child at the specified index. |
com.rbnb.api.RmapVector |
getChildren()
Gets the list of children of this Rmap. |
DataBlock |
getDblock()
Gets the DataBlock of this Rmap. |
TimeRange |
getFrange()
Gets the frame index TimeRange of this Rmap. |
String |
getFullName()
Gets the fully qualified name of this Rmap. |
Rmap |
getMemberAt(int indexI)
Gets the member at the specified index. |
com.rbnb.api.RmapVector |
getMembers()
Gets the group members of this Rmap. |
String |
getName()
Gets the name of this Rmap. |
int |
getNchildren()
Gets the number of children. |
int |
getNmembers()
Gets the number of members. |
Rmap |
getParent()
Gets the parent Rmap of this Rmap. |
TimeRange |
getTrange()
Gets the TimeRange of this Rmap. |
boolean |
isImplemented(byte typeI)
Is the specified type of operation implemented? |
void |
markLeaf()
Marks leaf nodes of an Rmap hierarchy by putting in
single byte DataBlocks. |
Rmap |
mergeWith(Rmap rmapI)
Merges the input Rmap hierarchy with this one. |
Rmap |
moveToBottom()
Moves to the bottom of this Rmap hierarchy. |
Rmap |
moveToTop()
Moves to the top of this Rmap hierarchy. |
void |
nullify()
Nullifies this Rmap. |
void |
removeChild(Rmap childI)
Removes a child Rmap from this Rmap. |
void |
removeChildAt(int indexI)
Removes the child Rmap at a particular index from this
Rmap. |
void |
removeMember(Rmap memberI)
Removes a member Rmap from this Rmap. |
void |
removeMemberAt(int indexI)
Removes the member Rmap at a particular index from this
Rmap. |
void |
setDblock(DataBlock dblockI)
Sets the DataBlock of this Rmap. |
void |
setFrange(TimeRange frangeI)
Sets the frame index TimeRange of this Rmap. |
void |
setName(String nameI)
Sets the name of this Rmap. |
void |
setTrange(TimeRange trangeI)
Sets the TimeRange of this Rmap. |
Object |
sortField(Object sidI)
Gets the sorting value for this Rmap. |
Rmap |
toNameHierarchy()
Creates an Rmap hierarchy that can be used to make requests
for the names. |
String |
toString()
Gets a displayable string representation of this Rmap. |
String |
toString(boolean memberI,
String indentI)
Gets a displayable string representation of this Rmap. |
static String |
xmlRegistration(long lengthI,
String mimeTypeI)
Produces an XML description of the specified length for the registration map. |
static String |
xmlRegistration(long lengthI,
String mimeTypeI,
String xmlI)
Produces an XML description of the specified length and the MIME type for the registration map. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char PATHDELIMITER
| Constructor Detail |
|---|
public Rmap()
Rmap(String),
Rmap(String,DataBlock,TimeRange)
public Rmap(String nameI)
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
Rmap from a name.
nameI - the name of the Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.Rmap()
public Rmap(String nameI,
DataBlock dblockI,
TimeRange trangeI)
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
Rmap from a name, data block,
and TimeRange.
nameI - the name of the Rmap.dblockI - the DataBlock.trangeI - the TimeRange.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.| Method Detail |
|---|
public final Rmap addChannel(String channelNameI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy (channel name) to an existing
hierarchy.
This method creates the minimum number of additional Rmaps
needed to add the new hierarchy by matching names in the new hierarchy
to those in the existing hierarchy.
If necessary, this method creates a common parent for the existing hierarchy and the new one.
channelNameI - the name to add.
Rmap representing the channel.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if there is a problem with the input name.
IllegalStateException - thrown if this Rmap already has a parent.
InterruptedException - thrown if the operation is interrupted.
public void addChild(Rmap childI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap to this Rmap.
childI - the new child Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a
child of another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
public void addChildAt(Rmap childI,
int indexI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap to this Rmap at the
specified index.
childI - the new child Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a
child of another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
public final void addDataWithTimeReference(Object dataI,
int ndataI,
int ptsizeI,
byte dtypeI,
byte worderI,
DataArray referenceI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy with a
DataArray supplying the TimeRanges.
The method adds one or more unnamed Rmaps to this
Rmap.
This method is intended to allow plugins to efficiently copy time values from their input to their output without having to go through extracting the individual time values.
dataI - the data object.ndataI - the number of data points in the input.ptsizeI - the size of a data point in bytes.dtypeI - the type of data.worderI - the word order.referenceI - the DataArray reference.
The number of points in the reference must be equal to the number of points in the data object.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a
child of another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
public void addMember(Rmap memberI)
throws SerializeException,
EOFException,
IOException,
InterruptedException
Rmap to this Rmap.
memberI - the new member Rmap.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a child of
another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.getMembers(),
getParent(),
removeMember(com.rbnb.api.Rmap),
removeMemberAt(int)public Object clone()
Rmap.
This method clones the member and child Rmaps, the frame
and time TimeRanges, and the DataBlock.
public final boolean collapse()
throws AddressException,
SerializeException,
InterruptedIOException,
IOException,
InterruptedException
Rmap hierarchy.
This method collapses and reorganizes the Rmap hierarchy
rooted at the input Rmap to produce the most efficient
structure possible, given reasonable time constraints.
The method recursively performs the following operations:
Rmap, collapses out
the child Rmap,TimeRanges from its children
children by moving the TimeRange to this
Rmap if that won't change the meaning of the
hierarchy, andRmap hierarchies if it is possible
to move a single copy of their children to the current level and
create groups using data pools.
Note that this method replaces elements of this Rmap
hierarchy in place. It does not copy information unless absolutely
necessary.
Note that the data pool creation logic is not completed. Look into this further. It is turned off for now.
Rmap?
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with serialization.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an I/O problem.
InterruptedException - thrown if this operation is interrupted.public final int compareNames(Rmap otherI)
Rmap to the name of the input
Rmap.
otherI - the other Rmap.
Rmap compares less than the
input,Rmap compares equal to the input,
andRmap compares greater than the
input.public final int compareNames(String nameI)
Rmap to the input name.
nameI - the name to compare to.
<0 if this Rmap compares less than the input,
0 if this Rmap compares equal to the input, and
>0 if this Rmap compares greater than the input.
public static final int compareNames(String nameI,
String name2I)
nameI - the first name.name2I - the second name.
<0 if this Rmap compares less than the input,
0 if this Rmap compares equal to the input, and
>0 if this Rmap compares greater than the input.
public int compareTo(Object sidI,
Object otherI)
throws com.rbnb.utility.SortException
Rmap to the input
sorting value according to the type sort specified by the sort
identifier.
The sorting value for an Rmap is always itself. The
comparison is first by name, then by frame TimeRange, and
finally by TimeRange.
compareTo in interface com.rbnb.utility.SortCompareInterfacesidI - the sort type identifier -- must be null.otherI - the other sorting value.
<0 if this Rmap compares less than the input,
0 if this Rmap compares equal to the input, and
>0 if this Rmap compares greater than the input.
com.rbnb.utility.SortException - thrown if the input sort identifier is non-null.
IllegalStateException - thrown if both the this Rmap and the input
Rmap are nameless and timeless.compareTo(com.rbnb.api.Rmap)public int compareTo(Rmap rmapI)
Rmap to this one.
rmapI - the Rmap to compare.
<0 if this Rmap compares less than the input,
0 if this Rmap compares equal to the input, and
>0 if this Rmap compares greater than the input.
compareTo(Object,Object)
public static final Rmap createFromName(String nameI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy from the input name.
nameI - the name.
Rmap hierarchy.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a child of
another Rmap or if the input is null.
InterruptedException - thrown if the creation is interrupted.
public final DataArray extract(String chanNameI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
This method requires that all of the data for the channel be of a single data type. The returned result is an array of the data type, returned as a single object.
If there is no time or data information available for the specified
channel, an empty DataArray object is returned, with null
time and data fields.
chanNameI - the fully qualified name of the channel.
DataArray object containing the extracted times
and data.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a child of
another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
IllegalStateException - thrown if the Rmap hierarchy contains
information that cannot be processed by this code.
public final DataArray extract(String chanNameI,
boolean frameFlagI,
boolean timeFlagI,
boolean dataFlagI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
This method requires that all of the data for the channel be of a single data type. The returned result is an array of the data type, returned as a single object.
If there is no frame, time, or data information available for the
specified channel, an empty DataArray object is returned,
with null frame, time, and data fields.
chanNameI - the fully qualified name of the channel.frameFlagI - return the extracted frame indexes?timeFlagI - return the extacted times?dataFlagI - return the extraced data?
DataArray object containing the extracted times
and data.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a child of
another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
IllegalStateException - thrown if the Rmap hierarchy contains
information that cannot be processed by this code.
public final String[] extractFolders()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy.
Folders are defined as named Rmaps with no children.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public final String[] extractFoldersAndChannels()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap
hierarchy.
Channels are defined as names with data (equivalent to the results of
extractNames). Folders are defined as named
Rmaps with no children.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public final String[] extractNames()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public Rmap extractRmap(Rmap requestI,
boolean dataFlagI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmaps from this Rmap that match the
input request Rmap.
This is a complicated process that does what appears to be a relatively simple task, namely finding the subset of the Rmap hiearchy headed by this Rmap that matches the input request. It is complicated by the fact that Rmaps are a recursive structure that allows for inheritance of information from the top down to the bottom. In addition, the Rmap design at the time that this code was written was such that no assumptions could be made about the structure of any particular, non-specialized Rmap.
The processing involves a number of different objects:
The process starts by creating an RmapExtractor, which acts as the central dispatch and depository. An ExtractedChain is created to start the process of matching the source Rmap hierarchy against the request.
From there, the process proceeds to compare information in the source Rmap hierarchy against the request, moving down the two hierarchies, until a point in the source Rmap hierarchy is reached such that its name, time, and data match a portion of the request hierarchy. This is a recursive search sequence that goes through the following:
ExtractedChain.matchList - matches the list of Rmaps
at the next level down in the source hierarchy against the
current level of the request hierarchy,ExtractedChain.moveDown - moves down past a
nameless/timeless entry in the request hierarchy. If
there are multiple children in the request hierarchy, a
separate ExtractedChain is started for each one. This
loops back to the first step,ExtractedChain.matchListCurrent - matches the
source list against the current level in the request
hierarchy with no inherited information from higher up the
request hierarchy,ExtractedChain.matchListInherited - matches
the source list against just the inherited information
from higher up in the request hierarchy, orExtractedChain.matchListCurrentAndInherited -
matches the source list against a request consisting of
the combination of the current request and the inherited
information from higher up,
ExtractedChain.matchListAgainst - performs the
actual matching of the source list against the request
(inherited, current, current+inherited),RmapVector.findMatches - performs a modified
binary search for the request name and time within the
source list,RmapExtractor.extractInformation,ExtractedChain.matchedList,ExtractedChain.matchRmap builds one or more new
ExtractedChains containing the matched source Rmap, the request
that matched it (inherited, current, or current+inherited),
inherited information consisting of the inherited information
from above plus any unmatched name and time range from the
matching request (ExtractedChain.updateInherited),
and one child from the next level of request hierarchy as the
ExtractedChain's request,RmapExtractor.extractInformation),ExtractedChain.moveDownFrom starts moving down a
level in the source hierarchy,Rmap.moveDownFrom (and the moveDownFrom methods from
Rmap's specialized subclasses) moves down one level in the source
hierarchy and starts the process over again.
requestI - the request Rmap.dataFlagI - extract the data payloads?
Rmap hierarchy.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
IllegalStateException - thrown if the information matching the request cannot be
extracted for any reason.
public final Rmap findChild(Rmap childI)
throws AddressException,
SerializeException,
IOException,
InterruptedException
Rmap.
If there are multiple matches, the one returned is not defined.
childI - the child Rmap to match.
Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public final Rmap findDescendant(String nameI,
boolean addI)
throws AddressException,
SerializeException,
IOException,
InterruptedException
Rmap by name.
Due to the complications introduced by group membership, this method can only be used properly when there are no groups. If a group is discovered during the search, an exception is thrown.
This method can optionally create the hierarchy leading to the desired descendant.
nameI - the fully qualified descendant's name.addI - add the descendant if it doesn't exist?
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
IllegalStateException - thrown if a group is discovered.
public final Rmap findMember(Rmap memberI)
throws AddressException,
SerializeException,
IOException,
InterruptedException
Rmap.
If there are multiple matches, the one returned is not defined.
memberI - the member Rmap to match.
Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public Rmap getChildAt(int indexI)
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
indexI - the index of the child to retrieve.
Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
ArrayIndexOutOfBoundsException - thrown if there are no children or the index is not in the
range 0 to # of children - 1.
InterruptedException - thrown if the operation is interrupted.addChild(com.rbnb.api.Rmap),
getNchildren()
public final com.rbnb.api.RmapVector getChildren()
throws SerializeException,
EOFException,
IOException,
InterruptedException
Rmap.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addChild(com.rbnb.api.Rmap)public final DataBlock getDblock()
DataBlock of this Rmap.
DataBlock.setDblock(DataBlock)public final TimeRange getFrange()
TimeRange of this Rmap.
TimeRange.setFrange(TimeRange)
public final String getFullName()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap.
If the
Rmap is a descendent of an Rmap with
group members, the fully qualified name is actually ambiguous. The code
fills in a special _
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.
public Rmap getMemberAt(int indexI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
indexI - the index of the member to retrieve.
Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
ArrayIndexOutOfBoundsException - thrown if there are no members or the index is not in the
range 0 to # of members - 1.
InterruptedException - thrown if the operation is interrupted.addMember(com.rbnb.api.Rmap),
getNmembers()
public final com.rbnb.api.RmapVector getMembers()
throws SerializeException,
EOFException,
IOException,
InterruptedException
Rmap.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addMember(com.rbnb.api.Rmap)public final String getName()
Rmap.
setName(String)
public final int getNchildren()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addChild(com.rbnb.api.Rmap),
getChildAt(int),
removeChild(com.rbnb.api.Rmap)
public final int getNmembers()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addMember(com.rbnb.api.Rmap),
getMemberAt(int),
removeMember(com.rbnb.api.Rmap)public final Rmap getParent()
Rmap of this Rmap.
Rmap.public final TimeRange getTrange()
TimeRange of this Rmap.
TimeRange.setTrange(TimeRange)
public boolean isImplemented(byte typeI)
throws SerializeException,
IOException,
InterruptedException
Rmaps implement everything in Rmap.
typeI - the type of operation.
SerializeException - thrown if there is a problem with the serialization. For
example, a missing bracket.
IOException - thrown if there is an error reading the input stream.
InterruptedException - thrown if the read is interrupted.
public final void markLeaf()
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
Rmap hierarchy by putting in
single byte DataBlocks.
Leaf nodes with DataBlocks are not modified.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
ArrayIndexOutOfBoundsException - thrown if there are no children or the index is not in the
range 0 to # of children - 1.
InterruptedException - thrown if the operation is interrupted.
public final Rmap mergeWith(Rmap rmapI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy with this one.
The merge is done by working through first the group members of each of
the two Rmaps and then the children. Matching members and
children are merged using a recursive call. New members and children in
the input Rmap are added to this Rmap.
If the input Rmap doesn't match this one, then the method
tries three things:
Rmap is nameless and timeless and the input
Rmap is not, but is a root Rmap, the
method compares the input Rmap to the children of this
Rmap and merges with any match or inserts the input
Rmap hierarchy as a new child, orRmaps are the roots of their hierarchies and
this Rmap is not nameless and timeless, the method
creates a new nameless and timeless root Rmap and adds
both of the original Rmaps as children,
The status input Rmap after this method is called depends
on what exactly is done, but in general, it shouldn't be used
independently.
rmapI - the Rmap to merge.
Rmap (may be this Rmap).
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
IllegalArgumentException - thrown if the input Rmap is already a child of
another Rmap or if the input is null.
InterruptedException - thrown if the operation is interrupted.
public final Rmap moveToBottom()
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
Rmap hierarchy.
This method is intended for use in conjunction with
createFromName. At each point in the hierarchy, it gets the
first child and moves down until it reaches an Rmap with no
children.
Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.createFromName(String),
moveToTop()public final Rmap moveToTop()
Rmap hierarchy.
Rmap.moveToBottom()public void nullify()
Rmap.
This method ensures that all pointers in this DataBlock
are cleared, reducing the effort needed by the garbage collector to
clean it up.
public void removeChild(Rmap childI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap from this Rmap.
childI - the child to remove.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addChild(com.rbnb.api.Rmap),
getParent(),
removeChildAt(int)
public void removeChildAt(int indexI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap at a particular index from this
Rmap.
indexI - the index of child to remove.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addChild(com.rbnb.api.Rmap),
getParent(),
removeChild(com.rbnb.api.Rmap)
public void removeMember(Rmap memberI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap from this Rmap.
memberI - the member to remove.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addMember(com.rbnb.api.Rmap),
getParent(),
removeMemberAt(int)
public void removeMemberAt(int indexI)
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap at a particular index from this
Rmap.
indexI - the index of member to remove.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.addMember(com.rbnb.api.Rmap),
getParent(),
removeMember(com.rbnb.api.Rmap)public final void setDblock(DataBlock dblockI)
DataBlock of this Rmap.
dblockI - the DataBlock.getDblock()public final void setFrange(TimeRange frangeI)
TimeRange of this Rmap.
frangeI - the frame TimeRange.getFrange()
public final void setName(String nameI)
throws AddressException,
SerializeException,
EOFException,
InterruptedIOException,
IOException,
InterruptedException
Rmap.
If the Rmap has a parent Rmap, then changing
the name of this Rmap may effect the sort order of its
parent's list. To ensure that this change is made properly, this
method temporarily removes this Rmap from its parent,
updates the name, and adds this Rmap back in to its
parent.
nameI - the name of the Rmap.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
InterruptedIOException - thrown if this operation is interrupted during I/O.
IOException - thrown if there is an error during I/O.
InterruptedException - thrown if the operation is interrupted.getName()public final void setTrange(TimeRange trangeI)
TimeRange of this Rmap.
trangeI - the TimeRange.getTrange()
public Object sortField(Object sidI)
throws com.rbnb.utility.SortException
Rmap.
The sort identifier for Rmaps is the Rmap
itself.
sortField in interface com.rbnb.utility.SortInterfacesidI - the sort type identifier -- must be null.
com.rbnb.utility.SortException - thrown if the input sort identifier is non-null.compareTo(Object,Object)
public Rmap toNameHierarchy()
throws AddressException,
SerializeException,
EOFException,
IOException,
InterruptedException
Rmap hierarchy that can be used to make requests
for the names.
Rmap hierarchy.
AddressException - thrown if there is a problem with an address.
SerializeException - thrown if there is a problem with the serialization.
EOFException - thrown if the end of the input stream is reached.
IOException - thrown if there is an error during I/O.
ArrayIndexOutOfBoundsException - thrown if there are no children or the index is not in the
range 0 to # of children - 1.
InterruptedException - thrown if the operation is interrupted.public String toString()
Rmap.
toString in class Object
public String toString(boolean memberI,
String indentI)
throws InterruptedException
Rmap.
This method is the workhorse that actually does the work under the
the standard toString() method. It builds a representation
that shows the entire structure of the Rmap, including the
group members and the children.
The input parameters specify whether this Rmap is a group
member of its parent (or a child) and the identation string to prepend
to put this Rmap under its parent.
memberI - is this Rmap a group member?indentI - the indentation string to use.
InterruptedException - thrown if the operation is interrupted.
public static final String xmlRegistration(long lengthI,
String mimeTypeI)
lengthI - the length.mimeTypeI - the MIME type of the data.
public static final String xmlRegistration(long lengthI,
String mimeTypeI,
String xmlI)
lengthI - the length.mimeTypeI - the MIME type of the data.xmlI - the additional XML to add, if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||