jpl.mipl.mars.rmc.util
Class Alias

java.lang.Object
  extended by jpl.mipl.mars.rmc.util.RmcElement
      extended by jpl.mipl.mars.rmc.util.Alias
All Implemented Interfaces:
Comparable

public class Alias
extends RmcElement

Purpose: Implementation of Alias tag from RMC file.


   Copyright 2003, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2003.
   
============================================================================ Modification History : ---------------------- Date Who What ---------------------------------------------------------------------------- 06/06/2003 Nick Initial Release ============================================================================

Version:
1.0
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Constructor Summary
Alias()
           
Alias(Element node)
          Constructor.
Alias(List oldRmc, List newRmc)
          Constructor
Alias(String xml)
          Constructor
Alias(String oldRmcStr, String newRmcStr)
          Constructor
 
Method Summary
 int compareTo(Object obj)
          Compares this object with the specified object for order.
protected  void formatNewRmc()
           
protected  void formatOldRmc()
           
protected  void formatRmcs()
           
 List getNewRmc()
          Returns the new RMC of the Alias object
 List getOldRmc()
          Returns the old RMC of the Alias object
 int newRmcValueAt(int index)
          Returns the new RMC value at index
 int oldRmcValueAt(int index)
          Returns the old RMC value at index
 void setNewRmc(List newRmc)
          Sets the new RMC of the Alias object
 void setOldRmc(List oldRmc)
          Sets the old RMC of the Alias object
 Element toDOM()
          Returns a DOM tree structure of a Alias element including nested elements.
 String toXML()
          Returns an XML-formatted string of this object.
 
Methods inherited from class jpl.mipl.mars.rmc.util.RmcElement
createEmptyDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Alias

public Alias()

Alias

public Alias(String xml)
Constructor

Parameters:
xml - String representation of the XML element Solution

Alias

public Alias(List oldRmc,
             List newRmc)
Constructor

Parameters:
oldRmc - List of the old RMC
newRmc - List of the new RMC

Alias

public Alias(String oldRmcStr,
             String newRmcStr)
Constructor

Parameters:
oldRmcStr - String representation of a list of the old RMC
newRmcStr - String representation of a list of the new RMC

Alias

public Alias(Element node)
Constructor.

Parameters:
node - DOM Element of type Alias
Method Detail

setOldRmc

public void setOldRmc(List oldRmc)
Sets the old RMC of the Alias object

Parameters:
oldRmc - List of the old RMC

getOldRmc

public List getOldRmc()
Returns the old RMC of the Alias object

Returns:
List of the old RMC

setNewRmc

public void setNewRmc(List newRmc)
Sets the new RMC of the Alias object

Parameters:
newRmc - List of the old RMC

getNewRmc

public List getNewRmc()
Returns the new RMC of the Alias object

Returns:
List of the new RMC

oldRmcValueAt

public int oldRmcValueAt(int index)
Returns the old RMC value at index

Parameters:
index - Position of the RMC value
Returns:
Value of the old RMC at index position

newRmcValueAt

public int newRmcValueAt(int index)
Returns the new RMC value at index

Parameters:
index - Position of the RMC value
Returns:
Value of the new RMC at index position

toXML

public String toXML()
Returns an XML-formatted string of this object.

Specified by:
toXML in class RmcElement
Returns:
XML-formatted string of Alias data

toDOM

public Element toDOM()
Returns a DOM tree structure of a Alias element including nested elements.

Specified by:
toDOM in class RmcElement
Returns:
Element node representation of this object.

formatRmcs

protected void formatRmcs()

formatOldRmc

protected void formatOldRmc()

formatNewRmc

protected void formatNewRmc()

compareTo

public int compareTo(Object obj)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class RmcElement
Parameters:
obj - the Object to be compared.
Returns:
Default value of 0