| org.mandarax.zkb.ObjectPersistencyService
All known Subclasses: org.mandarax.zkb.AbstractOPS,
ObjectPersistencyService | public interface ObjectPersistencyService (Code) | | Interface describing an object persisteny service (OPS).
An object persisteny service is responsible for saving objects stored in a kind of
map (associating object uris and objects) to a stream, and recovering the map from
a stream. This is to support knowledge base storage: while knowledge base objects
such as rules and facts are stored in an xml file, the objects referenced are stored
separately as one big map. This is to benefit from existing technologies like
serialization.
The interface is similar to an JNDI context - most implementations will work with
maps associating names and serialized object references.
author: Jens Dietrich version: 3.4 <7 March 05> since: 2.2 |
bind | public void bind(String uri, Object obj)(Code) | | Bind an object to a name (uri).
Parameters: uri - an uri Parameters: obj - an object |
createName | public String createName(Object obj)(Code) | | Create a name of an object.
Parameters: obj - an object an uri |
exportObjects | public void exportObjects(OutputStream out) throws IOException(Code) | | Export objects.
Parameters: out - an output stream exception: an - io exception |
findOrBind | public String findOrBind(Object obj)(Code) | | Find an object. If the object is not yet registered, bind it
using the generated name.
Parameters: obj - an object the uri |
getDescription | public String getDescription()(Code) | | Get a brief description.
a brief description of the service |
getExtension | public String getExtension()(Code) | | Get the extension of the associated files.
a file extension |
getName | public String getName()(Code) | | Get name.
the name of the service |
importObjects | public void importObjects(InputStream in) throws IOException(Code) | | Import objects.
Parameters: in - an input stream exception: an - io exception |
lookup | public Object lookup(String name)(Code) | | Get an object by name.
Parameters: uri - an uri obj an object |
reset | public void reset()(Code) | | Reset the state, release all associations.
|
unbind | public void unbind(String uri)(Code) | | Unbind the name (uri).
Parameters: uri - an uri |
|
|