Class DCMIPeriod

java.lang.Object
org.opencastproject.metadata.dublincore.DCMIPeriod

public final class DCMIPeriod extends Object
A time interval, representing a DCMI period. They may be open.

For further information on DCMI periods please refer to http://dublincore.org/documents/dcmi-period/.

  • Constructor Details

    • DCMIPeriod

      public DCMIPeriod(Date start, Date end)
      Create a new period. To create an open interval you may set one of the boundaries null.
    • DCMIPeriod

      public DCMIPeriod(Date start, Date end, String name)
      Create a new period with an optional name. To create an open interval you may set one of the bounbaries null.
  • Method Details

    • getStart

      public Date getStart()
      Returns the start date of the period or null, if it has only an upper bound.
    • getEnd

      public Date getEnd()
      Returns the end date of the period or null, if it has only a lower bound.
    • getName

      public String getName()
      Returns the optional name of the period.
      Returns:
      the name of the period or null
    • isClosed

      public boolean isClosed()
      Checks if the interval is closed.
    • hasStart

      public boolean hasStart()
      Checks if the interval has a start boundary.
    • hasEnd

      public boolean hasEnd()
      Checks if the interval has an end boundary.
    • hasName

      public boolean hasName()
      Checks if the interval has a name.
    • toString

      public String toString()
      Overrides:
      toString in class Object