gov.nasa.pds.tools.label
Class Statement

java.lang.Object
  extended by gov.nasa.pds.tools.label.Statement
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>
Direct Known Subclasses:
AttributeStatement, CommentStatement, GroupStatement, ObjectStatement, PointerStatement

public abstract class Statement
extends java.lang.Object
implements java.lang.Comparable<java.lang.Object>

This class represents a statement in a PDS label.

Version:
$Revision: 4967 $
Author:
pramirez, jagander

Field Summary
protected  CommentStatement comment
           
protected  DictIdentifier identifier
           
protected  Label label
           
protected  int lineNumber
           
protected  java.io.File sourceFile
           
protected  java.net.URI sourceURI
           
 
Constructor Summary
Statement(Label sourceLabel, int lineNumber, DictIdentifier identifier)
           
 
Method Summary
 void attachComment(org.antlr.runtime.Token commentToken)
           
 int compareTo(java.lang.Object o)
           
 CommentStatement getComment()
          Returns the comment associated with statement
 DictIdentifier getIdentifier()
          Retrieves the identifier for the statement
 int getLineNumber()
          Retrieves the line for this statement
 java.io.File getSourceFile()
           
 java.net.URI getSourceURI()
           
 java.lang.String toString()
           
protected  void validateCommentType(DictIdentifier id)
           
protected  void validateElementType(DictIdentifier id)
           
protected  void validateGroupType(DictIdentifier id)
           
protected  void validateObjectType(DictIdentifier id)
           
protected  void validatePointerType(DictIdentifier id)
           
protected  void validateType(DictIdentifier id, java.lang.Class<? extends Definition> clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lineNumber

protected final int lineNumber

identifier

protected final DictIdentifier identifier

sourceURI

protected final java.net.URI sourceURI

sourceFile

protected final java.io.File sourceFile

label

protected final Label label

comment

protected CommentStatement comment
Constructor Detail

Statement

public Statement(Label sourceLabel,
                 int lineNumber,
                 DictIdentifier identifier)
Method Detail

getLineNumber

public int getLineNumber()
Retrieves the line for this statement

Returns:
The line on which the statement starts

getIdentifier

public DictIdentifier getIdentifier()
Retrieves the identifier for the statement

Returns:
unique identifier

getSourceURI

public java.net.URI getSourceURI()

getSourceFile

public java.io.File getSourceFile()

attachComment

public void attachComment(org.antlr.runtime.Token commentToken)

getComment

public CommentStatement getComment()
Returns the comment associated with statement

Returns:
comment

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>

validateType

protected void validateType(DictIdentifier id,
                            java.lang.Class<? extends Definition> clazz)

validateObjectType

protected void validateObjectType(DictIdentifier id)

validateGroupType

protected void validateGroupType(DictIdentifier id)

validateElementType

protected void validateElementType(DictIdentifier id)

validateCommentType

protected void validateCommentType(DictIdentifier id)

validatePointerType

protected void validatePointerType(DictIdentifier id)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2009 Planetary Data System. All Rights Reserved.