Class PrimaryDataDirectoryImplementation
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntity
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectory
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.implementation.PrimaryDataDirectoryImplementation
-
- All Implemented Interfaces:
java.lang.Comparable<PrimaryDataEntity>
@Entity public class PrimaryDataDirectoryImplementation extends PrimaryDataDirectory
Implementation ofPrimaryDataDirectory.
-
-
Field Summary
-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectory
PATH_SEPARATOR
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPrimaryDataDirectoryImplementation()Default constructor forPrimaryDataDirectoryImplementationis necessary for PojoInstantiator of HIBERNATE.PrimaryDataDirectoryImplementation(PrimaryDataDirectory path, java.lang.String name)Constructor for PrimaryDataDirectoryImplementation.
-
Method Summary
Modifier and Type Method Description booleanexistImpl(java.lang.String path)Abstract function for implementation ofPrimaryDataDirectory.exist(String)java.lang.StringgetID()Getter for the ID of thisPrimaryDataEntity.PrimaryDataDirectoryImplementationgetParentDirectory()Getter for the parentPrimaryDataDirectoryof thisPrimaryDataEntity.protected java.util.Map<java.security.Principal,java.util.List<EdalPermission>>getPermissionsImpl()Abstract function for implementation ofPrimaryDataEntity.getPermissions().protected PrimaryDataEntitygetPrimaryDataEntityImpl(java.lang.String name)Abstract function for the implementation ofPrimaryDataDirectory.getPrimaryDataEntity(String).protected java.util.SortedSet<PrimaryDataEntityVersionImplementation>getVersionList()Getter for the fieldversionList.protected java.util.SortedSet<PrimaryDataEntityVersion>getVersionsImpl()Abstract function for implementation ofPrimaryDataEntity.getVersions().protected java.util.List<PrimaryDataEntity>listPrimaryDataEntitiesImpl(java.util.Calendar currentVersionDate, java.util.Calendar nextVersionDate)Abstract function for the implementation ofPrimaryDataDirectory.listPrimaryDataEntities().protected voidmoveImpl(PrimaryDataDirectory destinationDirectory)Abstract function for implementation ofPrimaryDataEntity.move(PrimaryDataDirectory).protected java.util.List<PrimaryDataEntity>searchByDublinCoreElementImpl(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories)Abstract function for implementation ofPrimaryDataDirectory.searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean).protected java.util.List<? extends PrimaryDataEntity>searchByKeywordImpl(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories)Abstract function for the implementation ofPrimaryDataDirectory.searchByKeyword(String, boolean, boolean)protected java.util.List<PrimaryDataEntity>searchByMetaDataImpl(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories)Abstract function for implementation ofPrimaryDataDirectory.searchByMetaData(MetaData, boolean, boolean).protected java.util.List<? extends PrimaryDataEntity>searchByPublicationStatusImpl(PublicationStatus publicationStatus)Abstract function for the implementation ofPrimaryDataDirectory.searchByPublicationStatus(PublicationStatus).protected voidsetVersionList(java.util.SortedSet<PrimaryDataEntityVersionImplementation> versionList)Setter for the fieldversionList.protected voidstoreVersion(PrimaryDataEntityVersion publicVersion)Abstract function for storing a newPrimaryDataEntityVersionfor anPrimaryDataEntityobject.-
Methods inherited from class de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectory
createPrimaryDataDirectory, createPrimaryDataFile, exist, getAllPublishedEntities, getPrimaryDataEntity, getRootDirectory, listPrimaryDataEntities, searchByDublinCoreElement, searchByKeyword, searchByMetaData, searchByPublicationStatus, setMetaData
-
Methods inherited from class de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntity
addPublicReference, commitVersion, compareTo, delete, equals, getCurrentVersion, getImplementationProvider, getMetaData, getName, getPath, getPermissions, getPublicReferences, getSubject, getVersionByDate, getVersionByRevisionNumber, getVersions, grantPermission, hashCode, isDirectory, move, reloadOldDataType, rename, revokePermission, setCurrentVersion, setDefaultPermissions, setID, setParentDirectory, switchCurrentVersion, toString
-
-
-
-
Constructor Detail
-
PrimaryDataDirectoryImplementation
protected PrimaryDataDirectoryImplementation()
Default constructor forPrimaryDataDirectoryImplementationis necessary for PojoInstantiator of HIBERNATE.
-
PrimaryDataDirectoryImplementation
public PrimaryDataDirectoryImplementation(PrimaryDataDirectory path, java.lang.String name) throws PrimaryDataEntityVersionException, PrimaryDataDirectoryException, MetaDataException
Constructor for PrimaryDataDirectoryImplementation.- Parameters:
path- aPrimaryDataDirectoryobject.name- aStringobject.- Throws:
PrimaryDataEntityVersionException- if can not set currentPrimaryDataEntityVersion.PrimaryDataDirectoryException- if no parentPrimaryDataDirectoryis found.MetaDataException- if theMetaDataobject of the parentPrimaryDataDirectoryis not clone-able
-
-
Method Detail
-
existImpl
public boolean existImpl(java.lang.String path) throws PrimaryDataDirectoryExceptionAbstract function for implementation ofPrimaryDataDirectory.exist(String)- Specified by:
existImplin classPrimaryDataDirectory- 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.
-
getID
public java.lang.String getID()
Getter for the ID of thisPrimaryDataEntity.HIBERNATE : constant length cause it is an
UUID- Overrides:
getIDin classPrimaryDataEntity- Returns:
- the ID of this
PrimaryDataEntity - See Also:
UUID
-
getParentDirectory
public PrimaryDataDirectoryImplementation getParentDirectory()
Getter for the parentPrimaryDataDirectoryof thisPrimaryDataEntity.NOTE: It is not allowed to access the parent
PrimaryDataDirectoryof the rootPrimaryDataDirectory!HIBERNATE : FetchType.EAGER for getPath()
- Overrides:
getParentDirectoryin classPrimaryDataEntity- Returns:
- the parent
PrimaryDataDirectoryof thisPrimaryDataEntity.
-
getPermissionsImpl
protected java.util.Map<java.security.Principal,java.util.List<EdalPermission>> getPermissionsImpl() throws PrimaryDataEntityException
Abstract function for implementation ofPrimaryDataEntity.getPermissions().- Specified by:
getPermissionsImplin classPrimaryDataEntity- Returns:
- an unmodifiable
Listcontaining allEdalPermission - Throws:
PrimaryDataEntityException- if unable to load all permissions.
-
getPrimaryDataEntityImpl
protected PrimaryDataEntity getPrimaryDataEntityImpl(java.lang.String name) throws PrimaryDataDirectoryException
Abstract function for the implementation ofPrimaryDataDirectory.getPrimaryDataEntity(String).- Specified by:
getPrimaryDataEntityImplin classPrimaryDataDirectory- Parameters:
name- name of thePrimaryDataEntityin thisPrimaryDataDirectory.- Returns:
- the found
PrimaryDataEntityobject. - Throws:
PrimaryDataDirectoryException- if no suchPrimaryDataEntityexists.
-
getVersionList
protected java.util.SortedSet<PrimaryDataEntityVersionImplementation> getVersionList()
Getter for the fieldversionList.- Returns:
- a
SortedSetobject.
-
getVersionsImpl
protected java.util.SortedSet<PrimaryDataEntityVersion> getVersionsImpl()
Abstract function for implementation ofPrimaryDataEntity.getVersions().- Specified by:
getVersionsImplin classPrimaryDataEntity- Returns:
- an unmodifiable
SortedSetcontaining allPrimaryDataEntity.
-
listPrimaryDataEntitiesImpl
protected java.util.List<PrimaryDataEntity> listPrimaryDataEntitiesImpl(java.util.Calendar currentVersionDate, java.util.Calendar nextVersionDate) throws PrimaryDataDirectoryException
Abstract function for the implementation ofPrimaryDataDirectory.listPrimaryDataEntities().- Specified by:
listPrimaryDataEntitiesImplin classPrimaryDataDirectory- Parameters:
currentVersionDate- the date of the currentPrimaryDataEntityVersionnextVersionDate- the date of the nextPrimaryDataEntityVersion- Returns:
- a
Listcontaining allPrimaryDataEntity - Throws:
PrimaryDataDirectoryException- if unable to load allPrimaryDataEntityobjects in thisPrimaryDataDirectory.
-
moveImpl
protected void moveImpl(PrimaryDataDirectory destinationDirectory)
Abstract function for implementation ofPrimaryDataEntity.move(PrimaryDataDirectory).- Specified by:
moveImplin classPrimaryDataEntity- Parameters:
destinationDirectory- the newPrimaryDataDirectoryfor thisPrimaryDataEntity.
-
searchByDublinCoreElementImpl
protected java.util.List<PrimaryDataEntity> searchByDublinCoreElementImpl(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
Abstract function for implementation ofPrimaryDataDirectory.searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean).- Specified by:
searchByDublinCoreElementImplin classPrimaryDataDirectory- Parameters:
element- theEnumDublinCoreElementsfor querydata-UntypedDataparameter for searchfuzzy-true: exact search;false: fuzzy searchrecursiveIntoSubdirectories-true: include also all sub directories recursively;false: search only in the currentPrimaryDataDirectoryobject- Returns:
- an unmodifiable
ListofPrimaryDataEntitythat match the parameter - Throws:
PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.
-
searchByKeywordImpl
protected java.util.List<? extends PrimaryDataEntity> searchByKeywordImpl(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
Description copied from class:PrimaryDataDirectoryAbstract function for the implementation ofPrimaryDataDirectory.searchByKeyword(String, boolean, boolean)- Specified by:
searchByKeywordImplin classPrimaryDataDirectory- 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.
-
searchByMetaDataImpl
protected java.util.List<PrimaryDataEntity> searchByMetaDataImpl(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException, MetaDataException
Abstract function for implementation ofPrimaryDataDirectory.searchByMetaData(MetaData, boolean, boolean).- Specified by:
searchByMetaDataImplin classPrimaryDataDirectory- Parameters:
query- aMetaDataobject.fuzzy-true: fuzzy search;false: exact searchrecursiveIntoSubdirectories-true: include also all subPrimaryDataDirectoryrecursively;falsesearch only in the currentPrimaryDataDirectoryobject- Returns:
- a unmodifiable
ListofPrimaryDataEntitythat match theMetaDataparameter - Throws:
PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.MetaDataException- if there are non valid values for someMetaDataelements.
-
searchByPublicationStatusImpl
protected java.util.List<? extends PrimaryDataEntity> searchByPublicationStatusImpl(PublicationStatus publicationStatus) throws PrimaryDataDirectoryException
Abstract function for the implementation ofPrimaryDataDirectory.searchByPublicationStatus(PublicationStatus).- Specified by:
searchByPublicationStatusImplin classPrimaryDataDirectory- Parameters:
publicationStatus- thePublicationStatusof the searchedPrimaryDataEntity.- Returns:
- a
Listof allPrimaryDataEntitywith aPublicReference. - Throws:
PrimaryDataDirectoryException- if unable to search forPublicationStatus
-
setVersionList
protected void setVersionList(java.util.SortedSet<PrimaryDataEntityVersionImplementation> versionList)
Setter for the fieldversionList.- Parameters:
versionList- aSortedSetobject.
-
storeVersion
protected void storeVersion(PrimaryDataEntityVersion publicVersion) throws PrimaryDataEntityVersionException
Abstract function for storing a newPrimaryDataEntityVersionfor anPrimaryDataEntityobject.- Specified by:
storeVersionin classPrimaryDataEntity- Parameters:
publicVersion- the newPrimaryDataEntityVersionto store.- Throws:
PrimaryDataEntityVersionException- if unable to storePrimaryDataEntityVersion.
-
-