|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdrew.oo.util.RuleMLParser
public class RuleMLParser
A class for parsing RuleML. This is broken into two section. The RuleMLParser class which is the public interface that users access; and the RuleML88Parser class; which implements the parsing of the RuleML 0.88 + rests syntax that is currently supported.
Title: OO jDREW
Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.88
Copyright: Copyright (c) 2005
| Field Summary | |
|---|---|
static int |
RULEML88
This is used to indicate what back-end parser to use. |
static int |
RULEML91
|
| Constructor Summary | |
|---|---|
RuleMLParser()
Constructs a new parser object. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the internal buffer; and forces a garbage collection cycle. |
java.util.Iterator |
iterator()
Gets an iterator over all clauses that are stored in the internal clause buffer. |
void |
parseFile(int format,
java.lang.String filename)
Parses a file containing a knowledge base that is in the indicated format. |
DefiniteClause |
parseRuleMLQuery(java.lang.String contents)
|
void |
parseRuleMLString(int format,
java.lang.String contents)
Parses a string containing a knowledge base that is in the indicated format. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RULEML88
public static final int RULEML91
| Constructor Detail |
|---|
public RuleMLParser()
| Method Detail |
|---|
public java.util.Iterator iterator()
public void clear()
public void parseFile(int format,
java.lang.String filename)
throws ParseException,
nu.xom.ParsingException,
nu.xom.ValidityException,
java.io.IOException
format - int The integer code for the backend parser - currently
only RULEML88 and RULEML91 is accepted.filename - String The filename (including the full path) to the
file to be parsed.
ParseException - A ParseException is thrown if there is an error
in the document that causes parsing to fail.
nu.xom.ParsingException - A ParsingException is thrown if there is an
error in parsing the document at an XML level.
nu.xom.ValidityException - A ValidityException is thrown if the XML
document is not well formed or does not conform to the DTD specified.
java.io.IOException - An IOException is thrown if there is an error
reading the file from disk.
public void parseRuleMLString(int format,
java.lang.String contents)
throws ParseException,
nu.xom.ParsingException,
nu.xom.ValidityException,
java.io.IOException
format - int The integer code for the backend parser - currently
only RULEML88 and RULEML91 is accepted.contents - String The string containing the knowledge base to be
parsed.
ParseException - A ParseException is thrown if there is an error
in the document that causes parsing to fail.
nu.xom.ParsingException - A ParsingException is thrown if there is an
error in parsing the document at an XML level.
nu.xom.ValidityException - A ValidityException is thrown if the XML
document is not well formed or does not conform to the DTD specified.
java.io.IOException - An IOException is thrown if there is an error
reading the file from disk.
public DefiniteClause parseRuleMLQuery(java.lang.String contents)
throws ParseException,
nu.xom.ParsingException,
nu.xom.ValidityException,
java.io.IOException
ParseException
nu.xom.ParsingException
nu.xom.ValidityException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||