gov.nasa.pds.tools.label.parser
Interface LabelParser

All Known Implementing Classes:
DefaultLabelParser

public interface LabelParser

Version:
$Revision: 2647 $
Author:
pramirez

Method Summary
 void addIncludePath(java.net.URL includePath)
          Adds an URL where references will be searched for when found in a label.
 void addValidator(LabelValidator validator)
          Adds a LabelValidator that will perform some extravalidation.
 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.
 java.util.Properties getProperties()
          Retrieves parser properties.
 Label parse(java.net.URL file)
          Parses the given file
 Label parse(java.net.URL file, Dictionary dictionary)
          Parses the given file and validates against the dictionary.
 Label parse(java.net.URL file, Dictionary dictionary, boolean dataObjectValidation)
          Parses the given file, validates against dictionary, and may perform dataObjectValidation
 Label parsePartial(java.lang.String context, java.net.URL file)
          Parses the given partial label.
 Label parsePartial(java.net.URL file)
          Parses the given partial label.
 Label parsePartial(java.net.URL file, Dictionary dictionary)
          Parses the given partial label and validates against the dictionary.
 Label parsePartial(java.net.URL file, Dictionary dictionary, boolean dataObjectValidation)
          Parses the given partial label, validates against dictionary, and may perform dataObjectValidation
 void setProperties(java.util.Properties properties)
          Passes properties to the parser.
 

Method Detail

parse

Label parse(java.net.URL file)
            throws ParseException,
                   java.io.IOException
Parses the given file

Parameters:
file - File to
Returns:
Label representation of the file
Throws:
ParseException - - If any syntatic errors are encountered. All errors will be written to the Logger.
java.io.IOException

parse

Label parse(java.net.URL file,
            Dictionary dictionary)
            throws ParseException,
                   java.io.IOException
Parses the given file and validates against the dictionary.

Parameters:
file -
dictionary -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

parse

Label parse(java.net.URL file,
            Dictionary dictionary,
            boolean dataObjectValidation)
            throws ParseException,
                   java.io.IOException
Parses the given file, validates against dictionary, and may perform dataObjectValidation

Parameters:
file -
dictionary -
dataObjectValidation -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

parsePartial

Label parsePartial(java.net.URL file)
                   throws ParseException,
                          java.io.IOException
Parses the given partial label.

Parameters:
file -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

parsePartial

Label parsePartial(java.lang.String context,
                   java.net.URL file)
                   throws ParseException,
                          java.io.IOException
Parses the given partial label.

Parameters:
context -
file -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

parsePartial

Label parsePartial(java.net.URL file,
                   Dictionary dictionary)
                   throws ParseException,
                          java.io.IOException
Parses the given partial label and validates against the dictionary.

Parameters:
file -
dictionary -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

parsePartial

Label parsePartial(java.net.URL file,
                   Dictionary dictionary,
                   boolean dataObjectValidation)
                   throws ParseException,
                          java.io.IOException
Parses the given partial label, validates against dictionary, and may perform dataObjectValidation

Parameters:
file -
dictionary -
dataObjectValidation -
Returns:
Label representation of the file
Throws:
ParseException
java.io.IOException

setProperties

void setProperties(java.util.Properties properties)
Passes properties to the parser.

Parameters:
properties - Set of properties.

getProperties

java.util.Properties getProperties()
Retrieves parser properties.

Returns:
parser properties

getPDSVersion

java.lang.String getPDSVersion()
Returns the version of the PDS specification that this parser is compliant with.

Returns:
The PDS version string

getODLVersion

java.lang.String getODLVersion()
Returns the version of ODL that this parser is compliant with.

Returns:
The ODL version string

addIncludePath

void addIncludePath(java.net.URL includePath)
Adds an URL where references will be searched for when found in a label.

Parameters:
includePath - points to a directory that will be searched.

addValidator

void addValidator(LabelValidator validator)
Adds a LabelValidator that will perform some extravalidation.

Parameters:
validator - which will be run as a step in the validation pipeline


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