Class PublicReference
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.PublicReference
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PublicReferenceImplementation
public class PublicReference extends java.lang.Object implements java.io.SerializableProvide a public, long term stable ID for data referencing.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistentIdentifieridentifierType
-
Constructor Summary
Constructors Modifier Constructor Description protectedPublicReference()Default constructor, only for internal use.protectedPublicReference(PrimaryDataEntityVersion entityVersion, PersistentIdentifier identifierType)Constructor generate a newPublicReferenceobject and use the class that belongs to thePersistentIdentifier.
-
Method Summary
Modifier and Type Method Description voidchangeReleaseDate(java.util.Calendar releaseDate)booleanequals(java.lang.Object obj)java.util.CalendargetAcceptedDate()Getter for the accepted Date of thisPublicReferencejava.lang.StringgetAssignedID()java.util.CalendargetCreationDate()Getter for the creation Date of thisPublicReferencePersistentIdentifiergetIdentifierType()Getter for thePersistentIdentifierof thisPublicReference.java.lang.StringgetInternalID()PublicationStatusgetPublicationStatus()Function to check the publication status of thisPublicReference.ReferenceablegetReferencable()Getter for theReferenceabletype of thisPublicReference:java.util.CalendargetRejectedDate()Getter for the rejected Date of thisPublicReferencejava.util.CalendargetReleaseDate()java.util.CalendargetRequestedDate()Getter for the requested Date of thisPublicReferencejava.security.PrincipalgetRequestedPrincipal()Get thePrincipalof the person, who requested thisPublicReference.PrimaryDataEntityVersiongetVersion()Getter for thePrimaryDataEntityVersionof thisPublicReference.inthashCode()booleanisPublic()Getter for theisPublicfield.protected voidsetAcceptedDate(java.util.Calendar acceptedDate)Setter for the accepted date of thisPublicReference.protected voidsetAssignedID(java.lang.String assignedID)protected voidsetCreationDate(java.util.Calendar creationDate)Setter for the creation date of thisPublicReference.protected voidsetInternalID(java.lang.String internalID)voidsetPublic(javax.mail.internet.InternetAddress emailNotificationAddress)Setter for theisPublicfield and use the default Workgroup.voidsetPublic(javax.mail.internet.InternetAddress emailNotificationAddress, java.util.Calendar releaseDate)Setter for theisPublicfield.protected voidsetPublicationStatus(PublicationStatus publicationStatus)Internal setter for thePublicationStatusof this PublicReference.protected voidsetRejectedDate(java.util.Calendar rejectedDate)Setter for the rejected date of thisPublicReference.protected voidsetReleaseDate(java.util.Calendar releaseDate)protected voidsetRequestedDate(java.util.Calendar requestedDate)Setter for the requested date of thisPublicReference.protected voidsetRequestedPrincipal(java.security.Principal requestedPrincipal)Setter for thePrincipalthat requested thisPublicReference.voidsetVersion(PrimaryDataEntityVersion version)Setter for thePrimaryDataEntityVersionof thisPublicReference.java.lang.StringtoString()
-
-
-
Field Detail
-
identifierType
protected PersistentIdentifier identifierType
-
-
Constructor Detail
-
PublicReference
protected PublicReference()
Default constructor, only for internal use.
-
PublicReference
protected PublicReference(PrimaryDataEntityVersion entityVersion, PersistentIdentifier identifierType) throws EdalException
Constructor generate a newPublicReferenceobject and use the class that belongs to thePersistentIdentifier. Before creating a newPublicReferenceobject the constructor calls theReferenceable.validateMetaData(PrimaryDataEntityVersion)method.- Parameters:
entityVersion- the currentPrimaryDataEntityVersionfor thisPublicReference.identifierType- the type of thePublicReference.- Throws:
EdalException- if unable to create newPublicReference.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getAcceptedDate
public java.util.Calendar getAcceptedDate()
Getter for the accepted Date of thisPublicReference- Returns:
- the accepted date or null if the
PublicReferencewas not yet accepted.
-
getAssignedID
public java.lang.String getAssignedID() throws PublicReferenceException- Returns:
- the assignedID
- Throws:
PublicReferenceException- if no ID set
-
getCreationDate
public java.util.Calendar getCreationDate()
Getter for the creation Date of thisPublicReference- Returns:
- the creation date.
-
getIdentifierType
public PersistentIdentifier getIdentifierType()
Getter for thePersistentIdentifierof thisPublicReference.- Returns:
- the
PersistentIdentifierto thisPublicReference.
-
getPublicationStatus
public PublicationStatus getPublicationStatus()
Function to check the publication status of thisPublicReference.- Returns:
- the current status of the publication process of this
PublicReference.
-
getReferencable
public Referenceable getReferencable() throws EdalException
Getter for theReferenceabletype of thisPublicReference:- Returns:
- the corresponding
Referenceableobject. - Throws:
EdalException- if unable to load theReferenceableclass.
-
getRejectedDate
public java.util.Calendar getRejectedDate()
Getter for the rejected Date of thisPublicReference- Returns:
- the rejected date or null if the
PublicReferencewas not yet rejected.
-
getRequestedDate
public java.util.Calendar getRequestedDate()
Getter for the requested Date of thisPublicReference- Returns:
- the requested date or null if the
PublicReferencewas not yet requested.
-
getRequestedPrincipal
public java.security.Principal getRequestedPrincipal()
Get thePrincipalof the person, who requested thisPublicReference.- Returns:
- the
Principalthat requested thisPublicReference.
-
getVersion
public PrimaryDataEntityVersion getVersion()
Getter for thePrimaryDataEntityVersionof thisPublicReference.- Returns:
- the
PrimaryDataEntityVersionto thisPublicReference.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isPublic
public boolean isPublic()
Getter for theisPublicfield. Convenience function for external use.- Returns:
- the
isPublicfield.
-
setAcceptedDate
protected void setAcceptedDate(java.util.Calendar acceptedDate)
Setter for the accepted date of thisPublicReference.- Parameters:
acceptedDate- the date to set.
-
setAssignedID
protected void setAssignedID(java.lang.String assignedID)
- Parameters:
assignedID- the assignedID to set
-
setCreationDate
protected void setCreationDate(java.util.Calendar creationDate)
Setter for the creation date of thisPublicReference.- Parameters:
creationDate- theDateto set as creation date.
-
setPublic
public void setPublic(javax.mail.internet.InternetAddress emailNotificationAddress, java.util.Calendar releaseDate) throws PublicReferenceExceptionSetter for theisPublicfield. Convenience function for external use.- Parameters:
emailNotificationAddress- the address for email notificationsreleaseDate- the release date- Throws:
PublicReferenceException- if unable to request thisPublicReferenceto set public.
-
setPublic
public void setPublic(javax.mail.internet.InternetAddress emailNotificationAddress) throws PublicReferenceExceptionSetter for theisPublicfield and use the default Workgroup. Convenience function for external use.- Parameters:
emailNotificationAddress- the address for email notifications- Throws:
PublicReferenceException- if unable to request thisPublicReferenceto set public.
-
setRejectedDate
protected void setRejectedDate(java.util.Calendar rejectedDate)
Setter for the rejected date of thisPublicReference.- Parameters:
rejectedDate- the date to set.
-
setRequestedDate
protected void setRequestedDate(java.util.Calendar requestedDate)
Setter for the requested date of thisPublicReference.- Parameters:
requestedDate- theDateto set as requested Date.
-
setRequestedPrincipal
protected void setRequestedPrincipal(java.security.Principal requestedPrincipal)
Setter for thePrincipalthat requested thisPublicReference.- Parameters:
requestedPrincipal- thePrincipalto set.
-
setVersion
public void setVersion(PrimaryDataEntityVersion version)
Setter for thePrimaryDataEntityVersionof thisPublicReference.- Parameters:
version- thePrimaryDataEntityVersionto set.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setPublicationStatus
protected void setPublicationStatus(PublicationStatus publicationStatus)
Internal setter for thePublicationStatusof this PublicReference.- Parameters:
publicationStatus- the publicationStatus to set
-
getInternalID
public java.lang.String getInternalID()
- Returns:
- the internalID
-
setInternalID
protected void setInternalID(java.lang.String internalID)
- Parameters:
internalID- the internalID to set
-
getReleaseDate
public java.util.Calendar getReleaseDate()
- Returns:
- the releaseDate
-
setReleaseDate
protected void setReleaseDate(java.util.Calendar releaseDate)
- Parameters:
releaseDate- the releaseDate to set
-
changeReleaseDate
public void changeReleaseDate(java.util.Calendar releaseDate)
-
-