org.drools.smf
Class SemanticsReader

java.lang.Object
  extended byorg.drools.smf.SemanticsReader

public class SemanticsReader
extends Object

Loader of SemanticModule s from a set of properties.

The required properties are:

Instances of SemanticsReader are re-entrant and thread-safe. The singleton may be used simultaneously by multiple threads.

Version:
$Id: SemanticsReader.java,v 1.7 2004/11/28 20:01:13 mproctor Exp $
Author:
bob mcwhirter

Constructor Summary
SemanticsReader()
          Construct.
 
Method Summary
static SemanticsReader getInstance()
          Retrieve the singleton instance.
protected  String parseName(String key)
           
protected  String parseType(String key)
           
 SemanticModule read(InputStream in)
          Read a semantic module descriptor from an InputStream.
 SemanticModule read(URL url)
          Read a semantic module descriptor from a URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemanticsReader

public SemanticsReader()
Construct.

Method Detail

getInstance

public static SemanticsReader getInstance()
Retrieve the singleton instance.

Returns:
The singleton instance.

read

public SemanticModule read(URL url)
                    throws Exception
Read a semantic module descriptor from a URL.

Parameters:
url - The descriptor URL.
Returns:
The loaded semantic module.
Throws:
Exception - If an error occurs while loading the module.

read

public SemanticModule read(InputStream in)
                    throws Exception
Read a semantic module descriptor from an InputStream.

Parameters:
in - The descriptor input stream.
Returns:
The loaded semantic module.
Throws:
Exception - If an error occurs while loading the module.

parseType

protected String parseType(String key)

parseName

protected String parseName(String key)


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