@Entity public class PrimaryDataFileImplementation extends PrimaryDataFile
PrimaryDataFile.| Modifier | Constructor and Description |
|---|---|
protected |
PrimaryDataFileImplementation()
Default constructor for
PrimaryDataFileImplementation is necessary
for PojoInstantiator of HIBERNATE. |
|
PrimaryDataFileImplementation(PrimaryDataDirectory path,
java.lang.String name)
Constructor for PrimaryDataFileImplementation.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
existData()
Abstract function to check if the current
PrimaryDataEntityVersion of
this PrimaryDataFile has stored data. |
java.lang.String |
getID()
Getter for the ID of this
PrimaryDataEntity. |
PrimaryDataDirectoryImplementation |
getParentDirectory()
Getter for the parent
PrimaryDataDirectory of this
PrimaryDataEntity . |
protected java.nio.file.Path |
getPathToLocalFile(PrimaryDataEntityVersion version)
Load the
Path to the local stored file from the file system. |
protected java.util.Map<java.security.Principal,java.util.List<EdalPermission>> |
getPermissionsImpl()
Abstract function for implementation of
PrimaryDataEntity.getPermissions(). |
protected java.util.SortedSet<PrimaryDataEntityVersionImplementation> |
getVersionList()
Getter for the field
versionList. |
protected java.util.SortedSet<PrimaryDataEntityVersion> |
getVersionsImpl()
Abstract function for implementation of
PrimaryDataEntity.getVersions(). |
protected void |
moveImpl(PrimaryDataDirectory destinationDirectory)
Abstract function for implementation of
PrimaryDataEntity.move(PrimaryDataDirectory). |
protected void |
readImpl(java.io.OutputStream outputStream)
Abstract function for implementation the
PrimaryDataFile.read(OutputStream) function. |
protected void |
setVersionList(java.util.SortedSet<PrimaryDataEntityVersionImplementation> versionList)
Setter for the field
versionList. |
protected void |
storeImpl(java.io.InputStream inputStream,
PrimaryDataEntityVersion currentVersion)
Abstract function for implementation the
PrimaryDataFile.store(InputStream) function. |
protected void |
storeVersion(PrimaryDataEntityVersion publicVersion)
Abstract function for storing a new
PrimaryDataEntityVersion for
an PrimaryDataEntity object. |
read, setMetaData, storeaddPublicReference, 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, toStringprotected PrimaryDataFileImplementation()
PrimaryDataFileImplementation is necessary
for PojoInstantiator of HIBERNATE.public PrimaryDataFileImplementation(PrimaryDataDirectory path, java.lang.String name) throws PrimaryDataFileException, PrimaryDataEntityVersionException, PrimaryDataDirectoryException, MetaDataException
path - a PrimaryDataDirectory object.name - a String object.PrimaryDataFileException - if unable to set data type.PrimaryDataEntityVersionException - if unable to store initial version.PrimaryDataDirectoryException - if no parent PrimaryDataDirectory is found.MetaDataException - if the
MetaData
object of the parent PrimaryDataDirectory is not
clone-able.protected boolean existData()
PrimaryDataEntityVersion of
this PrimaryDataFile has stored data.existData in class PrimaryDataFiletrue if the current PrimaryDataEntityVersion has
stored data;false otherwise.public java.lang.String getID()
PrimaryDataEntity.
HIBERNATE : constant length cause it is an UUID
getID in class PrimaryDataEntityPrimaryDataEntityUUIDpublic PrimaryDataDirectoryImplementation getParentDirectory() throws PrimaryDataDirectoryException
PrimaryDataDirectory of this
PrimaryDataEntity .
NOTE: It is not allowed to access the parent PrimaryDataDirectory of the root PrimaryDataDirectory!
HIBERNATE : FetchType.EAGER for getPath()
getParentDirectory in class PrimaryDataEntityPrimaryDataDirectory of this
PrimaryDataEntity.PrimaryDataDirectoryException - if trying to access the parent PrimaryDataDirectory
of the root PrimaryDataDirectory.protected java.nio.file.Path getPathToLocalFile(PrimaryDataEntityVersion version)
Path to the local stored file from the file system.version - the version information to find the correct Path to the
local stored File.File.protected java.util.Map<java.security.Principal,java.util.List<EdalPermission>> getPermissionsImpl() throws PrimaryDataEntityException
PrimaryDataEntity.getPermissions().getPermissionsImpl in class PrimaryDataEntityList containing all
EdalPermissionPrimaryDataEntityException - if unable to load all permissions.protected java.util.SortedSet<PrimaryDataEntityVersionImplementation> getVersionList()
versionList.SortedSet object.protected java.util.SortedSet<PrimaryDataEntityVersion> getVersionsImpl()
PrimaryDataEntity.getVersions().getVersionsImpl in class PrimaryDataEntitySortedSet containing all
PrimaryDataEntity.protected void moveImpl(PrimaryDataDirectory destinationDirectory)
PrimaryDataEntity.move(PrimaryDataDirectory).moveImpl in class PrimaryDataEntitydestinationDirectory - the new PrimaryDataDirectory for this
PrimaryDataEntity.protected void readImpl(java.io.OutputStream outputStream)
throws PrimaryDataFileException
PrimaryDataFile.read(OutputStream) function.readImpl in class PrimaryDataFileoutputStream - the loaded data.PrimaryDataFileException - if no data is stored.protected void setVersionList(java.util.SortedSet<PrimaryDataEntityVersionImplementation> versionList)
versionList.versionList - a SortedSet object.protected void storeImpl(java.io.InputStream inputStream,
PrimaryDataEntityVersion currentVersion)
throws PrimaryDataFileException
PrimaryDataFile.store(InputStream) function.storeImpl in class PrimaryDataFileinputStream - the data to store in this PrimaryDataEntityVersioncurrentVersion - the new PrimaryDataEntityVersion to storePrimaryDataFileException - if storing of data failsprotected void storeVersion(PrimaryDataEntityVersion publicVersion) throws PrimaryDataEntityVersionException
PrimaryDataEntityVersion for
an PrimaryDataEntity object.storeVersion in class PrimaryDataEntitypublicVersion - the new PrimaryDataEntityVersion to store.PrimaryDataEntityVersionException - if unable to store PrimaryDataEntityVersion.