gov.nasa.pds.ltdt.parser
Class ParserLite

java.lang.Object
  extended by gov.nasa.pds.ltdt.parser.ParserLite

public class ParserLite
extends java.lang.Object

Class that parses a PDS label. This class does not do any semantic validation of values.


Constructor Summary
ParserLite()
           
 
Method Summary
 java.util.List getNextLine()
          Get the next line in a PDS label.
 java.util.List parse(java.io.InputStream label)
          Parse the PDS label
 PrettyAttributeStatement parseStatement(java.lang.String string)
          Parse a statement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserLite

public ParserLite()
Method Detail

parse

public java.util.List parse(java.io.InputStream label)
                     throws java.io.IOException
Parse the PDS label

Parameters:
label - A stream representation of a PDS label.
Returns:
A list that can contain PrettyStatement objects, and string representations of a blank line, SFDU, or the END statement in a label.
Throws:
java.io.IOException

getNextLine

public java.util.List getNextLine()
                           throws java.io.IOException
Get the next line in a PDS label. Any comments found within a line gets parsed and stored first before attempting to find the next valid ODL statement (KEYWORD = VALUE).

Returns:
A list of statements.
Throws:
java.io.IOException

parseStatement

public PrettyAttributeStatement parseStatement(java.lang.String string)
Parse a statement

Parameters:
string - A string representation of a valid ODL statement.
Returns:
an AttributeStatement object or null if no statement was found.


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