AROM-2_2_13

arom.kr.factory
Interface AromSystem


public interface AromSystem

Each implementation of AROM API must implement the AromSystem interface. This interface is used to access the type system and the modifier factory used by this implementation and act as a knowledge base factory. In this way, each implementation instantiates the right KnowledgeBase concrete object.
The concrete class implementing this interface is automatically instatiated by the AromSetUp class. AromSetUp suppose that the implementation of AromSystem is a singleton pattern. The only instance of this class is retreived by calling a static method called getAromSystemInstance() If this method is not defined in the class implementing the AromSystem interface, an error occur and the AROM system fail to start.
This interface allows user to access to the parser formats defined in the implementation. A description of the available format is accessible from here.

Created: Thu Oct 03 13:55:56 2001

Author:
Christophe Bruley

Method Summary
 void cleanup()
          Cleans the entire AROM system.
 KnowledgeBase createKB(String name, Object[] args)
          Creates a new knowledge base object identified by the specified name.
 ModifierFactory getModifierFactory()
          Return the ModifierFactory used by the implementation of AROM currently running.
 KBReader getReader(String format)
          Returns a KBReader which read AROM description from a Reader in the specified format.
 ResourceManager getResourceManager()
          Return the ResourceManager used by the implementation of AROM currently running.
 KBReader getStandardReader()
          Returns the standard reader.
 KBWriter getStandardWriter()
          Return a knowledge base writer that produce a description of knowledge bases in the standard format.
 TypeSystem getTypeSystem()
          Return the TypeSystem used by the implementation of AROM currently running.
 KBWriter getWriter(String format)
          Return a knowledge base writer that produce a description of knowledge bases in the specified format.
 

Method Detail

createKB

public KnowledgeBase createKB(String name,
                              Object[] args)
                       throws EntityCreationException
Creates a new knowledge base object identified by the specified name.

Parameters:
name - the name of the knowldge base.
args - an array of arguments that are used by this constructor.
Returns:
the created knowledge base.
Throws:
EntityCreationException - if the supplied name or agrs are invalid.

getStandardWriter

public KBWriter getStandardWriter()
Return a knowledge base writer that produce a description of knowledge bases in the standard format.

Returns:
a KBWriter value

getWriter

public KBWriter getWriter(String format)
Return a knowledge base writer that produce a description of knowledge bases in the specified format. You can see the available formats list here.

Parameters:
format - the name of the format supported by the returned KBWriter.
Returns:
a KBWriter value
Throws:
IllegalArgumentException - if the specified format isn't supported.

getStandardReader

public KBReader getStandardReader()
Returns the standard reader. The standard reader is the reader that is used by the AROM system implementation to read and instantiates an AROM knowledge base from a standard description file.

Returns:
a KBReader value

getReader

public KBReader getReader(String format)
Returns a KBReader which read AROM description from a Reader in the specified format. If no KBReader is able to read the specified format, an exception is thrown. You can see the available formats list here.

Parameters:
format - the format's name the returned KBReader is able to read.
Returns:
a KBReader value
Throws:
IllegalArgumentException - if the specified format isn't supported.

getTypeSystem

public TypeSystem getTypeSystem()
Return the TypeSystem used by the implementation of AROM currently running.

Returns:
the TypeSystem used by the AROM system.

getModifierFactory

public ModifierFactory getModifierFactory()
Return the ModifierFactory used by the implementation of AROM currently running.

Returns:
the ModifierFactory used by the AROM system.

getResourceManager

public ResourceManager getResourceManager()
Return the ResourceManager used by the implementation of AROM currently running.

Returns:
the ResourceManager used by the AROM system.

cleanup

public void cleanup()
Cleans the entire AROM system. The instantiated knowledge bases and their overall content are removed from the system. The AROM system dispose of allocated resources.


AROM-2_2_13