public abstract class AbstractDungParser extends Parser<DungTheory>
Constructor and Description |
---|
AbstractDungParser() |
Modifier and Type | Method and Description |
---|---|
static AbstractDungParser |
getParser(FileFormat f)
Retrieves the parser for the given file format.
|
abstract DungTheory |
parse(java.io.Reader reader)
Parses the given file into an abstract argumentation framework
|
static Extension |
parseArgumentList(java.lang.String s)
Returns a collection view of the given set of arguments
|
DungTheory |
parseBeliefBase(java.io.Reader reader)
Parses the given reader into a belief base of the given type.
|
static boolean |
parseBoolean(java.lang.String s)
Parses the given string (either "YES" or "NO") to a boolean value.
|
static java.util.Collection<java.util.Collection<Argument>> |
parseExtensionList(java.lang.String s)
Returns a collection view of the given set of extensions (=sets of
arguments)
|
Formula |
parseFormula(java.io.Reader reader)
Parses the given reader into a formula of the given type.
|
static Labeling |
parseLabeling(java.lang.String s)
Returns a labeling parsed from the given string
|
static java.util.Collection<Labeling> |
parseLabelingList(java.lang.String s)
Returns a collection view of the given set of labelings
|
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile
public static AbstractDungParser getParser(FileFormat f)
f
- some file formatpublic DungTheory parseBeliefBase(java.io.Reader reader) throws java.io.IOException, ParserException
Parser
parseBeliefBase
in class Parser<DungTheory>
reader
- a readerjava.io.IOException
ParserException
public Formula parseFormula(java.io.Reader reader) throws java.io.IOException, ParserException
Parser
parseFormula
in class Parser<DungTheory>
reader
- a readerjava.io.IOException
ParserException
public static Extension parseArgumentList(java.lang.String s)
s
- some string in the format "[arg1,...,argn]".public static java.util.Collection<java.util.Collection<Argument>> parseExtensionList(java.lang.String s)
s
- some string in the format
"[[arg1,...,argn],...,[arg1,...,argn]]".public static java.util.Collection<Labeling> parseLabelingList(java.lang.String s)
s
- some string in the format
"[[IN1,...,INM],[OUT1,...,OUTN],[UNDEC1,...,UNDECM]]\n...[[IN1,...,INM],[OUT1,...,OUTN],[UNDEC1,...,UNDECM]]".public static boolean parseBoolean(java.lang.String s)
s
- some string (either "YES" or "NO")public static Labeling parseLabeling(java.lang.String s)
s
- some string in the format
[[IN1,...,INM],[OUT1,...,OUTN],[UNDEC1,...,UNDECM]]public abstract DungTheory parse(java.io.Reader reader) throws java.io.IOException
f
- some filejava.io.IOException
- for all errors concerning file reading.