gov.nasa.pds.tools.label
Class GroupStatement

java.lang.Object
  extended by gov.nasa.pds.tools.label.Statement
      extended by gov.nasa.pds.tools.label.GroupStatement
All Implemented Interfaces:
java.lang.Comparable

public class GroupStatement
extends Statement

Version:
$Revision: 3355 $
Author:
pramirez

Field Summary
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
context, filename, identifier, lineNumber
 
Constructor Summary
GroupStatement(int lineNumber, java.lang.String identifier)
          Constructs an empty group statement
GroupStatement(int lineNumber, java.lang.String identifier, java.util.Map statements)
          Constructs a group statement that contains the given statements
 
Method Summary
 void addStatement(Statement statement)
           
 void attachComment(CommentStatement comment)
           
 AttributeStatement getAttribute(java.lang.String identifier)
          Retrieves the named attribute.
 java.util.List getAttributes()
          Retrieves the attributes of this group.
 java.util.List getStatements()
           
 boolean hasAttribute(java.lang.String identifier)
           
 
Methods inherited from class gov.nasa.pds.tools.label.Statement
compareTo, getContext, getFilename, getIdentifier, getLineNumber, setContext, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupStatement

public GroupStatement(int lineNumber,
                      java.lang.String identifier)
Constructs an empty group statement

Parameters:
lineNumber - at which this statement occurs
identifier - of the statement

GroupStatement

public GroupStatement(int lineNumber,
                      java.lang.String identifier,
                      java.util.Map statements)
Constructs a group statement that contains the given statements

Parameters:
lineNumber - at which this statement occurs
identifier - of the statement
statements - contained within this group statement
Method Detail

getAttribute

public AttributeStatement getAttribute(java.lang.String identifier)
Retrieves the named attribute.

Parameters:
identifier -
Returns:
The named AttributeStatement or null if not found.

getAttributes

public java.util.List getAttributes()
Retrieves the attributes of this group.

Returns:
The list of AttributeStatment.

addStatement

public void addStatement(Statement statement)

hasAttribute

public boolean hasAttribute(java.lang.String identifier)

attachComment

public void attachComment(CommentStatement comment)
Specified by:
attachComment in class Statement

getStatements

public java.util.List getStatements()


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