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 Object
implements LabelParser

Default implementation

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

Constructor Summary
DefaultLabelParser(boolean loadIncludes, boolean captureProblems, boolean allowExternalProblems, PointerResolver resolver)
           
DefaultLabelParser(boolean loadIncludes, boolean captureProblems, PointerResolver resolver)
           
DefaultLabelParser(PointerResolver resolver)
           
 
Method Summary
 String getODLVersion()
           
static void main(String[] args)
           
 Label parseLabel(File file)
           
 Label parseLabel(File file, boolean forceParse)
           
 Label parseLabel(URL url)
           
 Label parseLabel(URL url, boolean forceParse)
          Parses the given file
 Label parsePartial(BufferedInputStream inputStream, Label label, Label parent)
           
 Label parsePartial(File file, Label parent)
           
 Label parsePartial(File file, Label parent, boolean captureProbs)
           
 Label parsePartial(File file, Label parent, boolean captureProbs, boolean allowExternalProbs)
           
 Label parsePartial(URL url, Label parent)
          Parses the given partial label.
 Label parsePartial(URL url, Label parent, boolean captureProbs)
           
 Label parsePartial(URL url, Label parent, boolean captureProbs, boolean allowExternalProbs)
           
 
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)

DefaultLabelParser

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

parseLabel

public Label parseLabel(URL url)
                 throws LabelParserException,
                        IOException
Throws:
LabelParserException
IOException

parseLabel

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

parseLabel

public Label parseLabel(URL url,
                        boolean forceParse)
                 throws LabelParserException,
                        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.
IOException

parseLabel

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

getODLVersion

public String getODLVersion()

parsePartial

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

parsePartial

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

parsePartial

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

parsePartial

public Label parsePartial(URL url,
                          Label parent)
                   throws 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:
IOException
LabelParserException

parsePartial

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

parsePartial

public Label parsePartial(URL url,
                          Label parent,
                          boolean captureProbs,
                          boolean allowExternalProbs)
                   throws IOException,
                          LabelParserException
Throws:
IOException
LabelParserException

parsePartial

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

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


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