Class ClientPrimaryDataDirectory
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientContext
-
- de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientPrimaryDataEntity
-
- de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientPrimaryDataDirectory
-
- All Implemented Interfaces:
java.lang.Comparable<ClientPrimaryDataEntity>
public class ClientPrimaryDataDirectory extends ClientPrimaryDataEntity
SampleClient version ofPrimaryDataDirectoryto use eDAL system like the stand-alone implementation.
-
-
Field Summary
-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientPrimaryDataEntity
currentVersion, myEntityRMI
-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientContext
clientDataManager
-
-
Constructor Summary
Constructors Constructor Description ClientPrimaryDataDirectory(PrimaryDataDirectoryRmiInterface directory, ClientDataManager client)Constructor for ClientPrimaryDataDirectory.
-
Method Summary
Modifier and Type Method Description ClientPrimaryDataDirectorycreatePrimaryDataDirectory(java.lang.String path)ClientPrimaryDataFilecreatePrimaryDataFile(java.lang.String name)booleanexist(java.lang.String path)java.util.List<ClientPrimaryDataEntity>getAllPublishedEntities()ClientPrimaryDataEntitygetPrimaryDataEntity(java.lang.String name)java.util.List<ClientPrimaryDataEntity>listPrimaryDataEntities()java.util.List<ClientPrimaryDataEntity>searchByDublinCoreElement(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories)java.util.List<ClientPrimaryDataEntity>searchByKeyword(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories)java.util.List<ClientPrimaryDataEntity>searchByMetaData(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories)java.util.List<ClientPrimaryDataEntity>searchByPublicationStatus(PublicationStatus publicationStatus)voidsetMetaData(MetaData new_metadata)-
Methods inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientPrimaryDataEntity
addPublicReference, compareTo, delete, equals, getCurrentVersion, getID, getMetaData, getName, getParentDirectory, getPath, getPermissions, getPublicReferences, getVersionByDate, getVersionByRevisionNumber, getVersions, grantPermission, hashCode, isDirectory, move, rename, revokePermission, switchCurrentVersion
-
-
-
-
Constructor Detail
-
ClientPrimaryDataDirectory
public ClientPrimaryDataDirectory(PrimaryDataDirectoryRmiInterface directory, ClientDataManager client)
Constructor for ClientPrimaryDataDirectory.- Parameters:
directory- aPrimaryDataDirectoryRmiInterfaceobject.client- theClientDataManager
-
-
Method Detail
-
createPrimaryDataDirectory
public ClientPrimaryDataDirectory createPrimaryDataDirectory(java.lang.String path) throws java.rmi.RemoteException, PrimaryDataDirectoryException
- Parameters:
path- the name of the newPrimaryDataDirectory.- Returns:
- the new
PrimaryDataDirectoryobject.
nullif failed - Throws:
PrimaryDataDirectoryException- if the currentPrimaryDataEntityVersionof thisPrimaryDataDirectoryis marked as deleted or if there is already aPrimaryDataEntitywith the same name.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectoryRmiInterface.createPrimaryDataDirectory(String, Subject, Map)
-
createPrimaryDataFile
public ClientPrimaryDataFile createPrimaryDataFile(java.lang.String name) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Parameters:
name- of the newPrimaryDataFileobject.- Returns:
- the new
PrimaryDataFile.
nullif failed - Throws:
PrimaryDataDirectoryException- if the currentPrimaryDataEntityVersionof thisPrimaryDataDirectoryis marked as deleted or if there is already aPrimaryDataEntitywith the same name.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectoryRmiInterface.createPrimaryDataFile(String, Subject, Map)
-
exist
public boolean exist(java.lang.String path) throws java.rmi.RemoteException, PrimaryDataDirectoryException- Parameters:
path- the name of thePrimaryDataEntityto check.- Returns:
trueif there is already a PrimartyDataEntity with the same path;
falseotherwise- Throws:
PrimaryDataDirectoryException- if unable to load allPrimaryDataEntityobjects in thisPrimaryDataDirectoryto check if the name already exists.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectoryRmiInterface.exist(String, Subject)
-
getPrimaryDataEntity
public ClientPrimaryDataEntity getPrimaryDataEntity(java.lang.String name) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Parameters:
name- name of thePrimaryDataEntityin thisPrimaryDataDirectory.- Returns:
- the found
PrimaryDataEntityobject. - Throws:
PrimaryDataDirectoryException- if no suchPrimaryDataEntityexists.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectoryRmiInterface.getPrimaryDataEntity(String, Subject)
-
listPrimaryDataEntities
public java.util.List<ClientPrimaryDataEntity> listPrimaryDataEntities() throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Returns:
- an unmodifiable
Listcontaining allPrimaryDataEntity - Throws:
PrimaryDataDirectoryException- thisPrimaryDataDirectory.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectoryRmiInterface.listPrimaryDataEntities(Subject)
-
getAllPublishedEntities
public java.util.List<ClientPrimaryDataEntity> getAllPublishedEntities() throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Returns:
- a
Listof allPrimaryDataEntitywith aPublicReference. - Throws:
PrimaryDataDirectoryException- if unable to load objcts.java.rmi.RemoteException- if unable to call remote function.
-
searchByPublicationStatus
public java.util.List<ClientPrimaryDataEntity> searchByPublicationStatus(PublicationStatus publicationStatus) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Parameters:
publicationStatus- thePublicationStatusof the searchedPrimaryDataEntity.- Returns:
- a
Listof allPrimaryDataEntitywith aPublicReference. - Throws:
PrimaryDataDirectoryException- if unable to search forPublicationStatusjava.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.searchByPublicationStatus(PublicationStatus)
-
searchByDublinCoreElement
public java.util.List<ClientPrimaryDataEntity> searchByDublinCoreElement(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories) throws java.rmi.RemoteException, PrimaryDataDirectoryException
- Parameters:
element- theEnumDublinCoreElementsfor query.data-UntypedDataparameter for search.fuzzy-true: exact search;
false: fuzzy search.recursiveIntoSubdirectories-true: include also all sub directories recursively;
false: search only in the currentPrimaryDataDirectoryobject.- Returns:
- an unmodifiable
ListofPrimaryDataEntitythat match the parameter. - Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.- See Also:
PrimaryDataDirectoryRmiInterface.searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean, Subject)
-
searchByMetaData
public java.util.List<ClientPrimaryDataEntity> searchByMetaData(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories) throws java.rmi.RemoteException, PrimaryDataDirectoryException, MetaDataException
- Parameters:
query- aMetaDataobject for query.fuzzy-true: fuzzy search;
false: exact search.recursiveIntoSubdirectories-true: include also all subPrimaryDataDirectoryrecursively;
falsesearch only in the currentPrimaryDataDirectoryobject.- Returns:
- a unmodifiable
ListofPrimaryDataEntitythat match theMetaDataparameter. - Throws:
MetaDataException- if there are non valid values for someMetaDataelements.java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.- See Also:
PrimaryDataDirectoryRmiInterface.searchByMetaData(MetaData, boolean, boolean, Subject)
-
searchByKeyword
public java.util.List<ClientPrimaryDataEntity> searchByKeyword(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories) throws java.rmi.RemoteException, PrimaryDataDirectoryException
- Parameters:
keyword- the term to search over all elements.fuzzy-true: fuzzy search;false: exact searchrecursiveIntoSubdirectories-true: include also all subPrimaryDataDirectoryrecursively;falsesearch only in the currentPrimaryDataDirectoryobject- Returns:
- a unmodifiable
ListofPrimaryDataEntitythat match the keyword. - Throws:
PrimaryDataDirectoryException- if unable to search for the keyword.java.rmi.RemoteException- if unable to call remote function.
-
setMetaData
public void setMetaData(MetaData new_metadata) throws java.rmi.RemoteException, PrimaryDataEntityVersionException, MetaDataException
- Overrides:
setMetaDatain classClientPrimaryDataEntity- Parameters:
new_metadata- the newMetaDataobject to set.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityVersionException- if unable to storePrimaryDataEntityVersion.MetaDataException- if there are non valid value for element in theMetaDataobject.- See Also:
PrimaryDataEntityRmiInterface.setMetaData(MetaData, Subject)
-
-