public abstract class PrimaryDataDirectory extends PrimaryDataEntity
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEPARATOR
The standard path separator
|
| Modifier | Constructor and Description |
|---|---|
protected |
PrimaryDataDirectory()
Constructor for PrimaryDataDirectory.
|
protected |
PrimaryDataDirectory(PrimaryDataDirectory path,
String name)
Constructor for PrimaryDataDirectory.
|
| Modifier and Type | Method and Description |
|---|---|
PrimaryDataDirectory |
createPrimaryDataDirectory(String path)
Create an new sub
PrimaryDataDirectory in the current
PrimaryDataDirectory . |
PrimaryDataFile |
createPrimaryDataFile(String name)
Create an new
PrimaryDataFile in the current
PrimaryDataDirectory using the same implementation as this
PrimaryDataDirectory . |
boolean |
exist(String path)
Check if a
PrimaryDataEntity exists with the same path in this
PrimaryDataDirectory . |
protected abstract boolean |
existImpl(String path)
Abstract function for implementation of
exist(String) |
List<PrimaryDataEntity> |
getAllPublishedEntities()
Convenience and free function to get only
PrimaryDataEntitys with
published PublicReference objects. |
PrimaryDataEntity |
getPrimaryDataEntity(String name)
Get a specified
PrimaryDataEntity in this
PrimaryDataDirectory by name. |
protected abstract PrimaryDataEntity |
getPrimaryDataEntityImpl(String name)
Abstract function for the implementation of
getPrimaryDataEntity(String). |
static PrimaryDataDirectory |
getRootDirectory(List<Class<? extends Principal>> supportedPrincipals)
The initial step to connect to a EDAL file service.
|
List<PrimaryDataEntity> |
listPrimaryDataEntities()
|
protected abstract List<PrimaryDataEntity> |
listPrimaryDataEntitiesImpl(Calendar currentVersionDate,
Calendar nextVersionDate)
Abstract function for the implementation of
listPrimaryDataEntities(). |
List<PrimaryDataEntity> |
searchByDublinCoreElement(EnumDublinCoreElements element,
UntypedData data,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
A convenience method for search only for a specific
EnumDublinCoreElements and UntypedData in this
PrimaryDataDirectory. |
protected abstract List<PrimaryDataEntity> |
searchByDublinCoreElementImpl(EnumDublinCoreElements element,
UntypedData data,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
Abstract function for implementation of
searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean)
. |
List<PrimaryDataEntity> |
searchByKeyword(String keyword,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
Function to get all
PrimaryDataEntitys containing the keyword. |
protected abstract List<? extends PrimaryDataEntity> |
searchByKeywordImpl(String keyword,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
Abstract function for the implementation of
searchByKeyword(String, boolean, boolean) |
List<PrimaryDataEntity> |
searchByMetaData(MetaData query,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
The method search in the current
PrimaryDataDirectory by
MetaData. |
protected abstract List<PrimaryDataEntity> |
searchByMetaDataImpl(MetaData query,
boolean fuzzy,
boolean recursiveIntoSubdirectories)
Abstract function for implementation of
searchByMetaData(MetaData, boolean, boolean)
. |
List<PrimaryDataEntity> |
searchByPublicationStatus(PublicationStatus publicationStatus)
|
protected abstract List<? extends PrimaryDataEntity> |
searchByPublicationStatusImpl(PublicationStatus publicationStatus)
Abstract function for the implementation of
searchByPublicationStatus(PublicationStatus)
. |
void |
setMetaData(MetaData newMetadata)
Setter for the
MetaData object of this PrimaryDataEntity
object. |
addPublicReference, commitVersion, compareTo, delete, equals, getCurrentVersion, getID, getImplementationProvider, getMetaData, getName, getParentDirectory, getPath, getPermissions, getPermissionsImpl, getPublicReferences, getSubject, getVersionByDate, getVersionByRevisionNumber, getVersions, getVersionsImpl, grantPermission, hashCode, isDirectory, move, moveImpl, reloadOldDataType, rename, revokePermission, setCurrentVersion, setDefaultPermissions, setID, setParentDirectory, storeVersion, switchCurrentVersion, toStringpublic static final String PATH_SEPARATOR
protected PrimaryDataDirectory()
protected PrimaryDataDirectory(PrimaryDataDirectory path, String name) throws PrimaryDataEntityVersionException, PrimaryDataDirectoryException, MetaDataException
path - a PrimaryDataDirectory object.name - a String object.PrimaryDataEntityVersionException - if can not set current PrimaryDataEntityVersion.PrimaryDataDirectoryException - if no parent PrimaryDataDirectory is found.MetaDataException - if unable to set the MetaData object of the
PrimaryDataDirectory.public static PrimaryDataDirectory getRootDirectory(List<Class<? extends Principal>> supportedPrincipals) throws PrimaryDataDirectoryException
NOTE: no PrimaryDataObject can be accessed outside a root directory object !
PrimaryDataDirectory object, which is a
container for access all managed PrimaryDataEntity
objectsPrimaryDataDirectoryException - if unable to mount system.public PrimaryDataDirectory createPrimaryDataDirectory(String path) throws PrimaryDataDirectoryException
PrimaryDataDirectory in the current
PrimaryDataDirectory .
NOTE: It is not allowed to create a new sub
PrimaryDataDirectory
when the currentVersion of this
PrimaryDataDirectory
is marked as deleted !
NOTE: It is not allowed to create a new sub
PrimaryDataDirectory
when there is already a PrimaryDataEntity
with the same name !
path - the name of the new PrimaryDataDirectory.PrimaryDataDirectory object.null if failedPrimaryDataDirectoryException - if the current PrimaryDataEntityVersion of this
PrimaryDataDirectory is marked as deleted or if there
is already a PrimaryDataEntity with the same name.public PrimaryDataFile createPrimaryDataFile(String name) throws PrimaryDataDirectoryException
PrimaryDataFile in the current
PrimaryDataDirectory using the same implementation as this
PrimaryDataDirectory .
NOTE: It is not allowed to create a new PrimaryDataFile when the currentVersion of this PrimaryDataDirectory is marked as deleted !
NOTE: It is not allowed to create a new PrimaryDataFile when there is already a PrimaryDataEntity with the same name !
name - of the new PrimaryDataFile object.PrimaryDataFile.null if failedPrimaryDataDirectoryException - if the current PrimaryDataEntityVersion of this
PrimaryDataDirectory is marked as deleted or if there
is already a PrimaryDataEntity with the same name.public boolean exist(String path) throws PrimaryDataDirectoryException
PrimaryDataEntity exists with the same path in this
PrimaryDataDirectory .path - the name of the PrimaryDataEntity to check.true if there is already a PrimartyDataEntity with
the same path;false otherwisePrimaryDataDirectoryException - if unable to load all PrimaryDataEntity objects in
this PrimaryDataDirectory to check if the name
already exists.protected abstract boolean existImpl(String path) throws PrimaryDataDirectoryException
exist(String)path - the name of the PrimaryDataEntity to check.true if there is already a PrimartyDataEntity with
the same path;false otherwisePrimaryDataDirectoryException - if unable to load all PrimaryDataEntity objects in
this PrimaryDataDirectory to check if the name
already exists.public List<PrimaryDataEntity> getAllPublishedEntities() throws PrimaryDataDirectoryException
PrimaryDataEntitys with
published PublicReference objects.List of all PrimaryDataEntity with a
PublicReference.PrimaryDataDirectoryException - if unable to load objcts.public PrimaryDataEntity getPrimaryDataEntity(String name) throws PrimaryDataDirectoryException
PrimaryDataEntity in this
PrimaryDataDirectory by name.name - name of the PrimaryDataEntity in this
PrimaryDataDirectory.PrimaryDataEntity object.PrimaryDataDirectoryException - if no such PrimaryDataEntity exists.protected abstract PrimaryDataEntity getPrimaryDataEntityImpl(String name) throws PrimaryDataDirectoryException
getPrimaryDataEntity(String).name - name of the PrimaryDataEntity in this
PrimaryDataDirectory.PrimaryDataEntity object.PrimaryDataDirectoryException - if no such PrimaryDataEntity exists.public List<PrimaryDataEntity> listPrimaryDataEntities() throws PrimaryDataDirectoryException
List containing all PrimaryDataEntityPrimaryDataDirectoryException - if unable to load all PrimaryDataEntity objects in
this PrimaryDataDirectory.protected abstract List<PrimaryDataEntity> listPrimaryDataEntitiesImpl(Calendar currentVersionDate, Calendar nextVersionDate) throws PrimaryDataDirectoryException
listPrimaryDataEntities().currentVersionDate - nextVersionDate - List containing all PrimaryDataEntityPrimaryDataDirectoryException - if unable to load all PrimaryDataEntity objects in
this PrimaryDataDirectory.public List<PrimaryDataEntity> searchByDublinCoreElement(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
EnumDublinCoreElements and UntypedData in this
PrimaryDataDirectory.
The caller function ensure that the result is an unmodifiable
List containing all found PrimaryDataEntity objectselement - the EnumDublinCoreElements 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 current.
PrimaryDataDirectory objectList of PrimaryDataEntity that
match the parameter.PrimaryDataDirectoryException - if unable to find PrimaryDataEntity object or if
there are too much results.protected abstract List<PrimaryDataEntity> searchByDublinCoreElementImpl(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean)
.element - the EnumDublinCoreElements for querydata - UntypedData parameter for searchfuzzy - true: exact search; false: fuzzy
searchrecursiveIntoSubdirectories - true: include also all sub directories
recursively; false: search only in the current
PrimaryDataDirectory objectList of PrimaryDataEntity that
match the parameterPrimaryDataDirectoryException - if unable to find PrimaryDataEntity object or if
there are too much results.public final List<PrimaryDataEntity> searchByMetaData(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException, MetaDataException
PrimaryDataDirectory by
MetaData.query - a MetaData object for query.fuzzy - true: fuzzy search;false: exact search.recursiveIntoSubdirectories - true: include also all sub
PrimaryDataDirectory recursively;false search only in the current
PrimaryDataDirectory object.List of PrimaryDataEntity that
match the MetaData parameter.PrimaryDataDirectoryException - if unable to find PrimaryDataEntity object or if
there are too much results.MetaDataException - if there are non valid values for some MetaData
elements.protected abstract List<PrimaryDataEntity> searchByMetaDataImpl(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException, MetaDataException
searchByMetaData(MetaData, boolean, boolean)
.query - a MetaData object.fuzzy - true: fuzzy search; false: exact
searchrecursiveIntoSubdirectories - true: include also all sub
PrimaryDataDirectory recursively; false
search only in the current PrimaryDataDirectory objectList of PrimaryDataEntity that
match the MetaData parameterPrimaryDataDirectoryException - if unable to find PrimaryDataEntity object or if
there are too much results.MetaDataException - if there are non valid values for some MetaData
elements.public List<PrimaryDataEntity> searchByPublicationStatus(PublicationStatus publicationStatus) throws PrimaryDataDirectoryException
PrimaryDataEntitys in this
PrimaryDataDirectory, which have a PublicReference.
Filtered by the PublicationStatus.publicationStatus - the PublicationStatus of the searched
PrimaryDataEntity.List of all PrimaryDataEntity with a
PublicReference.PrimaryDataDirectoryException - if unable to search for PublicationStatusprotected abstract List<? extends PrimaryDataEntity> searchByPublicationStatusImpl(PublicationStatus publicationStatus) throws PrimaryDataDirectoryException
searchByPublicationStatus(PublicationStatus)
.publicationStatus - the PublicationStatus of the searched
PrimaryDataEntity.List of all PrimaryDataEntity with a
PublicReference.PrimaryDataDirectoryException - if unable to search for PublicationStatuspublic List<PrimaryDataEntity> searchByKeyword(String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
PrimaryDataEntitys containing the keyword.keyword - the term to search over all elements.fuzzy - true: fuzzy search; false: exact
searchrecursiveIntoSubdirectories - true: include also all sub
PrimaryDataDirectory recursively; false
search only in the current PrimaryDataDirectory objectList of PrimaryDataEntity that
match the keyword.PrimaryDataDirectoryException - if unable to search for the keyword.protected abstract List<? extends PrimaryDataEntity> searchByKeywordImpl(String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories) throws PrimaryDataDirectoryException
searchByKeyword(String, boolean, boolean)keyword - the term to search over all elements.fuzzy - true: fuzzy search; false: exact
searchrecursiveIntoSubdirectories - true: include also all sub
PrimaryDataDirectory recursively; false
search only in the current PrimaryDataDirectory objectList of PrimaryDataEntity that
match the keyword.PrimaryDataDirectoryException - if unable to search for the keyword.public void setMetaData(MetaData newMetadata) throws PrimaryDataEntityVersionException, MetaDataException
MetaData object of this PrimaryDataEntity
object.
Create a new PrimaryDataEntityVersion with a new MetaData
set.
Check before if the EnumDublinCoreElements.TYPE is a
MetaData.DIRECTORY object.
Check before if the EnumDublinCoreElements.FORMAT is a
MetaData.EMPTY object.
setMetaData in class PrimaryDataEntitynewMetadata - the new MetaData object to set.PrimaryDataEntityVersionException - if unable to store PrimaryDataEntityVersion.MetaDataException - if there are non valid value for element in the
MetaData object.Copyright © 2015 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.