gov.nasa.pds.tools.label.parser
Class DefaultLabelParser

java.lang.Object
  extended by gov.nasa.pds.tools.label.parser.DefaultLabelParser
All Implemented Interfaces:
LabelParser

public class DefaultLabelParser
extends java.lang.Object
implements LabelParser

Default implementation

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

Constructor Summary
DefaultLabelParser(boolean loadIncludes, boolean captureProblems, PointerResolver resolver)
           
DefaultLabelParser(PointerResolver resolver)
           
 
Method Summary
 java.lang.String getODLVersion()
          Returns the version of ODL that this parser is compliant with.
 java.lang.String getPDSVersion()
          Returns the version of the PDS specification that this parser is compliant with.
 Label parseLabel(java.io.File file)
           
 Label parseLabel(java.io.File file, boolean forceParse)
           
 Label parseLabel(java.net.URL url)
           
 Label parseLabel(java.net.URL url, boolean forceParse)
          Parses the given file
 Label parsePartial(java.io.BufferedInputStream inputStream, Label label, Label parent)
           
 Label parsePartial(java.io.File file, Label parent)
           
 Label parsePartial(java.io.File file, Label parent, boolean captureProbs)
           
 Label parsePartial(java.net.URL url, Label parent)
          Parses the given partial label.
 Label parsePartial(java.net.URL url, Label parent, boolean captureProbs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLabelParser

public DefaultLabelParser(PointerResolver resolver)

DefaultLabelParser

public DefaultLabelParser(boolean loadIncludes,
                          boolean captureProblems,
                          PointerResolver resolver)
Method Detail

parseLabel

public Label parseLabel(java.net.URL url)
                 throws LabelParserException,
                        java.io.IOException
Throws:
LabelParserException
java.io.IOException

parseLabel

public Label parseLabel(java.io.File file)
                 throws LabelParserException,
                        java.io.IOException
Throws:
LabelParserException
java.io.IOException

parseLabel

public Label parseLabel(java.net.URL url,
                        boolean forceParse)
                 throws LabelParserException,
                        java.io.IOException
Description copied from interface: LabelParser
Parses the given file

Specified by:
parseLabel in interface LabelParser
Parameters:
url - File to
Returns:
Label representation of the file
Throws:
LabelParserException - - If any syntactic errors are encountered. All errors will be written to the Logger.
java.io.IOException

parseLabel

public Label parseLabel(java.io.File file,
                        boolean forceParse)
                 throws LabelParserException,
                        java.io.IOException
Specified by:
parseLabel in interface LabelParser
Throws:
LabelParserException
java.io.IOException

getPDSVersion

public java.lang.String getPDSVersion()
Description copied from interface: LabelParser
Returns the version of the PDS specification that this parser is compliant with.

Specified by:
getPDSVersion in interface LabelParser
Returns:
The PDS version string

getODLVersion

public java.lang.String getODLVersion()
Description copied from interface: LabelParser
Returns the version of ODL that this parser is compliant with.

Specified by:
getODLVersion in interface LabelParser
Returns:
The ODL version string

parsePartial

public Label parsePartial(java.io.File file,
                          Label parent)
                   throws java.io.IOException,
                          LabelParserException
Specified by:
parsePartial in interface LabelParser
Throws:
java.io.IOException
LabelParserException

parsePartial

public Label parsePartial(java.io.File file,
                          Label parent,
                          boolean captureProbs)
                   throws java.io.IOException,
                          LabelParserException
Throws:
java.io.IOException
LabelParserException

parsePartial

public Label parsePartial(java.net.URL url,
                          Label parent)
                   throws java.io.IOException,
                          LabelParserException
Description copied from interface: LabelParser
Parses the given partial label.

Specified by:
parsePartial in interface LabelParser
Returns:
Label representation of the file
Throws:
java.io.IOException
LabelParserException

parsePartial

public Label parsePartial(java.net.URL url,
                          Label parent,
                          boolean captureProbs)
                   throws java.io.IOException,
                          LabelParserException
Throws:
java.io.IOException
LabelParserException

parsePartial

public Label parsePartial(java.io.BufferedInputStream inputStream,
                          Label label,
                          Label parent)
                   throws java.io.IOException,
                          LabelParserException
Throws:
java.io.IOException
LabelParserException


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