org.encog.persist
Interface EncogCollection

All Known Implementing Classes:
EncogMemoryCollection, EncogPersistedCollection

public interface EncogCollection

An interface to either a memory or disk-based encog collection.


Method Summary
 void add(String name, EncogPersistedObject obj)
          Add an element to the collection.
 void buildDirectory()
          Build the directory.
 void clear()
          Clear all elements from the collection.
 void delete(DirectoryEntry object)
          Delete an object from the collection.
 void delete(String key)
          Delete a key from the collection.
 boolean exists(String key)
          Determine if the specified key exists.
 EncogPersistedObject find(DirectoryEntry entry)
          Find the object that corresponds to the specified directory entry, return null, if not found.
 EncogPersistedObject find(String key)
          Find the object that corresponds to the specified key.
 Collection<DirectoryEntry> getDirectory()
           
 String getEncogVersion()
           
 int getFileVersion()
           
 PersistenceLocation getLocation()
           
 String getPlatform()
           
 void updateProperties(String name, String newName, String desc)
          Update the properties of an element in the collection.
 

Method Detail

add

void add(String name,
         EncogPersistedObject obj)
Add an element to the collection.

Parameters:
name - The name of the element being added.
obj - The object to be added.

buildDirectory

void buildDirectory()
Build the directory. This allows the contents of the collection to be listed.


clear

void clear()
Clear all elements from the collection.


delete

void delete(DirectoryEntry object)
Delete an object from the collection.

Parameters:
object - The object to be deleted.

delete

void delete(String key)
Delete a key from the collection.

Parameters:
key - The key to delete.

exists

boolean exists(String key)
Determine if the specified key exists.

Parameters:
key - The key.
Returns:
True, if the key exists.

find

EncogPersistedObject find(DirectoryEntry entry)
Find the object that corresponds to the specified directory entry, return null, if not found.

Parameters:
entry - The entry to find.
Returns:
The object that was found, or null, if no object was found.

find

EncogPersistedObject find(String key)
Find the object that corresponds to the specified key.

Parameters:
key - The key to search for.
Returns:
The object that corresponds to the specified key.

getDirectory

Collection<DirectoryEntry> getDirectory()
Returns:
A list of all the objects in the collection, specified by DirectoryEntry objects.

getEncogVersion

String getEncogVersion()
Returns:
The version of Encog that this file was created with.

getFileVersion

int getFileVersion()
Returns:
The Encog file version.

getPlatform

String getPlatform()
Returns:
The platform that this file was created on.

updateProperties

void updateProperties(String name,
                      String newName,
                      String desc)
Update the properties of an element in the collection. This allows the element to be renamed, if needed.

Parameters:
name - The name of the object that is being updated.
newName - The new name, can be the same as the old name, if the description is to be updated only.
desc - The new description.

getLocation

PersistenceLocation getLocation()
Returns:
The location this collection is stored at.


Copyright © 2011. All Rights Reserved.