Package org.drools.drl.parser.lang.dsl
Class DSLMappingFile
java.lang.Object
org.drools.drl.parser.lang.dsl.DSLMappingFile
- Direct Known Subclasses:
DSLTokenizedMappingFile
A helper class that handles a DSL Mapping file
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondumpFile()Method to return the current mapping as a String objectReturns the list of parsing errorsReturns the DSL mapping loaded from this fileabstract booleanparseAndLoad(Reader dsl) Parses the file.voidsaveMapping(Writer out) Saves current mapping into a DSL mapping filestatic voidsaveMapping(Writer out, DSLMapping mapping) Saves the given mapping into a DSL mapping fileprotected voidsetErrors(List<? extends KnowledgeBuilderResult> errors) voidsetMapping(DSLMapping mapping) Sets the
-
Constructor Details
-
DSLMappingFile
public DSLMappingFile()
-
-
Method Details
-
getMapping
Returns the DSL mapping loaded from this file- Returns:
-
setMapping
Sets the- Parameters:
mapping-
-
getErrors
Returns the list of parsing errors- Returns:
-
setErrors
-
parseAndLoad
Parses the file. Throws IOException in case there is any problem reading the file;- Returns:
- true in case no error was found parsing the file. false otherwise. Use getErrors() to check for the actual errors.
- Throws:
IOException
-
saveMapping
Saves current mapping into a DSL mapping file- Parameters:
out-- Throws:
IOException
-
saveMapping
Saves the given mapping into a DSL mapping file- Parameters:
out-mapping-- Throws:
IOException
-
dumpFile
Method to return the current mapping as a String object- Returns:
-