com.rapidminer.repository
Interface Entry

All Known Subinterfaces:
BlobEntry, DataEntry, Folder, IOObjectEntry, ProcessEntry, Repository
All Known Implementing Classes:
DBConnectionConverterFolder, DBConnectionEntry, DBConnectionFolder, DBRepository, LocalRepository, RemoteBlobEntry, RemoteDataEntry, RemoteEntry, RemoteFolder, RemoteIOObjectEntry, RemoteProcessEntry, RemoteRepository, ResourceDataEntry, ResourceEntry, ResourceFolder, ResourceIOObjectEntry, ResourceProcessEntry, ResourceRepository, SimpleBlobEntry, SimpleDataEntry, SimpleEntry, SimpleFolder, SimpleIOObjectEntry, SimpleProcessEntry

public interface Entry

An entry in a repository. Can be either a folder or a data entry (leaf). This is either a view on the local file system or a view on a remote repository.

Author:
Simon Fischer, Nils Woehler

Method Summary
 void delete()
          Deletes the entry and its contents from the repository.
 Folder getContainingFolder()
          Returns the folder containing this entry.
 java.util.Collection<javax.swing.Action> getCustomActions()
          Returns custom actions to be displayed in this entry's popup menu.
 java.lang.String getDescription()
          Returns a human readable description.
 RepositoryLocation getLocation()
          A location, that can be used, e.g. as a parameter in the RepositorySource or which can be used to locate the entry using RepositoryManager#resolve(String).
 java.lang.String getName()
          Returns the name, the last part of the location.
 java.lang.String getOwner()
          Returns the user name of the owner.
 java.lang.String getType()
          Returns a string describing the type: "folder", "data", "blob", or "process".
 boolean isReadOnly()
          Returns true if this entry cannot be written to.
 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.
 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.
 

Method Detail

getName

java.lang.String getName()
Returns the name, the last part of the location.


getType

java.lang.String getType()
Returns a string describing the type: "folder", "data", "blob", or "process".


getOwner

java.lang.String getOwner()
Returns the user name of the owner.


getDescription

java.lang.String getDescription()
Returns a human readable description.


isReadOnly

boolean isReadOnly()
Returns true if this entry cannot be written to.


rename

boolean rename(java.lang.String newName)
               throws RepositoryException
Changes the name of the entry. The entry stays in the same folder.

Throws:
RepositoryException

move

boolean move(Folder newParent)
             throws RepositoryException
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.

Throws:
RepositoryException

move

boolean move(Folder newParent,
             java.lang.String newName)
             throws RepositoryException
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.

Parameters:
newName - New name for moved entry. If moved entry shouldn't be renamed: newName=null.
Throws:
RepositoryException

getContainingFolder

Folder getContainingFolder()
Returns the folder containing this entry.


willBlock

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.


getLocation

RepositoryLocation getLocation()
A location, that can be used, e.g. as a parameter in the RepositorySource or which can be used to locate the entry using RepositoryManager#resolve(String).


delete

void delete()
            throws RepositoryException
Deletes the entry and its contents from the repository.

Throws:
RepositoryException

getCustomActions

java.util.Collection<javax.swing.Action> getCustomActions()
Returns custom actions to be displayed in this entry's popup menu.



Copyright © 2001-2009 by Rapid-I