站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

DSLMappingFile (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.lang.dsl
Class DSLMappingFile

java.lang.Object
  extended by org.drools.lang.dsl.DSLMappingFile

public class DSLMappingFile
extends Object

A helper class that handles a DSL Mapping file

Author:
etirelli

Constructor Summary
DSLMappingFile()
           
 
Method Summary
 String dumpFile()
          Method to return the current mapping as a String object
 List getErrors()
          Returns the list of parsing errors
 DSLMapping getMapping()
          Returns the DSL mapping loaded from this file
 boolean parseAndLoad(Reader dsl)
          Parses the file.
 void saveMapping(Writer out)
          Saves current mapping into a DSL mapping file
static void saveMapping(Writer out, DSLMapping mapping)
          Saves the given mapping into a DSL mapping file
 void setMapping(DSLMapping mapping)
          Sets the
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSLMappingFile

public DSLMappingFile()
Method Detail

getMapping

public DSLMapping getMapping()
Returns the DSL mapping loaded from this file

Returns:

setMapping

public void setMapping(DSLMapping mapping)
Sets the

Parameters:
mapping -

getErrors

public List getErrors()
Returns the list of parsing errors

Returns:

parseAndLoad

public boolean parseAndLoad(Reader dsl)
                     throws IOException
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

public void saveMapping(Writer out)
                 throws IOException
Saves current mapping into a DSL mapping file

Parameters:
out -
Throws:
IOException

saveMapping

public static void saveMapping(Writer out,
                               DSLMapping mapping)
                        throws IOException
Saves the given mapping into a DSL mapping file

Parameters:
out -
mapping -
Throws:
IOException

dumpFile

public String dumpFile()
Method to return the current mapping as a String object

Returns:


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.