gov.nasa.pds.tools.label
Class ObjectStatement

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

public class ObjectStatement
extends Statement

Version:
$Revision: 3380 $
Author:
pramirez

Field Summary
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
context, filename, identifier, lineNumber
 
Constructor Summary
ObjectStatement(int lineNumber, java.lang.String identifier)
          Constructs a new object statement with no attributes or nested objects
ObjectStatement(int lineNumber, java.lang.String identifier, java.util.Map statements)
          Constructs an ObjectStatement
ObjectStatement(java.lang.String identifier)
          Constructs an ObjectStatement with only an identifier
 
Method Summary
 void addStatement(Statement statement)
          Associates a statement with this object
 void attachComment(CommentStatement comment)
           
 AttributeStatement getAttribute(java.lang.String identifier)
          Retrieves the named attribute
 java.util.List getAttributes()
          Retrieves the list of attributes associated with the ObjectStatement
 java.util.List getGroups()
          Retrieves groups associated with this object
 java.util.List getGroups(java.lang.String identifier)
          Retrieves the named group
 java.util.List getObjects()
          Retrieves the list of objects associated with this object
 java.util.List getObjects(java.lang.String identifier)
          Retrieves the named object
 java.util.List getPointers()
          Retrieves pointers associated with this object
 java.util.List getStatements()
           
 boolean hasAttribute(java.lang.String identifier)
           
 boolean hasGroup(java.lang.String identifier)
           
 boolean hasObject(java.lang.String identifier)
           
 boolean hasPointer(java.lang.String identifier)
          Looks to see if this object contains a pointer with the given 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

ObjectStatement

public ObjectStatement(int lineNumber,
                       java.lang.String identifier)
Constructs a new object statement with no attributes or nested objects

Parameters:
lineNumber - Line number of the statement.
identifier - Identifier for the statement.

ObjectStatement

public ObjectStatement(java.lang.String identifier)
Constructs an ObjectStatement with only an identifier

Parameters:
identifier - Identifier of the statement

ObjectStatement

public ObjectStatement(int lineNumber,
                       java.lang.String identifier,
                       java.util.Map statements)
Constructs an ObjectStatement

Parameters:
lineNumber - Line number of statement
identifier - Identifier of statement
statements - Map of Statement associated with this object
Method Detail

getAttributes

public java.util.List getAttributes()
Retrieves the list of attributes associated with the ObjectStatement

Returns:
The list of AttributeStatement

getPointers

public java.util.List getPointers()
Retrieves pointers associated with this object

Returns:
list of PointerStatement

getGroups

public java.util.List getGroups()
Retrieves groups associated with this object

Returns:
list of GroupStatement

hasPointer

public boolean hasPointer(java.lang.String identifier)
Looks to see if this object contains a pointer with the given identifier

Parameters:
identifier - of pointer statement to look for
Returns:
flag indicating whether or not the pointer was found

getAttribute

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

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

getObjects

public java.util.List getObjects()
Retrieves the list of objects associated with this object

Returns:
The list of ObjectStatement

getObjects

public java.util.List getObjects(java.lang.String identifier)
Retrieves the named object

Parameters:
identifier -
Returns:
The List of named objects

getGroups

public java.util.List getGroups(java.lang.String identifier)
Retrieves the named group

Parameters:
identifier - of the group
Returns:
the List of named groups

addStatement

public void addStatement(Statement statement)
Associates a statement with this object

Parameters:
statement - to be added to object

hasAttribute

public boolean hasAttribute(java.lang.String identifier)

hasObject

public boolean hasObject(java.lang.String identifier)

hasGroup

public boolean hasGroup(java.lang.String identifier)

attachComment

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

getStatements

public java.util.List getStatements()


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