org.drools.io
Class RuleBaseLoader

java.lang.Object
  extended by org.drools.io.RuleBaseLoader

public final class RuleBaseLoader
extends Object

Convenience methods for loading a RuleBase.

The RuleBaseLoader provides convenience methods for loading RuleBase s from streams. RuleBaseLoader is thread-safe and as such may be used to build multiple RuleBase s simultaneously by multiple threads.

Author:
bob mcwhirter TODO: Would rather this wasn't a bunch of static methods.
See Also:
RuleSet, RuleBase, RuleSetReader, RuleBaseBuilder

Method Summary
static RuleBase loadFromInputStream(InputStream in)
          Loads a RuleBase from an InputStream using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromInputStream(InputStream in, ConflictResolver resolver) passing the DefaultConflictResolver
static RuleBase loadFromInputStream(InputStream[] ins)
          Loads a RuleBase from an InputStream using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromInputStream(InputStream[] ins, ConflictResolver resolver) passing the DefaultConflictResolver
static RuleBase loadFromInputStream(InputStream[] ins, ConflictResolver resolver)
          Loads a RuleBase from an InputStream using the default ConflictResolver
static RuleBase loadFromInputStream(InputStream in, ConflictResolver resolver)
          Loads a RuleBase from an InputStream using the default ConflictResolver
static RuleBase loadFromReader(Reader in)
          Loads a RuleBase from a Reader using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromReader(Reader in, ConflictResolver resolver) passing the DefaultConflictResolver
static RuleBase loadFromReader(Reader[] ins)
          Loads a RuleBase from a Reader using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromReader(Reader[] ins, ConflictResolver resolver) passing the DefaultConflictResolver
static RuleBase loadFromReader(Reader[] ins, ConflictResolver resolver)
          Loads a RuleBase from a Reader using the given ConflictResolver
static RuleBase loadFromReader(Reader in, ConflictResolver resolver)
          Loads a RuleBase from a Reader using the given ConflictResolver
static RuleBase loadFromUrl(URL url)
          Loads a RuleBase from a URL using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromUrl(URL url, ConflictResolver resolver) passing the DefaultConflictResolver
static RuleBase loadFromUrl(URL[] urls)
          Loads a RuleBase using several URLs, using the DefaultConflictResolver.
static RuleBase loadFromUrl(URL[] urls, ConflictResolver resolver)
          Loads a RuleBase from several URLS, merging them and using the specified ConflictResolver
static RuleBase loadFromUrl(URL url, ConflictResolver resolver)
          Loads a RuleBase from a URL using the given ConflictResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadFromUrl

public static RuleBase loadFromUrl(URL url)
                            throws org.xml.sax.SAXException,
                                   IOException,
                                   IntegrationException
Loads a RuleBase from a URL using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromUrl(URL url, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
url -
Returns:
RuleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromUrl

public static RuleBase loadFromUrl(URL url,
                                   ConflictResolver resolver)
                            throws org.xml.sax.SAXException,
                                   IOException,
                                   IntegrationException
Loads a RuleBase from a URL using the given ConflictResolver

Parameters:
url -
resolver -
Returns:
RuleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromUrl

public static RuleBase loadFromUrl(URL[] urls)
                            throws org.xml.sax.SAXException,
                                   IOException,
                                   IntegrationException
Loads a RuleBase using several URLs, using the DefaultConflictResolver. This is a convenience method and calls public static RuleBase loadFromUrl(URL[] url, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
urls -
Returns:
RuleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromUrl

public static RuleBase loadFromUrl(URL[] urls,
                                   ConflictResolver resolver)
                            throws org.xml.sax.SAXException,
                                   IOException,
                                   IntegrationException
Loads a RuleBase from several URLS, merging them and using the specified ConflictResolver

Parameters:
urls -
resolver -
Returns:
RuleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromInputStream

public static RuleBase loadFromInputStream(InputStream in)
                                    throws org.xml.sax.SAXException,
                                           IOException,
                                           IntegrationException
Loads a RuleBase from an InputStream using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromInputStream(InputStream in, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
in -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromInputStream

public static RuleBase loadFromInputStream(InputStream in,
                                           ConflictResolver resolver)
                                    throws org.xml.sax.SAXException,
                                           IOException,
                                           IntegrationException
Loads a RuleBase from an InputStream using the default ConflictResolver

Parameters:
in -
resolver -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromInputStream

public static RuleBase loadFromInputStream(InputStream[] ins)
                                    throws org.xml.sax.SAXException,
                                           IOException,
                                           IntegrationException
Loads a RuleBase from an InputStream using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromInputStream(InputStream[] ins, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
ins -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromInputStream

public static RuleBase loadFromInputStream(InputStream[] ins,
                                           ConflictResolver resolver)
                                    throws org.xml.sax.SAXException,
                                           IOException,
                                           IntegrationException
Loads a RuleBase from an InputStream using the default ConflictResolver

Parameters:
ins -
resolver -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromReader

public static RuleBase loadFromReader(Reader in)
                               throws org.xml.sax.SAXException,
                                      IOException,
                                      IntegrationException
Loads a RuleBase from a Reader using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromReader(Reader in, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
in -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromReader

public static RuleBase loadFromReader(Reader in,
                                      ConflictResolver resolver)
                               throws org.xml.sax.SAXException,
                                      IOException,
                                      IntegrationException
Loads a RuleBase from a Reader using the given ConflictResolver

Parameters:
in -
resolver -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromReader

public static RuleBase loadFromReader(Reader[] ins)
                               throws org.xml.sax.SAXException,
                                      IOException,
                                      IntegrationException
Loads a RuleBase from a Reader using the default ConflictResolver This is a convenience method and calls public static RuleBase loadFromReader(Reader[] ins, ConflictResolver resolver) passing the DefaultConflictResolver

Parameters:
ins -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException

loadFromReader

public static RuleBase loadFromReader(Reader[] ins,
                                      ConflictResolver resolver)
                               throws org.xml.sax.SAXException,
                                      IOException,
                                      IntegrationException
Loads a RuleBase from a Reader using the given ConflictResolver

Parameters:
ins -
resolver -
Returns:
ruleBase
Throws:
org.xml.sax.SAXException
IOException
IntegrationException


Copyright © 2001-2005 The Codehaus. All Rights Reserved.