Package com.semedy.reasoner.api.parser
Class ParserUtils
java.lang.Object
com.semedy.reasoner.api.parser.ParserUtils
Utility methods for parsing facts, rules, queries
- Author:
- Juergen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
loadAllFactsAndRulesInDirectory
(String directoryPath, Set<Rule> rules, Set<Literal> facts, int maxTermLength) load all rules and facts in files in same (flat) directoryloadAllPredicateSymbols
(String directoryPath, int maxTermLength) return all predicate symbols in all files in same (flat) directory
-
Constructor Details
-
ParserUtils
public ParserUtils()
-
-
Method Details
-
loadAllFactsAndRulesInDirectory
public static void loadAllFactsAndRulesInDirectory(String directoryPath, Set<Rule> rules, Set<Literal> facts, int maxTermLength) throws IOException, SemReasonerException load all rules and facts in files in same (flat) directory- Parameters:
directoryPath
-rules
- , container to parse rules intofacts
- , container to parse facts intomaxTermLength
- , max length of a string wo long string encoding- Throws:
IOException
SemReasonerException
-
loadAllPredicateSymbols
public static Set<String> loadAllPredicateSymbols(String directoryPath, int maxTermLength) throws IOException, SimpleParseException return all predicate symbols in all files in same (flat) directory- Parameters:
directoryPath
-maxTermLength
- , max length of a string wo long string encoding- Returns:
- Throws:
IOException
SimpleParseException
-