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 StringgetODLVersion()static voidmain(String[] args)LabelparseLabel(File file)LabelparseLabel(File file, boolean forceParse)LabelparseLabel(URL url)LabelparseLabel(URL url, boolean forceParse)Parses the given fileLabelparsePartial(BufferedInputStream inputStream, Label label, Label parent)LabelparsePartial(File file, Label parent)LabelparsePartial(File file, Label parent, boolean captureProbs)LabelparsePartial(File file, Label parent, boolean captureProbs, boolean allowExternalProbs)LabelparsePartial(URL url, Label parent)Parses the given partial label.LabelparsePartial(URL url, Label parent, boolean captureProbs)LabelparsePartial(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:
LabelParserExceptionIOException
-
parseLabel
public Label parseLabel(File file) throws LabelParserException, IOException
- Throws:
LabelParserExceptionIOException
-
parseLabel
public Label parseLabel(URL url, boolean forceParse) throws LabelParserException, IOException
Description copied from interface:LabelParserParses the given file- Specified by:
parseLabelin interfaceLabelParser- Parameters:
url- File to- Returns:
Labelrepresentation 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:
parseLabelin interfaceLabelParser- Throws:
LabelParserExceptionIOException
-
getODLVersion
public String getODLVersion()
-
parsePartial
public Label parsePartial(File file, Label parent) throws IOException, LabelParserException
- Specified by:
parsePartialin interfaceLabelParser- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(File file, Label parent, boolean captureProbs) throws IOException, LabelParserException
- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(File file, Label parent, boolean captureProbs, boolean allowExternalProbs) throws IOException, LabelParserException
- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(URL url, Label parent) throws IOException, LabelParserException
Description copied from interface:LabelParserParses the given partial label.- Specified by:
parsePartialin interfaceLabelParser- Returns:
Labelrepresentation of the file- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(URL url, Label parent, boolean captureProbs) throws IOException, LabelParserException
- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(URL url, Label parent, boolean captureProbs, boolean allowExternalProbs) throws IOException, LabelParserException
- Throws:
IOExceptionLabelParserException
-
parsePartial
public Label parsePartial(BufferedInputStream inputStream, Label label, Label parent) throws IOException, LabelParserException
- Throws:
IOExceptionLabelParserException
-
-