public class PrimaryDataEntityVersion extends Object implements Comparable<PrimaryDataEntityVersion>, Serializable
PrimaryDataEntity| Modifier | Constructor and Description |
|---|---|
protected |
PrimaryDataEntityVersion()
non public constructor for internal use only
|
protected |
PrimaryDataEntityVersion(PrimaryDataEntity entity,
boolean delete,
MetaData metadata)
Construct a new
PrimaryDataEntityVersion for a
PrimaryDataEntity. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPublicReference(PersistentIdentifier identifierType,
PrimaryDataEntity entity) |
int |
compareTo(PrimaryDataEntityVersion o)
Compares by
revision |
Calendar |
getCreationDate()
Getter for the field
creationDate. |
PrimaryDataEntity |
getEntity()
Getter for the field
entity. |
MetaData |
getMetaData()
Getter for the
MetaData of this PrimaryDataEntityVersion. |
String |
getName()
Convenience function to get the
EnumDublinCoreElements.TITLE of
the MetaData object |
Principal |
getOwner() |
PublicReference |
getPublicReference(PersistentIdentifier identifierType)
Return a specific PublicReference defined by the
PersistentIdentifier type. |
List<PublicReference> |
getPublicReferences() |
long |
getRevision()
Getter for the field
revision. |
Calendar |
getRevisionDate()
Getter for the field
revisionDate. |
URL |
getURL()
|
boolean |
isDeleted()
Check if this
PrimaryDataEntityVersion is marked as deleted. |
void |
setAllReferencesPublic(javax.mail.internet.InternetAddress emailNotificationAddress)
Set all
PublicReferences of this PrimaryDataEntityVersion
of this PrimaryDataEntity will be requested to set public without
lock date. |
void |
setAllReferencesPublic(javax.mail.internet.InternetAddress emailNotificationAddress,
Calendar releaseDate)
Set all
PublicReferences of this PrimaryDataEntityVersion
of this PrimaryDataEntity will be requested to set public. |
protected void |
setCreationDate(Calendar creationDate)
Setter for the field
creationDate. |
protected void |
setDeleted(boolean isDeleted)
Setter for the
isDeleted flag. |
protected void |
setEntity(PrimaryDataEntity entity)
Setter for the field
entity. |
protected void |
setMetaData(MetaData metadata)
Setter for the
MetaData of this PrimaryDataEntityVersion. |
protected void |
setOwner(Principal owner) |
protected void |
setPublicReferences(List<PublicReference> references) |
protected void |
setRevision(long revision)
Setter for the field
revision. |
protected void |
setRevisionDate(Calendar revisionDate)
Setter for the field
revisionDate. |
String |
toString() |
protected PrimaryDataEntityVersion()
protected PrimaryDataEntityVersion(PrimaryDataEntity entity, boolean delete, MetaData metadata) throws PrimaryDataEntityVersionException
PrimaryDataEntityVersion for a
PrimaryDataEntity.
Revision is increased from previous revision
- Parameters:
entity - the PrimaryDataEntity for this
PrimaryDataEntityVersion.delete - set this PrimaryDataEntityVersion to be deleted.metadata - the MetaData for this PrimaryDataEntityVersion
.
- Throws:
PrimaryDataEntityVersionException - if the last PrimaryDataEntityVersion is already
deleted.
-
Method Detail
-
addPublicReference
protected void addPublicReference(PersistentIdentifier identifierType,
PrimaryDataEntity entity)
throws PrimaryDataEntityException
- Throws:
PrimaryDataEntityException
-
compareTo
public int compareTo(PrimaryDataEntityVersion o)
Compares by revision
- Specified by:
compareTo in interface Comparable<PrimaryDataEntityVersion>
-
getCreationDate
public Calendar getCreationDate()
Getter for the field creationDate.
- Returns:
- the creationDate.
-
getEntity
public PrimaryDataEntity getEntity()
Getter for the field entity.
- Returns:
- entity.
-
getName
public final String getName()
Convenience function to get the EnumDublinCoreElements.TITLE of
the MetaData object
- Returns:
- the name of the
PrimaryDataEntityVersion from the
MetaData.
-
getMetaData
public MetaData getMetaData()
Getter for the MetaData of this PrimaryDataEntityVersion.
- Returns:
- the
MetaData of this PrimaryDataEntityVersion.
-
getPublicReference
public PublicReference getPublicReference(PersistentIdentifier identifierType)
throws PrimaryDataEntityVersionException
Return a specific PublicReference defined by the
PersistentIdentifier type.
- Parameters:
identifierType - of the PublicReference
- Returns:
- the found
PublicReference
- Throws:
PrimaryDataEntityVersionException - if there is no PublicReference with this
PersistentIdentifier defined.
-
getPublicReferences
public List<PublicReference> getPublicReferences()
- Returns:
- read only
List of PublicReference
-
getRevision
public long getRevision()
Getter for the field revision.
- Returns:
- the revision.
-
getRevisionDate
public Calendar getRevisionDate()
Getter for the field revisionDate.
- Returns:
- revisionDate.
-
getURL
public URL getURL()
throws PrimaryDataEntityException
- Returns:
- the
URL
- Throws:
PrimaryDataEntityException - if unable to load the URL.
-
isDeleted
public boolean isDeleted()
Check if this PrimaryDataEntityVersion is marked as deleted.
- Returns:
true if the PrimaryDataEntityVersion is
marked as deleted;false otherwise.
-
setAllReferencesPublic
public void setAllReferencesPublic(javax.mail.internet.InternetAddress emailNotificationAddress,
Calendar releaseDate)
throws PublicReferenceException
Set all PublicReferences of this PrimaryDataEntityVersion
of this PrimaryDataEntity will be requested to set public.
- Parameters:
emailNotificationAddress - the eMail address of the requesting user.releaseDate - the release date for the PublicReferences.
- Throws:
PublicReferenceException - if unable to request the PublicReference to set
public.
-
setAllReferencesPublic
public void setAllReferencesPublic(javax.mail.internet.InternetAddress emailNotificationAddress)
throws PublicReferenceException
Set all PublicReferences of this PrimaryDataEntityVersion
of this PrimaryDataEntity will be requested to set public without
lock date.
- Parameters:
emailNotificationAddress - the eMail address of the requesting user.
- Throws:
PublicReferenceException - if unable to request the PublicReference to set
public.
-
setCreationDate
protected void setCreationDate(Calendar creationDate)
Setter for the field creationDate.
- Parameters:
creationDate - the creationDate to set.
-
setDeleted
protected void setDeleted(boolean isDeleted)
Setter for the isDeleted flag.
- Parameters:
isDeleted - the isDeleted to set.
-
setEntity
protected void setEntity(PrimaryDataEntity entity)
Setter for the field entity.
- Parameters:
entity - the entity to set
-
setMetaData
protected void setMetaData(MetaData metadata)
Setter for the MetaData of this PrimaryDataEntityVersion.
- Parameters:
metadata - the MetaData to set.
-
setPublicReferences
protected void setPublicReferences(List<PublicReference> references)
-
setRevision
protected void setRevision(long revision)
Setter for the field revision.
- Parameters:
revision - the revision to set
-
setRevisionDate
protected void setRevisionDate(Calendar revisionDate)
Setter for the field revisionDate.
- Parameters:
revisionDate - the revisionDate to set.
-
getOwner
public Principal getOwner()
- Returns:
- the owner
-
setOwner
protected void setOwner(Principal owner)
- Parameters:
owner - the owner to set
Copyright © 2015 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.