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 ofPrimaryDataDirectory
to 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 ClientPrimaryDataDirectory
createPrimaryDataDirectory(java.lang.String path)
ClientPrimaryDataFile
createPrimaryDataFile(java.lang.String name)
boolean
exist(java.lang.String path)
java.util.List<ClientPrimaryDataEntity>
getAllPublishedEntities()
ClientPrimaryDataEntity
getPrimaryDataEntity(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)
void
setMetaData(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
- aPrimaryDataDirectoryRmiInterface
object.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
PrimaryDataDirectory
object.
null
if failed - Throws:
PrimaryDataDirectoryException
- if the currentPrimaryDataEntityVersion
of thisPrimaryDataDirectory
is marked as deleted or if there is already aPrimaryDataEntity
with 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 newPrimaryDataFile
object.- Returns:
- the new
PrimaryDataFile
.
null
if failed - Throws:
PrimaryDataDirectoryException
- if the currentPrimaryDataEntityVersion
of thisPrimaryDataDirectory
is marked as deleted or if there is already aPrimaryDataEntity
with 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 thePrimaryDataEntity
to check.- Returns:
true
if there is already a PrimartyDataEntity with the same path;
false
otherwise- Throws:
PrimaryDataDirectoryException
- if unable to load allPrimaryDataEntity
objects in thisPrimaryDataDirectory
to 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 thePrimaryDataEntity
in thisPrimaryDataDirectory
.- Returns:
- the found
PrimaryDataEntity
object. - Throws:
PrimaryDataDirectoryException
- if no suchPrimaryDataEntity
exists.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
List
containing 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
List
of allPrimaryDataEntity
with 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
- thePublicationStatus
of the searchedPrimaryDataEntity
.- Returns:
- a
List
of allPrimaryDataEntity
with aPublicReference
. - Throws:
PrimaryDataDirectoryException
- if unable to search forPublicationStatus
java.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
- theEnumDublinCoreElements
for query.data
-UntypedData
parameter for search.fuzzy
-true
: exact search;
false
: fuzzy search.recursiveIntoSubdirectories
-true
: include also all sub directories recursively;
false
: search only in the currentPrimaryDataDirectory
object.- Returns:
- an unmodifiable
List
ofPrimaryDataEntity
that match the parameter. - Throws:
java.rmi.RemoteException
- if unable to call remote function.PrimaryDataDirectoryException
- if unable to findPrimaryDataEntity
object 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
- aMetaData
object for query.fuzzy
-true
: fuzzy search;
false
: exact search.recursiveIntoSubdirectories
-true
: include also all subPrimaryDataDirectory
recursively;
false
search only in the currentPrimaryDataDirectory
object.- Returns:
- a unmodifiable
List
ofPrimaryDataEntity
that match theMetaData
parameter. - Throws:
MetaDataException
- if there are non valid values for someMetaData
elements.java.rmi.RemoteException
- if unable to call remote function.PrimaryDataDirectoryException
- if unable to findPrimaryDataEntity
object 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 subPrimaryDataDirectory
recursively;false
search only in the currentPrimaryDataDirectory
object- Returns:
- a unmodifiable
List
ofPrimaryDataEntity
that 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:
setMetaData
in classClientPrimaryDataEntity
- Parameters:
new_metadata
- the newMetaData
object 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 theMetaData
object.- See Also:
PrimaryDataEntityRmiInterface.setMetaData(MetaData, Subject)
-
-