public abstract class Parser<T extends BeliefBase>
extends java.lang.Object
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isNumeric(java.lang.String str)
Checks whether the given string is a number.
|
abstract T |
parseBeliefBase(java.io.Reader reader)
Parses the given reader into a belief base of the given type.
|
T |
parseBeliefBase(java.lang.String text)
Parses the given text into a belief base of the given type.
|
T |
parseBeliefBaseFromFile(java.lang.String filename)
Parses the file of the given filename into a belief base of the given type.
|
abstract Formula |
parseFormula(java.io.Reader reader)
Parses the given reader into a formula of the given type.
|
Formula |
parseFormula(java.lang.String text)
Parses the given text into a formula of the given type.
|
Formula |
parseFormulaFromFile(java.lang.String filename)
Parses the file of the given filename into a formula of the given type.
|
public T parseBeliefBaseFromFile(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException, ParserException
filename
- the name of a filejava.io.FileNotFoundException
- if the file is not foundjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public T parseBeliefBase(java.lang.String text) throws java.io.IOException, ParserException
text
- a stringjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public abstract T parseBeliefBase(java.io.Reader reader) throws java.io.IOException, ParserException
reader
- a readerjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public Formula parseFormulaFromFile(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException, ParserException
filename
- the name of a filejava.io.FileNotFoundException
- if the file is not foundjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public Formula parseFormula(java.lang.String text) throws java.io.IOException, ParserException
text
- a stringjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public abstract Formula parseFormula(java.io.Reader reader) throws java.io.IOException, ParserException
reader
- a readerjava.lang.Exception
- some parsing exceptions may be added here.java.io.IOException
ParserException
public static boolean isNumeric(java.lang.String str)
str
- some string