Package gov.nasa.pds.tools.label.parser
Class DefaultLabelParser
- java.lang.Object
-
- gov.nasa.pds.tools.label.parser.DefaultLabelParser
-
- All Implemented Interfaces:
LabelParser
public class DefaultLabelParser extends Object implements LabelParser
Default implementation- Version:
- $Revision$
- Author:
- pramirez, jagander
-
-
Constructor Summary
Constructors Constructor Description DefaultLabelParser(boolean loadIncludes, boolean captureProblems, boolean allowExternalProblems, PointerResolver resolver)
DefaultLabelParser(boolean loadIncludes, boolean captureProblems, PointerResolver resolver)
DefaultLabelParser(PointerResolver resolver)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 fileLabel
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)
-
-
-
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 interfaceLabelParser
- 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 interfaceLabelParser
- Throws:
LabelParserException
IOException
-
getODLVersion
public String getODLVersion()
-
parsePartial
public Label parsePartial(File file, Label parent) throws IOException, LabelParserException
- Specified by:
parsePartial
in interfaceLabelParser
- 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 interfaceLabelParser
- 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
-
-