gov.nasa.pds.tools.label
Class Statement
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
Statement
public Statement(Label sourceLabel,
int lineNumber,
DictIdentifier identifier)
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.