com.rapidminer.repository.local
Class SimpleIOObjectEntry

java.lang.Object
  extended by com.rapidminer.repository.local.SimpleEntry
      extended by com.rapidminer.repository.local.SimpleDataEntry
          extended by com.rapidminer.repository.local.SimpleIOObjectEntry
All Implemented Interfaces:
DataEntry, Entry, IOObjectEntry

public class SimpleIOObjectEntry
extends SimpleDataEntry
implements IOObjectEntry

Stores IOObject in a file. Either as IOO serialized files using ExampleSetToStream where appropriate.

Author:
Simon Fischer

Field Summary
 
Fields inherited from class com.rapidminer.repository.local.SimpleEntry
PROPERTIES_SUFFIX
 
Fields inherited from interface com.rapidminer.repository.IOObjectEntry
TYPE_NAME
 
Method Summary
 void delete()
          Deletes the entry and its contents from the repository.
 long getDate()
          Returns the last modification date of this entry.
 java.lang.String getDescription()
          Returns a human readable description.
protected  java.io.File getMetaDataFile()
           
 java.lang.Class<? extends IOObject> getObjectClass()
          This method returns the class of the stored object or null, if it is not an object known to this RapidMiner Client.
 long getSize()
          Returns the size of this entry in bytes.
 java.lang.String getType()
          Returns a string describing the type: "folder", "data", "blob", or "process".
 boolean move(Folder newParent)
          Needs to be implemented only for folders in the same repository.
 boolean move(Folder newParent, java.lang.String newName)
          Needs to be implemented only for folders in the same repository.
 boolean rename(java.lang.String newName)
          Changes the name of the entry.
 IOObject retrieveData(ProgressListener l)
           
 MetaData retrieveMetaData()
           
 void storeData(IOObject data, Operator callingOperator, ProgressListener l)
          Stores data in this entry.
 boolean willBlock()
          Subclasses can use this method to signal whether getting information from this entry will block the current thread, e.g. because information must be fetched over the network.
 
Methods inherited from class com.rapidminer.repository.local.SimpleDataEntry
getRevision
 
Methods inherited from class com.rapidminer.repository.local.SimpleEntry
getContainingFolder, getCustomActions, getLocation, getName, getOwner, getProperty, getRepository, isReadOnly, putProperty, setRepository, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.repository.DataEntry
getRevision
 
Methods inherited from interface com.rapidminer.repository.Entry
getContainingFolder, getCustomActions, getLocation, getName, getOwner, isReadOnly
 

Method Detail

getMetaDataFile

protected java.io.File getMetaDataFile()

retrieveData

public IOObject retrieveData(ProgressListener l)
                      throws RepositoryException
Specified by:
retrieveData in interface IOObjectEntry
Throws:
RepositoryException

retrieveMetaData

public MetaData retrieveMetaData()
                          throws RepositoryException
Specified by:
retrieveMetaData in interface IOObjectEntry
Throws:
RepositoryException

storeData

public void storeData(IOObject data,
                      Operator callingOperator,
                      ProgressListener l)
               throws RepositoryException
Description copied from interface: IOObjectEntry
Stores data in this entry.

Specified by:
storeData in interface IOObjectEntry
Throws:
RepositoryException

getType

public java.lang.String getType()
Description copied from interface: Entry
Returns a string describing the type: "folder", "data", "blob", or "process".

Specified by:
getType in interface Entry

getDescription

public java.lang.String getDescription()
Description copied from interface: Entry
Returns a human readable description.

Specified by:
getDescription in interface Entry
Overrides:
getDescription in class SimpleDataEntry

getSize

public long getSize()
Description copied from interface: DataEntry
Returns the size of this entry in bytes.

Specified by:
getSize in interface DataEntry

delete

public void delete()
            throws RepositoryException
Description copied from interface: Entry
Deletes the entry and its contents from the repository.

Specified by:
delete in interface Entry
Overrides:
delete in class SimpleEntry
Throws:
RepositoryException

rename

public boolean rename(java.lang.String newName)
Description copied from interface: Entry
Changes the name of the entry. The entry stays in the same folder.

Specified by:
rename in interface Entry
Overrides:
rename in class SimpleEntry

move

public boolean move(Folder newParent)
Description copied from interface: Entry
Needs to be implemented only for folders in the same repository. Moving between different repositories is implemented by RepositoryManager.move(RepositoryLocation, Folder, com.rapidminer.tools.ProgressListener) using a sequence of copy and delete.

Specified by:
move in interface Entry
Overrides:
move in class SimpleEntry

move

public boolean move(Folder newParent,
                    java.lang.String newName)
Description copied from interface: Entry
Needs to be implemented only for folders in the same repository. Moving between different repositories is implemented by RepositoryManager.move(RepositoryLocation, Folder, com.rapidminer.tools.ProgressListener) using a sequence of copy and delete.

Specified by:
move in interface Entry
Overrides:
move in class SimpleEntry
newName - New name for moved entry. If moved entry shouldn't be renamed: newName=null.

getDate

public long getDate()
Description copied from interface: DataEntry
Returns the last modification date of this entry.

Specified by:
getDate in interface DataEntry

willBlock

public boolean willBlock()
Description copied from interface: Entry
Subclasses can use this method to signal whether getting information from this entry will block the current thread, e.g. because information must be fetched over the network.

Specified by:
willBlock in interface Entry
Overrides:
willBlock in class SimpleEntry

getObjectClass

public java.lang.Class<? extends IOObject> getObjectClass()
Description copied from interface: IOObjectEntry
This method returns the class of the stored object or null, if it is not an object known to this RapidMiner Client.

Specified by:
getObjectClass in interface IOObjectEntry


Copyright © 2001-2009 by Rapid-I