gov.nasa.pds.tools.label
Class Statement

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

public abstract class Statement
extends Object
implements Comparable<Object>

This class represents a statement in a PDS label.

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

Field Summary
protected  CommentStatement comment
           
protected  DictIdentifier identifier
           
protected  Label label
           
protected  int lineNumber
           
protected  File sourceFile
           
protected  URI sourceURI
           
 
Constructor Summary
Statement(Label sourceLabel, int lineNumber, DictIdentifier identifier)
           
 
Method Summary
 void attachComment(org.antlr.runtime.Token commentToken)
           
 int compareTo(Object o)
           
 CommentStatement getComment()
          Returns the comment associated with statement
 DictIdentifier getIdentifier()
          Retrieves the identifier for the statement
 Label getLabel()
          Retrieves the label associated with this statement
 int getLineNumber()
          Retrieves the line for this statement
 File getSourceFile()
           
 String getSourceString()
           
 URI getSourceURI()
           
 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, 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 URI sourceURI

sourceFile

protected final File sourceFile

label

protected final Label label

comment

protected CommentStatement comment
Constructor Detail

Statement

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

getLabel

public Label getLabel()
Retrieves the label associated with this statement

Returns:
label

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 URI getSourceURI()

getSourceFile

public File getSourceFile()

getSourceString

public String getSourceString()

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(Object o)
Specified by:
compareTo in interface Comparable<Object>

validateType

protected void validateType(DictIdentifier id,
                            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 String toString()
Overrides:
toString in class Object


Copyright © 2005–2013 Planetary Data System. All rights reserved.