| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectyawn.io.xml.XmlStorage
public class XmlStorage
Implementation of INeuralNetworkConfigStorage backed by xml
 files, one per neural network configuration.
 
 The xml file names follow the pattern ${networkConfigId}-config.xml
 
 $Id: XmlStorage.java,v 1.3 2005/04/07 17:28:28 supermarti Exp $
| Constructor Summary | |
|---|---|
| XmlStorage() | |
| XmlStorage(XmlContext context) | |
| Method Summary | |
|---|---|
| protected  java.lang.Object | deSerializeObject(java.io.File file) | 
|  void | flush() | 
|  java.lang.String | generateKey(java.lang.Object object) | 
|  java.lang.Object | get(java.lang.String key)Returns the object stored in the file named as the key. | 
|  java.lang.Object[] | getAll()Returns all objects in the repository. | 
|  IContext | getContext() | 
|  void | insert(java.lang.Object object,
       java.lang.String key)Inserts an instance of a IPersistentimplementor in the
 underlying storage. | 
| protected  java.io.File | prepareFile(java.lang.String key) | 
| protected  void | serializeObject(java.lang.Object object,
                java.io.File file) | 
|  void | setContext(IContext context) | 
|  void | update(java.lang.Object object,
       java.lang.String key) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public XmlStorage(XmlContext context)
public XmlStorage()
| Method Detail | 
|---|
public void setContext(IContext context)
setContext in interface IStorageIStorage.setContext(yawn.io.IContext)public IContext getContext()
getContext in interface IStorageIStorage.getContext()
public void insert(java.lang.Object object,
                   java.lang.String key)
            throws StorageException,
                   DuplicateKeyException
IStorageIPersistent implementor in the
 underlying storage.
insert in interface IStorageobject - The IPersistent implementor instance to store.
StorageException
DuplicateKeyExceptionIStorage.insert(java.lang.Object, java.lang.String)
protected void serializeObject(java.lang.Object object,
                               java.io.File file)
                        throws StorageException
StorageExceptionpublic java.lang.String generateKey(java.lang.Object object)
generateKey in interface IStorageIStorage.generateKey(java.lang.Object)protected java.io.File prepareFile(java.lang.String key)
public void update(java.lang.Object object,
                   java.lang.String key)
            throws KeyNotPresentException,
                   StorageException
update in interface IStorageKeyNotPresentException
StorageExceptionIStorage.update(java.lang.Object, java.lang.String)
public java.lang.Object get(java.lang.String key)
                     throws StorageException,
                            KeyNotPresentException
key.
 The base class of this object is specified in
 XmlContext.getRootSerializationClass().
get in interface IStorageIPersistent implementor instance that matches
         the provided id, or null if not matching instance is
         found.
StorageException
KeyNotPresentExceptionXmlContext.getRootSerializationClass(), 
IStorage.get(java.lang.String)
protected java.lang.Object deSerializeObject(java.io.File file)
                                      throws StorageException
StorageException
public java.lang.Object[] getAll()
                          throws StorageException
getAll in interface IStorageStorageExceptionIStorage.getAll()public void flush()
flush in interface IStorageIStorage.flush()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||