|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.tools.label.parser.DefaultLabelParser
public class DefaultLabelParser
Default implementation
Field Summary |
---|
Fields inherited from interface gov.nasa.pds.tools.label.validate.Status |
---|
FAIL, PASS, UNKNOWN |
Constructor Summary | |
---|---|
DefaultLabelParser()
|
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. |
static void |
main(java.lang.String[] args)
|
Label |
parse(java.net.URL url)
Parses the given file |
Label |
parse(java.net.URL url,
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 url)
Parses the given partial label. |
Label |
parsePartial(java.net.URL url)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLabelParser()
Method Detail |
---|
public Label parse(java.net.URL url) throws ParseException, java.io.IOException
LabelParser
parse
in interface LabelParser
url
- File to
Label
representation of the file
ParseException
- - If any syntatic errors are encountered.
All errors will be written to the Logger.
java.io.IOException
public Label parse(java.net.URL url, Dictionary dictionary) throws ParseException, java.io.IOException
LabelParser
parse
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
public Label parse(java.net.URL file, Dictionary dictionary, boolean dataObjectValidation) throws ParseException, java.io.IOException
LabelParser
parse
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
public void setProperties(java.util.Properties properties)
LabelParser
setProperties
in interface LabelParser
properties
- Set of properties.public java.util.Properties getProperties()
LabelParser
getProperties
in interface LabelParser
public java.lang.String getPDSVersion()
LabelParser
getPDSVersion
in interface LabelParser
public java.lang.String getODLVersion()
LabelParser
getODLVersion
in interface LabelParser
public Label parsePartial(java.net.URL url) throws ParseException, java.io.IOException
LabelParser
parsePartial
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
public Label parsePartial(java.lang.String context, java.net.URL url) throws ParseException, java.io.IOException
LabelParser
parsePartial
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
LabelParser.parsePartial(String,java.net.URL)
public Label parsePartial(java.net.URL file, Dictionary dictionary) throws ParseException, java.io.IOException
LabelParser
parsePartial
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
public Label parsePartial(java.net.URL file, Dictionary dictionary, boolean dataObjectValidation) throws ParseException, java.io.IOException
LabelParser
parsePartial
in interface LabelParser
Label
representation of the file
ParseException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
args
-
java.lang.Exception
public void addIncludePath(java.net.URL includePath)
LabelParser
addIncludePath
in interface LabelParser
includePath
- points to a directory that will be searched.public void addValidator(LabelValidator validator)
LabelParser
LabelValidator
that will perform some extravalidation.
addValidator
in interface LabelParser
validator
- which will be run as a step in the validation pipeline
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |