gov.nasa.pds.ltdt.label.statement
Class PrettyObjectStatement

java.lang.Object
  extended by gov.nasa.pds.tools.label.Statement
      extended by gov.nasa.pds.tools.label.ObjectStatement
          extended by gov.nasa.pds.ltdt.label.statement.PrettyObjectStatement
All Implemented Interfaces:
PrettyStatement, java.lang.Comparable

public class PrettyObjectStatement
extends gov.nasa.pds.tools.label.ObjectStatement
implements PrettyStatement

Class used to provide a string representation of an OBJECT in a PDS label.

Author:
mcayanan

Field Summary
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
context, filename, identifier, lineNumber
 
Constructor Summary
PrettyObjectStatement(java.lang.String identifier)
          Constructs the object.
 
Method Summary
 java.lang.String getIdentifier()
          Returns the identifier.
 java.lang.String toString()
          Return a string representation of the OBJECT.
 java.lang.String toString(short indentLength)
          Return a string representation of the OBJECT.
 java.lang.String toString(short indentLength, int equalsPosition)
          Return a string representation of the OBJECT.
 
Methods inherited from class gov.nasa.pds.tools.label.ObjectStatement
addStatement, attachComment, getAttribute, getAttributes, getObjects, getObjects, getPointers, getStatements, hasAttribute, hasObject, hasPointer
 
Methods inherited from class gov.nasa.pds.tools.label.Statement
compareTo, getContext, getFilename, getLineNumber, setContext, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrettyObjectStatement

public PrettyObjectStatement(java.lang.String identifier)
Constructs the object.

Parameters:
identifier - The name that identifies this object.
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier.

Overrides:
getIdentifier in class gov.nasa.pds.tools.label.Statement

toString

public java.lang.String toString()
Return a string representation of the OBJECT. Nested statements will be indented appropriately.

Specified by:
toString in interface PrettyStatement
Overrides:
toString in class java.lang.Object
Returns:
A string representation of the OBJECT.

toString

public java.lang.String toString(short indentLength)
Return a string representation of the OBJECT. Nested statements will be indented appropriately.

Specified by:
toString in interface PrettyStatement
Parameters:
indentLength - The number of spaces to indent the OBJECT.
Returns:
A string representation of the OBJECT.

toString

public java.lang.String toString(short indentLength,
                                 int equalsPosition)
Return a string representation of the OBJECT. Nested statements will be indented appropriately.

Specified by:
toString in interface PrettyStatement
Parameters:
indentLength - The number of spaces to indent the OBJECT.
equalsPosition - Where the equals sign will be located.
Returns:
A string representation of the OBJECT.


Copyright © 2005-2008 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.