gov.nasa.pds.tools.label
Class AttributeStatement

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

public class AttributeStatement
extends Statement

This class represents an attribute assignment in a PDS label file.

Version:
$Revision: 3302 $
Author:
pramirez

Field Summary
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
context, filename, identifier, lineNumber
 
Constructor Summary
protected AttributeStatement(int lineNumber, java.lang.String identifier)
          Constructs a new attribute statement with no value
  AttributeStatement(int lineNumber, java.lang.String identifier, Value value)
           
  AttributeStatement(java.lang.String identifier)
          Constructs a new attribute statement with no line number or value
  AttributeStatement(java.lang.String identifier, Value value)
          Constructs a new attribute statement with no line number
 
Method Summary
 void attachComment(CommentStatement comment)
           
 java.lang.String getElementIdentifier()
          Gets the unqualified identifier for the att
 java.lang.String getNamespace()
          Gets the namespace for this attribute
 Value getValue()
          Retrieves the value of the attribute
 boolean hasNamespace()
           
 void setValue(Value value)
          Sets the value for this attribute
 
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

AttributeStatement

protected AttributeStatement(int lineNumber,
                             java.lang.String identifier)
Constructs a new attribute statement with no value

Parameters:
lineNumber - Line on which the statement starts
identifier - Uniquely identifies the statement

AttributeStatement

public AttributeStatement(java.lang.String identifier)
Constructs a new attribute statement with no line number or value

Parameters:
identifier - Uniquely identifies the statement

AttributeStatement

public AttributeStatement(java.lang.String identifier,
                          Value value)
Constructs a new attribute statement with no line number

Parameters:
identifier - Uniquely identifies the statement
value - Value of the attribute

AttributeStatement

public AttributeStatement(int lineNumber,
                          java.lang.String identifier,
                          Value value)
Parameters:
lineNumber - Line on which the statement starts
identifier - Uniquely identifies the statement
value - Value of the attribute
Method Detail

getNamespace

public java.lang.String getNamespace()
Gets the namespace for this attribute

Returns:
The namespace or "" if none is found.

getElementIdentifier

public java.lang.String getElementIdentifier()
Gets the unqualified identifier for the att

Returns:
Returns the element identifier.

getValue

public Value getValue()
Retrieves the value of the attribute

Returns:
Value of the attribute

setValue

public void setValue(Value value)
Sets the value for this attribute

Parameters:
value - Value of the attribute

attachComment

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

hasNamespace

public boolean hasNamespace()


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