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.Serializable
Provide a public, long term stable ID for data referencing.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistentIdentifier
identifierType
-
Constructor Summary
Constructors Modifier Constructor Description protected
PublicReference()
Default constructor, only for internal use.protected
PublicReference(PrimaryDataEntityVersion entityVersion, PersistentIdentifier identifierType)
Constructor generate a newPublicReference
object and use the class that belongs to thePersistentIdentifier
.
-
Method Summary
Modifier and Type Method Description void
changeReleaseDate(java.util.Calendar releaseDate)
boolean
equals(java.lang.Object obj)
java.util.Calendar
getAcceptedDate()
Getter for the accepted Date of thisPublicReference
java.lang.String
getAssignedID()
java.util.Calendar
getCreationDate()
Getter for the creation Date of thisPublicReference
PersistentIdentifier
getIdentifierType()
Getter for thePersistentIdentifier
of thisPublicReference
.java.lang.String
getInternalID()
PublicationStatus
getPublicationStatus()
Function to check the publication status of thisPublicReference
.Referenceable
getReferencable()
Getter for theReferenceable
type of thisPublicReference
:java.util.Calendar
getRejectedDate()
Getter for the rejected Date of thisPublicReference
java.util.Calendar
getReleaseDate()
java.util.Calendar
getRequestedDate()
Getter for the requested Date of thisPublicReference
java.security.Principal
getRequestedPrincipal()
Get thePrincipal
of the person, who requested thisPublicReference
.PrimaryDataEntityVersion
getVersion()
Getter for thePrimaryDataEntityVersion
of thisPublicReference
.int
hashCode()
boolean
isPublic()
Getter for theisPublic
field.protected void
setAcceptedDate(java.util.Calendar acceptedDate)
Setter for the accepted date of thisPublicReference
.protected void
setAssignedID(java.lang.String assignedID)
protected void
setCreationDate(java.util.Calendar creationDate)
Setter for the creation date of thisPublicReference
.protected void
setInternalID(java.lang.String internalID)
void
setPublic(javax.mail.internet.InternetAddress emailNotificationAddress)
Setter for theisPublic
field and use the default Workgroup.void
setPublic(javax.mail.internet.InternetAddress emailNotificationAddress, java.util.Calendar releaseDate)
Setter for theisPublic
field.protected void
setPublicationStatus(PublicationStatus publicationStatus)
Internal setter for thePublicationStatus
of this PublicReference.protected void
setRejectedDate(java.util.Calendar rejectedDate)
Setter for the rejected date of thisPublicReference
.protected void
setReleaseDate(java.util.Calendar releaseDate)
protected void
setRequestedDate(java.util.Calendar requestedDate)
Setter for the requested date of thisPublicReference
.protected void
setRequestedPrincipal(java.security.Principal requestedPrincipal)
Setter for thePrincipal
that requested thisPublicReference
.void
setVersion(PrimaryDataEntityVersion version)
Setter for thePrimaryDataEntityVersion
of thisPublicReference
.java.lang.String
toString()
-
-
-
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 newPublicReference
object and use the class that belongs to thePersistentIdentifier
. Before creating a newPublicReference
object the constructor calls theReferenceable.validateMetaData(PrimaryDataEntityVersion)
method.- Parameters:
entityVersion
- the currentPrimaryDataEntityVersion
for thisPublicReference
.identifierType
- the type of thePublicReference
.- Throws:
EdalException
- if unable to create newPublicReference
.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getAcceptedDate
public java.util.Calendar getAcceptedDate()
Getter for the accepted Date of thisPublicReference
- Returns:
- the accepted date or null if the
PublicReference
was 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 thePersistentIdentifier
of thisPublicReference
.- Returns:
- the
PersistentIdentifier
to 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 theReferenceable
type of thisPublicReference
:- Returns:
- the corresponding
Referenceable
object. - Throws:
EdalException
- if unable to load theReferenceable
class.
-
getRejectedDate
public java.util.Calendar getRejectedDate()
Getter for the rejected Date of thisPublicReference
- Returns:
- the rejected date or null if the
PublicReference
was not yet rejected.
-
getRequestedDate
public java.util.Calendar getRequestedDate()
Getter for the requested Date of thisPublicReference
- Returns:
- the requested date or null if the
PublicReference
was not yet requested.
-
getRequestedPrincipal
public java.security.Principal getRequestedPrincipal()
Get thePrincipal
of the person, who requested thisPublicReference
.- Returns:
- the
Principal
that requested thisPublicReference
.
-
getVersion
public PrimaryDataEntityVersion getVersion()
Getter for thePrimaryDataEntityVersion
of thisPublicReference
.- Returns:
- the
PrimaryDataEntityVersion
to thisPublicReference
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isPublic
public boolean isPublic()
Getter for theisPublic
field. Convenience function for external use.- Returns:
- the
isPublic
field.
-
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
- theDate
to set as creation date.
-
setPublic
public void setPublic(javax.mail.internet.InternetAddress emailNotificationAddress, java.util.Calendar releaseDate) throws PublicReferenceException
Setter for theisPublic
field. Convenience function for external use.- Parameters:
emailNotificationAddress
- the address for email notificationsreleaseDate
- the release date- Throws:
PublicReferenceException
- if unable to request thisPublicReference
to set public.
-
setPublic
public void setPublic(javax.mail.internet.InternetAddress emailNotificationAddress) throws PublicReferenceException
Setter for theisPublic
field and use the default Workgroup. Convenience function for external use.- Parameters:
emailNotificationAddress
- the address for email notifications- Throws:
PublicReferenceException
- if unable to request thisPublicReference
to 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
- theDate
to set as requested Date.
-
setRequestedPrincipal
protected void setRequestedPrincipal(java.security.Principal requestedPrincipal)
Setter for thePrincipal
that requested thisPublicReference
.- Parameters:
requestedPrincipal
- thePrincipal
to set.
-
setVersion
public void setVersion(PrimaryDataEntityVersion version)
Setter for thePrimaryDataEntityVersion
of thisPublicReference
.- Parameters:
version
- thePrimaryDataEntityVersion
to set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setPublicationStatus
protected void setPublicationStatus(PublicationStatus publicationStatus)
Internal setter for thePublicationStatus
of 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)
-
-