commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prick...@apache.org
Subject cvs commit: jakarta-commons-sandbox/periodicity/src/xml periodicity-schema.xml
Date Thu, 28 Feb 2002 04:57:18 GMT
prickett    02/02/27 20:57:18

  Modified:    periodicity/src/xml periodicity-schema.xml
  Added:       periodicity/src/java/org/apache/commons/periodicity/vobjects
                        EventDoJrl.java EventToDo.java EvtDoJrlFB.java
                        NoAlarm.java TopParent.java VEvent.java VToDo.java
  Removed:     periodicity/src/java/org/apache/commons/periodicity/vobjects/entity
                        EventDoJrlImpl.java EventToDoImpl.java
                        EvtDoJrlFBImpl.java NoAlarmImpl.java
                        TopParentImpl.java VEventBean.java VToDoBean.java
  Log:
  Fixed the torque database xml schema file to correctly specify the
  id generation method.
  
  Moved the entity bean implementations up one directory because we are
  going to implement a standalone version of the iCalendar objects first.
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/EventDoJrl.java
  
  Index: EventDoJrl.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.util.Set;
  import java.util.Collection;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.util.GregorianCalendar;
  import java.io.Writer;
  import org.apache.commons.periodicity.properties.ClassProp;
  import org.apache.commons.periodicity.properties.Created;
  import org.apache.commons.periodicity.properties.Description;
  import org.apache.commons.periodicity.properties.LastModified;
  import org.apache.commons.periodicity.properties.Sequence;
  import org.apache.commons.periodicity.properties.Status;
  import org.apache.commons.periodicity.properties.Summary;
  import org.apache.commons.periodicity.properties.RecurID;
  import org.apache.commons.periodicity.properties.AttachProp;
  import org.apache.commons.periodicity.properties.interfaces.Contact;
  import org.apache.commons.periodicity.properties.interfaces.Categories;
  import org.apache.commons.periodicity.properties.interfaces.ExceptionDate;
  import org.apache.commons.periodicity.properties.interfaces.ExceptionRecur;
  import org.apache.commons.periodicity.properties.interfaces.RecurProp;
  import org.apache.commons.periodicity.properties.interfaces.RelatedProp;
  import org.apache.commons.periodicity.properties.interfaces.RDate;
  import org.apache.commons.periodicity.util.ICalendarException;
  
  public abstract class EventDoJrl extends EvtDoJrlFB
  {
      /** A variable to hold the classification of the icalendar object */
      private ClassProp classification = null;
  
      /** A variable to hold the date the iCalendar object was created */
      private Created datecreate = null;
  
      /** A variable to hold the description of the iCalendar object */
      private Description desc = null;
  
      /** A variable to hold the time of the last modification to the object */
      private LastModified lastmod = null;
  
      /** A variable to hold the sequence number of this iCalendar object */
      private Sequence seq = null;
  
      /** A variable to hold the status of the iCalendar object */
      private Status stat = null;
  
      /** A variable to hold the summary of the iCalendar object */
      private Summary smry = null;
  
      /** A variable to hold the Recurrence ID of the iCalendar object */
      private RecurID rid = null;
  
      /** A vector to hold all the attachments for this iCalendar object */
      private HashSet attachments = null;
  
      /** A vector to hold all the categories for this iCalendar object */
      private HashSet categories = null;
  
      /** A vector to hold all the exception dates for this iCalendar object */
      private HashSet exdates = null;
  
      /** A vector to hold all the exception rules for this iCalendar object */
      private HashSet exrules = null;
  
      /** A vector to hold all the related to properties that are associated
       * with this iCalendar object
       */
      private HashSet relatedtos = null;
  
      /** A vector to hold all the recurrence dates that are associated with
       * this iCalendar object
       */
      private HashSet recurdates = null;
  
      /** A vector to hold all the recurrence rules that are associated with
       * this iCalendar object
       */
      private HashSet recurrules = null;
  
      /** A vector to hold all the contacts that are associated with this zkey */
      private HashSet contacts = null;
  
      /**
       * The purpose this method is to return the classification of this
       * iCalendar object
       * @return The classification as a ClassProp object
       */
      public ClassProp getClassificationProp()
      {
          return classification;
      }
  
      /**
       * The purpose of this method is to return the classification of this
       * iCalendar object
       * @return The classification as a string
       */
      public String getClassification()
      {
          if(classification != null)
          {
              return classification.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the classification of this 
       * iCalendar object
       * @param newval The new value of the classification as a ClassProp
       *        object
       */
      public void setClassification(ClassProp newval)
      {
          classification = newval;
      }
  
      /**
       * The purpose of this method is to check to see if this is a public
       * iCalendar object.
       * @return A boolean value that tells whether the iCalendar object has
       *         a public classification
       */
      public boolean isPublic()
      {
          if(classification != null)
          {
              return classification.isPublic();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if this is a private
       * iCalendar object.
       * @return A boolean value that tells whether the iCalendar object has
       *         a private classification.
       */
      public boolean isPrivate()
      {
          if(classification != null)
          {
              return classification.isPrivate();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if this is a 
       * confidential iCalendar object.
       * @return A boolean value that tells whether the iCalendar object has
       *         a confidential classification.
       */
      public boolean isConfidential()
      {
          if(classification != null)
          {
              return classification.isConfidential();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to return the date that the iCalendar
       * object was created.
       * @return The date that the iCalendar object was created as a 
       *          Created object.
       */
      public Created getCreationDateProp()
      {
          return datecreate;
      }
  
      /**
       * The purpose of this method is to return the date that the iCalendar
       * object was created.
       * @return The date that the iCalendar object was created as a VDateTime
       *         object.
       */
      public GregorianCalendar getCreationDate()
      {
          if(datecreate != null)
          {
              return datecreate.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the creation date of the iCalendar
       * object.
       * @param newval The new value for the creation date as a Created object
       */
      public void setCreationDate(Created newval)
      {
          datecreate = newval;
      }
  
      /**
       * The purpose of this method is to return the description of this
       * iCalendar object.
       * @return The description of the iCalendar object as a Description
       *         object.
       */
      public Description getDescProp()
      {
          return desc;
      }
  
      /**
       * The purpose of this method is to return the description of this 
       * iCalendar object.
       * @return The description of the iCalendar object as a string
       */
      public String getDesc()
      {
          if(desc != null)
          {
              return desc.getValue();
          }
          else
          {
              return null;
          }
      }    
  
      /**
       * The purpose of this method is to set the description of this 
       * iCalendar object.
       * @param newval The new value for the description as a Description
       *        object.
       */
      public void setDescProp(Description newval)
      {
          desc = newval;
      }
  
      /**
       * The purpose of this method is to get the date of the Last Modification
       * of the iCalendar object.
       * @return The date of the last modification as a LastModified object
       */
      public LastModified getLastModProp()
      {
          return lastmod;
      }
      
      /**
       * The purpose of this method is to get the date of the Last Modification
       * of the iCalendar object.
       * @return The date of the last modification as a VDateTime object
       */
      public GregorianCalendar getLastModDate()
      {
          if(lastmod != null)
          {
              return lastmod.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the date of the last modification
       * of the iCalendar object.
       * @param newval The new value of the last modification date as a 
       *        LastModified object.
       */
      public void setLastModProp(LastModified newval)
      {
          lastmod = newval;
      }
  
      /**
       * The purpose of this method is to return the sequence number of this
       * iCalendar object as a Sequence object.
       * @return The sequence number as a Sequence object
       */
      public Sequence getSequenceProp()
      {
          return seq;
      }
  
      /**
       * The purpose of this method is to return the sequence number of this
       * iCalendar object as an integer.
       * @return The sequence number as an integer. This method returns a 
       *         -1 if no sequence is specified.
       */
      public int getSequence()
      {
          if(seq != null)
          {
              return seq.getValue();
          }
          else
          {
              return -1;
          }
      }    
  
      /**
       * The purpose of this method is to set the sequence number of this 
       * iCalendar object.
       * @param newval The new value for the sequence number as a Sequence
       *        object.
       */
      public void setSequenceProp(Sequence newval)
      {
          seq = newval;
      }
  
      /**
       * The purpose of this method is to return the status of this iCalendar
       * object.
       * @return The status of the iCalendar object as a Status object.
       */
      public Status getStatusProp()
      {
          return stat;
      }
  
      /**
       * The purpose of this method is to return the status of this iCalendar
       * object.
       * @return The status of the iCalendar object as a string
       */
      public String getStatus()
      {
          if(stat != null)
          {
              return stat.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the status of the iCalendar
       * object.
       * @param newval The new value for the status of the iCalendar object
       *        as a Status object.
       */
      public void setStatusProp(Status newval) throws ICalendarException
      {
          stat = newval;
      }
  
      /**
       * The purpose of this method is to check to see if the status of 
       * this iCalendar object is a cancelled status.
       * @return A boolean value telling whether or not the iCalendar object
       *         has a cancelled status
       */
      public boolean isCancelled()
      { 
          if(stat != null)
          {
              return stat.isCancelled();
          }
          else
          {
              return false;
          }
      }
      
      /**
       * The purpose of this method is to return the summary of this iCalendar
       * object.
       * @return The summary of the iCalendar object as a Summary object
       */
      public Summary getSummaryProp()
      {
          return smry;
      }
  
      /**
       * The purpose of this method is to return the summary of this iCalendar
       * object.
       * @return The summary of the iCalendar object as a string.
       */
      public String getSummary()
      {
          if(smry != null)
          {
              return smry.getValue();
          }
          else
          {
              return null;
          }    
      }
  
      /**
       * The purpose of this method is to set the summary of this iCalendar
       * object.
       * @param newval The new value for the summary of the iCalendar object
       *        as a Summary object.
       */
      public void setSummaryProp(Summary newval)
      {
          smry = newval;
      }
  
      /**
       * The purpose of this method is to return the recurrence id of the 
       * iCalendar object.
       * @return The recurrence id of icalendar object as a RecurID object.
       */
      public RecurID getRecurID()
      {
          return rid;
      }
  
      /**
       * The purpose of this method is to set the recurrence id of the
       * iCalendar object.
       * @param newval The new value of the recurrence id as a RecurID object
       */
      public void setRecurID(RecurID newval)
      {
          rid = newval;
      }
  
      /**
       * The purpose of this method is to return the contacts that are 
       * associated with this iCalendar object.
       * @return The contacts that are associated with this objects as
       *         an enumeration.
       */
      public Set getContacts()
      {
          return contacts;
      }    
  
      public void setContacts(Collection newvals) 
      {
          contacts = null;    
          if(newvals != null)
          {
              addContacts(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add a contact to this iCalendar 
       * object.
       * @param newval The new value to be added to the iCalendar object.
       */
      public void addContact(Contact newval)
      {
          if(newval != null)
          {
              if(contacts == null)
              {
                  contacts = new HashSet();
              }
              contacts.add(newval);
          }    
      }    
  
      /**
       * The purpose of this method is to add a contatct to this iCalendar
       * object.
       * @param newvals The new value to be added to the iCalendar object.
       */
      public void addContacts(Collection newvals)
      {
          if(newvals != null)
          {
              if(contacts == null)
              {
                  contacts = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object contact = iter.next();
                      if(contact instanceof Contact && 
                             !contacts.contains(contact))
                      {
                          contacts.add(contact);
                      }
                  }
              }
          }    
      }    
      
      /**
       * The purpose of this method is to remove a contact from the iCalendar
       * object.
       * @param oldval The old value that needs to be removed.
       */
      public void removeContact(Contact oldval)
      {
          if(contacts != null && oldval != null)
          {
              contacts.remove(oldval);        
          }
      }
  
      public void removeContacts(Collection oldvals)
      {
          if(contacts != null && oldvals != null)
          {
              contacts.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear the contact list.
       */
      public void clearContacts()
      {
          contacts = null;
      }    
  
      /**
       * The purpose of this method is to return all the attachements that
       * are associated with this iCalendar object.
       * @return An enumeration ful of AttachProp objects which describe
       *         all the attachments that are associated with this iCalendar
       *         object.
       */
      public Set getAttachments()
      {
          return (Set) attachments.clone();
      }
  
      public void setAttachements(Collection newvals)
      {
          attachments = null;
          if(newvals != null)
          {
              addAttachments(newvals);
          }
      }    
      
      /**
       * The purpose of this method is to add
       * an attachment to the iCalendar
       * object.
       * @param newval The new attachment to be added to the iCalendar object
       *        as an AttachProp object.
       */
      public void addAttachment(AttachProp newval)
      {
          if(newval != null)
          {
              if(attachments == null)
              {
                  attachments = new HashSet();
              }
              if(!attachments.contains(newval))
              {
                  attachments.add(newval);
              }    
          }    
      }    
  
      public void addAttachments(Collection newvals)
      {
          if(newvals != null)
          {
              if(attachments == null)
              {
                  attachments = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object attach = iter.next();
                      if(attach instanceof AttachProp && 
                             !attachments.contains(attach))
                      {
                          attachments.add(attach);
                      }
                  }
              }
          }    
      }    
  
      /**
       * The purpose of this method is to remove an attachment from the iCalendar
       * object.
       * @param oldval The old attachment to be removed from the iCalendar
       *        object.
       */
      public void removeAttachment(AttachProp oldval)
      {
          if(attachments != null && oldval != null)
          {
              attachments.remove(oldval);
          }    
      }
  
      public void removeAttachments(Collection oldvals)
      {
          if(attachments != null && oldvals != null)
          {
              attachments.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all the attachments from this
       * iCalendar object
       */
      public void clearAttachments()
      {
          attachments = null;
      }
  
      /**
       * The purpose of this method is to get the categories that are associated
       * with this iCalendar object.
       * @returns An enumeration full of Categories objects.
       */
      public Set getCategories()
      {
          return (Set) categories.clone();
      }
  
      public void setCategories(Collection newvals)
      {
          categories = null;
          if(newvals != null)
          {
              addCategories(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add a set of categories to the
       * list of categories that are associated with this icalendar object
       * @param newval The set of categories to add to this iCalendar object
       *        as a categories object.
       */
      public void addCategories(Categories newval) throws ICalendarException
      {
          if(newval != null)
          {
              if(categories == null)
              {
                  categories = new HashSet();
              }
              if(!categories.contains(newval))
              {
                  categories.add(newval);
              }
          }
      }
  
      /**
       * The purpose of this method is to add an array of categories to this
       * iCalendar object.
       * @param newval The new values to be added to this iCalendar object as
       *        an array.
       */
      public void addCategories(Collection newvals)
      {
          if(newvals != null)
          {
              if(categories == null)
              {
                  categories = new HashSet();
              }
              Iterator iter = categories.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object category = iter.next();
                      if(category instanceof Categories &&
                             !categories.contains(category))
                      {
                          categories.add(category);
                      }
                  }
              }    
          }    
      }    
  
      /**
       * The purpose of this method is to remove a set of categories from 
       * the list of categories that are associated with this iCalendar object
       * @param oldval The old set of categories that needs to be removed
       *        from this iCalendar object.
       */
      public void removeCategories(Categories oldval)
      {
          if(categories != null && oldval != null)
          {
              categories.remove(oldval);
          }
      }
  
      public void removeCategories(Collection oldvals)
      {
          if(categories != null && oldvals != null)
          {
              categories.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all categories from this 
       * iCalendar object.
       */
      public void clearCategories()
      {
          categories = null;
      }
  
      /**
       * The purpose of this method is to return the exception dates that
       * are associated with this iCalendar object.
       * @return An enumeration full of ExceptionDate objects.
       */
      public Set getExceptionDates()
      {
          return (Set) exdates.clone();
      }
  
      public void setExceptionDates(Collection newvals) throws ICalendarException
      {
          exdates = null;
          if(newvals != null)
          {
              addExceptionDates(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add an exception date to this
       * iCalendar object.
       * @param newval The new exception date to be added as an ExceptionDate
       *        object.
       */
      public void addExceptionDate(ExceptionDate newval) 
             throws ICalendarException
      {
          if(newval != null)
          {
              if(exdates == null)
              {
                  exdates = new HashSet();
              }
              if(!exdates.contains(newval))
              {
                  exdates.add(newval);
              }
          }    
      }
  
      /**
       * The purpose of this method is to add all the exception dates in the
       * given array to this iCalendar object.
       * @param newvals the new values to be added to this iCalendar object.
       */
      public void addExceptionDates(Collection newvals) throws
             ICalendarException
      {
          if(newvals != null)
          {
              if(exdates == null)
              {
                  exdates = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object exdate = iter.next();
                      if(exdate instanceof ExceptionDate &&
                             !exdates.contains(exdate))
                      {
                          exdates.add(exdate);
                      }
                  }
              }
          }    
      }    
  
      /**
       * The purpose of this method is to remove an exception date from this
       * iCalendar object.
       * @param oldval The old value for the exception date as an
       *        ExceptionDate object.
       */
      public void removeExceptionDate(ExceptionDate oldval)
      {
          if(exdates != null && oldval != null)
          {
              exdates.remove(oldval);
          }
      }    
  
      public void removeExceptionDate(Collection oldvals)
      {
          if(exdates != null && oldvals != null)
          {
              exdates.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear the exception dates that are
       * associated with this iCalendar object.
       */
      public void clearExceptionDates()
      {
          exdates = null;
      }
  
      /**
       * The purpose of this method is to get the exception rules that are
       * associated with this iCalendar object.
       * @return An enumeration full of ExceptionRecur objects
       */
      public Set getExceptionRules()
      {
          return (Set) exrules.clone();
      }
  
      public void setExceptionRules(Collection newvals)
      {
          exrules = null;
          if(newvals != null)
          {
              addExceptionRules(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add an exception rule to the 
       * iCalendar object.
       * @param newval The new value to be added to the set of exception rules
       *        as an ExceptionRecur object
       */
      public void addExceptionRule(ExceptionRecur newval)
      {
          if(newval != null)
          {
              if(exrules == null)
              {
                  exrules = new HashSet();
              }
              if(!exrules.contains(newval))
              {
                  exrules.add(newval);
              }
          }    
      }
  
      /**
       * The purpose of this method is to add all the exception rules in an 
       * array to the iCalendar object.
       * @param newvals The new values to be added to this iCalendar object
       */
      public void addExceptionRules(Collection newvals)
      {
          if(newvals != null)
          {
              if(exrules == null)
              {
                  exrules = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {    
                  while(iter.hasNext())
                  {
                      Object rule = iter.next();
                      if(rule instanceof ExceptionRecur &&
                             !exrules.contains(rule))
                      {
                          exrules.add(rule);
                      }
                  }
              }    
          }
      }    
  
      /**
       * The purpose of this method is to remove an exception rule from the
       * iCalendar object.
       * @param oldval The old value that needs to be removed from the iCalendar
       *        object.
       */
      public void removeExceptionRule(ExceptionRecur oldval) 
      {
          if(exrules != null && oldval != null)
          {
              exrules.remove(oldval);
          }
      }    
  
      public void removeExceptionRules(Collection oldvals)
      {
          if(exrules != null && oldvals != null)
          {
              exrules.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear the exception rules from this 
       * iCalendar object.
       */
      public void clearExceptionRules()
      {
          exrules = null;
      }
  
      /**
       * The purpose of this method is to get the RelatedTo objects that are
       * associated with this iCalendar object.
       * @return An enumeration full RelatedProp objects that are associated 
       *         with this iCalendar object.
       */
      public Set getRelatedToProps() throws Exception
      {
          return (Set) relatedtos.clone();
      }
  
      public void setRelatedToProps(Collection newvals)
      {
          relatedtos = null;
          if(newvals != null)
          {
              addRelatedTos(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add a new related to object to
       * this iCalendar object.
       * @param newval The new value to be added to the iCalendar object
       *        as a RelatedProp.
       */
      public void addRelatedTo(RelatedProp newval) throws ICalendarException
      {
          if(newval != null)
          {
              if(relatedtos == null)
              {
                  relatedtos = new HashSet();
              }
              if(!relatedtos.contains(newval))
              {
                  relatedtos.add(newval);
              }    
          }    
      }
  
      /**
       * The purpose of this method is to add a new related to object to 
       * this iCalendar object.
       * @param newvals The new values to be added to the iCalendar object
       *        as an array of RelatedProps.
       */
      public void addRelatedTos(Collection newvals)
      {
          if(newvals != null)
          {
              if(relatedtos == null)
              {
                  relatedtos = new HashSet();
              }
              Iterator iter = relatedtos.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object related = iter.next();
                      if(related instanceof RelatedProp &&
                             !relatedtos.contains(related))
                      {
                          relatedtos.add(related);
                      }
                  }
              }    
          }
      }    
  
      /**
       * The purpose of this method is to remove a related to object from the
       * iCalendar object.
       * @param oldval The old value to be removed from the iCalendar object.
       */
      public void removeRelatedTo(RelatedProp oldval) 
      {
          if(relatedtos != null && oldval != null)
          {
              relatedtos.remove(oldval);
          }
      }
  
      public void removeRelatedTos(Collection oldvals)
      {
          if(relatedtos != null && oldvals != null)
          {
              relatedtos.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all the related to objects
       * from this iCalendar object.
       */
      public void clearRelatedTo()
      {
          relatedtos = null;
      }
  
      /**
       * The purpose of this method is to return all the Recurrence dates
       * that are associated with this iCalendar object.
       * @return An enumeration full of RecurProp objects.
       */
      public Set getRecurrenceDates()
      {
          return (Set) recurdates.clone();
      }
  
      public void setRecurrenceDates(Collection newvals)
      {
          recurdates = null;
          if(newvals != null)
          {
              addRecurrenceDates(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add a recurrence date to the iCalendar
       * object.
       * @param newval The new value to add as a RDate object.
       */
      public void addRecurrenceDate(RDate newval)
      {
          if(newval != null)
          {
              if(recurdates == null)
              {
                  recurdates = new HashSet();
              }
              if(!recurdates.contains(newval))
              {
                  recurdates.add(newval);
              }
          }    
      }    
  
      /**
       * The purpose of this method is to add all the recurrence rules in the
       * given array to the iCalendar object.
       * @param newvals The new values that are to be added.
       */
      public void addRecurrenceDates(Collection newvals)
      {
          if(newvals != null)
          {
              if(recurdates == null)
              {
                  recurdates = new HashSet();
              }
              Iterator iter = recurdates.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object date = iter.next();
                      if(date instanceof RDate &&
                             !recurdates.contains(date))
                      {
                          recurdates.add(date);
                      }
                  }
              }   
          }
      }    
                     
      /**
       * The purpose of this method is to remove a recurrence date from the
       * iCalendar object.
       * @param oldval The old value that needs to be removed.
       */
      public void removeRecurrenceDate(RDate oldval)
      {
          if(recurdates != null && oldval != null)
          {
              recurdates.remove(oldval);
          }
      }    
  
      public void removeRecurrenceDates(Collection oldvals)
      {
          if(recurdates != null && oldvals != null)
          {
              recurdates.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all recurrence dates from this
       * iCalendar object.
       */
      public void clearRecurrenceDates()
      {
          recurdates = null;
      } 
  
      /**
       * The purpose of this method is to return all the recurrence rules 
       * that are associated with this iCalendar object.
       * @return An enumeration full of RecurProp objects
       */
      public Set getRecurrenceRules()
      {
          return (Set) recurdates.clone();
      }
  
      public void setRecurrenceRules(Collection newvals) 
             throws ICalendarException
      {
          recurrules = null;
          if(newvals != null)
          {
              addRecurrenceRules(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add a recurrence rule to the
       * iCalendar object
       * @param newval The new value of the recurrence rule to add to 
       *        to the iCalendar object as a RecurProp object.
       */
      public void addRecurrenceRule(RecurProp newval) throws ICalendarException
      {
          if(newval != null)
          {
              if(recurrules == null)
              {
                  recurrules = new HashSet();
              }
              if(!recurrules.contains(newval))
              {
                  recurrules.add(newval);
              }
          }    
      }    
  
      /**
       * The purpose of this method is to add all the recurrence rules in the
       * given array to the current iCalendar object.
       * @param newvals The new values to be added to the iCalendar object.
       */
      public void addRecurrenceRules(Collection newvals)
             throws ICalendarException
      {
          if(newvals != null)
          {
              if(recurrules == null)
              {
                  recurrules = new HashSet();
              }
              Iterator iter = recurrules.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object rule = iter.next();
                      if(rule instanceof RecurProp &&
                             !recurrules.contains(rule))
                      {
                          recurrules.add(rule);
                      }
                  }
              }    
          }
      }    
       
      /**
       * The purpose of this method is to remove a recurrence rule from 
       * the iCalendar object.
       * @param oldval The old value to remove from the iCalendar object
       */
      public void removeRecurrenceRule(RecurProp oldval)
      {
          if(recurrules != null && oldval != null)
          {
              recurrules.remove(oldval);
          }
      }
  
      public void removeRecurrenceRules(Collection oldvals)
      {
          if(recurrules != null && oldvals != null)
          {
              recurrules.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all the recurrence rules from
       * this iCalendar object.
       */
      public void clearRecurrenceRules()
      {
          recurrules = null;
      }
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We need to uncomment this code when we want to write valid 
           *  icalendar
          if(wrt != null)
          {
              super.toICal(wrt);
              ICalUtils.toICal(wrt, getCategories());
              ICalUtils.toICal(wrt, 
                     (ICalLineItem) getClassificationProp());
              ICalUtils.toICal(wrt, getContacts());
              ICalUtils.toICal(wrt,
                     (ICalLineItem) getCreationDateProp());
              ICalUtils.toICal(wrt,
                     (ICalLineItem) getDescProp());
              ICalUtils.toICal(wrt, getExceptionDates());
              ICalUtils.toICal(wrt, getExceptionRules());
              ICalUtils.toICal(wrt, (ICalLineItem) getLastModProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getRecurID());
              ICalUtils.toICal(wrt, getRecurrenceDates());
              ICalUtils.toICal(wrt, getRecurrenceRules());
              ICalUtils.toICal(wrt, getRelatedToProps());
              ICalUtils.toICal(wrt, (ICalLineItem) getSequenceProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getStatusProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getSummaryProp());
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }    
          */
      }    
  }     
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/EventToDo.java
  
  Index: EventToDo.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.util.Collection;
  import java.util.Set;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.io.Writer;
  import org.apache.commons.periodicity.types.VDuration;
  import org.apache.commons.periodicity.properties.GeoProp;
  import org.apache.commons.periodicity.properties.Location;
  import org.apache.commons.periodicity.properties.Priority;
  import org.apache.commons.periodicity.properties.DurationProp;
  import org.apache.commons.periodicity.properties.interfaces.Resources;
  import org.apache.commons.periodicity.util.ICalendarException;
  
  public abstract class EventToDo extends EventDoJrl
  {
      /** A variable to hold the Geographic position of the iCalendar object */
      private GeoProp geo = null;
  
      /** A variable to hold the Location of the iCalendar object */
      private Location locate = null;
  
      /** A variable to hold the Priority of the iCalendar object */
      private Priority prior = null;
  
      /** A variable to hold the Duration of the iCalendar object */
      private DurationProp dur = null;
  
      /** A vector to hold the resources that are associated with this object */
      private HashSet resources = null;
  
      protected EventToDo(){}
  
      /**
       * The purpose of this method is to return the geographic position property
       * of this iCalendar object.
       * @return The geographic position as a GeoProp object
       */
      public GeoProp getGeoProp()
      {
          return geo;
      }
  
      /**
       * The purpose of this method is to set the geographic position of this
       * iCalendar object.
       * @param newval The new value for the geographic position as a GeoProp
       *        object
       */
      public void setGeoProp(GeoProp newval)
      {
          geo = newval;
      }
  
      /**
       * The purpose of this method is to get the Location of this iCalendar
       * object.
       * @return The location of the iCalendar object as a Location object
       */
      public Location getLocationProp()
      {
          return locate;
      }
  
      /**
       * The purpose of this method is to get the Location of this iCalendar
       * object.
       * @return The location of the iCalendar object as a string.
       */
      public String getLocation()
      {
          if(locate != null)
          {
              return locate.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the Location of this iCalendar
       * object.
       * @param newval The new value for the Location as a Location object
       */
      public void setLocationProp(Location newval)
      {
          locate = newval;
      }
  
      /**
       * The purpose of this method is to return the priority of this iCalendar
       * object.
       * @return The priority of this iCalendar object as a Priority object
       */
      public Priority getPriorityProp()
      {
          return prior;
      }
  
      /**
       * The purpose of this method is to return the priority of this iCalendar
       * object.
       * @return The priority of the iCalendar object as an integer.
       */
      public int getPriority()
      {
          if(prior != null)
          {
              return prior.getValue();
          }
          else
          {
              return -1;
          }
      }
  
      /**
       * The purpose of this method is to set the priority of this iCalendar
       * object.
       * @param newval The new value for the priority property as a Priority 
       *               object.
       */
      public void setPriorityProp(Priority newval)
      {
          prior = newval;
      }
  
      /**
       * The purpose of this method is to return the duration of this iCalendar
       * object.
       * @return The duration of this iCalendar object as a DurationProp.
       */
      public DurationProp getDurationProp()
      {
          return dur;
      }
  
      /**
       * The purpose of this method is to return the duration of this iCalendar
       * object.
       * @return The duration of this iCalendar object as a VDuration object
       */
      public VDuration getDuration()
      {
          if(dur != null)
          {
              return dur.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the duration of this iCalendar
       * object.
       * @param newval The new value for the duration as a DurationProp object
       */
      public void setDurationProp(DurationProp newval)
      {
          dur = newval;
      }    
  
      /**
       * The purpose of this method is to return all the resource properties
       * associated with this iCalendar object
       * @return An enumeration full of Resources objects.
       */
      public Set getResources()
      {
          return (Set) resources.clone();
      }
  
      /**
       * The purpose of this method is to add a set of Resources to this 
       * iCalendar object.
       * @param newval A set of resources as a Resources object
       */
      public void addResources(Resources newval) throws ICalendarException
      {
          if(newval != null)
          {
              if(resources == null)
              {
                  resources = new HashSet();
              }
              if(!resources.contains(newval))
              {
                  resources.add(newval);
              }
          }    
      }
  
      /**
       * The purpose of this method is to add multiple sets of resources to the 
       * iCalendar object.
       * @param newvals An array full of Resources.
       */
      public void addResources(Collection newvals)
      {
          if(newvals != null)
          {
              if(resources != null)
              {
                  resources = new HashSet();
              }
              Iterator iter = resources.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object resource = iter.next();
                      if(resource instanceof Resources &&
                             !resources.contains(resource))
                      {
                          resources.add(resource);
                      }
                  }
              }    
          }
      }    
  
      /**
       * The purpose of this method is to remove a set of resources from this
       * iCalendar object.
       * @param oldval The old value to be removed as a Resources object
       */
      public void removeResources(Resources oldval)
      {
          if(resources != null && oldval != null)
          {
              resources.remove(oldval);
          }
      }
  
      public void removeResources(Collection oldvals)
      {
          if(resources != null && oldvals != null)
          {
              resources.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to clear all the resources from this
       * iCalendar object
       */
      public void clearResources()
      {
          resources = null;
      }
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We need to fix this when we go to write valid iCalendar
          if(wrt != null)
          {
              super.toICal(wrt);
              ICalUtils.toICal(wrt, (ICalLineItem) getDurationProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getGeoProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getLocationProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getPriorityProp());
              ICalUtils.toICal(wrt, getResources());
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }
          */
      }    
  }    
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/EvtDoJrlFB.java
  
  Index: EvtDoJrlFB.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.util.Set;
  import java.util.Collection;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.util.GregorianCalendar;
  import java.io.Writer;
  import org.apache.commons.periodicity.properties.ClassProp;
  import org.apache.commons.periodicity.properties.Created;
  import org.apache.commons.periodicity.properties.Description;
  import org.apache.commons.periodicity.properties.LastModified;
  import org.apache.commons.periodicity.properties.Sequence;
  import org.apache.commons.periodicity.properties.Status;
  import org.apache.commons.periodicity.properties.Summary;
  import org.apache.commons.periodicity.properties.RecurID;
  import org.apache.commons.periodicity.properties.URLProp;
  import org.apache.commons.periodicity.properties.UID;
  import org.apache.commons.periodicity.properties.DTStamp;
  import org.apache.commons.periodicity.properties.Organizer;
  import org.apache.commons.periodicity.properties.interfaces.Attendee;
  import org.apache.commons.periodicity.properties.interfaces.Contact;
  import org.apache.commons.periodicity.properties.interfaces.Categories;
  import org.apache.commons.periodicity.properties.interfaces.ExceptionDate;
  import org.apache.commons.periodicity.properties.interfaces.ExceptionRecur;
  import org.apache.commons.periodicity.properties.interfaces.RelatedProp;
  import org.apache.commons.periodicity.properties.interfaces.RDate;
  import org.apache.commons.periodicity.properties.interfaces.RecurProp;
  import org.apache.commons.periodicity.properties.interfaces.RequestStatus;
  import org.apache.commons.periodicity.util.ICalendarException;
  
  public abstract class EvtDoJrlFB extends NoAlarm
  {
      /** A variable to hold the Organizer of this iCalendar object */
      private Organizer org = null;
  
      /** A variable to hold the date time stamp of this iCalendar object */
      private DTStamp stamper = null;
  
      /** A variable to hold the UID of this iCalendar object */
      private UID uid = null;
  
      /** A variable to hold the URL of this iCalendar object */
      private URLProp url = null;
  
      /** A vector to hold all the attendees that are associated with this 
       * iCalendar object.
       */
      private HashSet attendees = null;
  
      /** A vector to hold all the request statuses that are associated with
       * this iCalendar object.
       */
      private HashSet reqstats = null; 
  
      protected EvtDoJrlFB(){}
  
      /**
       * The purpose of this method is to return the organizer of this iCalendar
       * object.
       * @return The organizer as an Organizer object
       */
      public Organizer getOrganizerProp()
      {
          return org;
      }
  
      /**
       * The purpose of this method is to return the organizer of this iCalendar
       * object.
       * @return The organizer as a string
       */
      public String getOrganizer()
      {
          if(org != null)
          {
              return org.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the Organizer  of this iCalendar
       * object.
       * @param newval The new value of the organizer as an Organizer object
       */
      public void setOrganizerProp(Organizer newval)
      {
          org = newval;
      }
  
      /**
       * The purpose of this method is to get the Date-Time stamp property.
       * @return The Date-Time stamp property as a DTStamp object.
       */
      public DTStamp getTimeStampProp()
      {
          return stamper;
      }
  
      /**
       * The purpose of this method is to get the Date-Time stamp property.
       * @return The Date-Time stamp as a VDateTime
       */
      public GregorianCalendar getTimeStamp()
      {
          if(stamper != null)
          {
              return stamper.getValue();
          }
          else
          {
              return null;
          }
      }    
  
      /**
       * The purpose of this method is to set the date-time stamp to a new value
       * @param newval The new value for the date-time stamp as a DTStamp 
       *        property
       */
      public void setTimeStampProp(DTStamp newval)
      {
          stamper = newval;
      }
  
      /**
       * The purpose of this method is to get Unique Identifier of this 
       * iCalendar object.
       * @return The Unique identifier as a UID object
       */
      public UID getUIDProp()
      {
          return uid;
      }
  
      /**
       * The purpose of this method is to get the Unique Identifier of this
       * iCalendar object.
       * @return The Unique Identifier as a string
       */
      public String getUID()
      {
          if(uid != null)
          {
              return uid.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the Unique Identifier of this
       * iCalendar object.
       * @param newval The new value for the unique identifier as a UID object.
       */
      public void setUIDProp(UID newval)
      {
          uid = newval;
      }
  
      /**
       * The purpose of this method is to return the url that is associated 
       * with this iCalendar object
       * @return The url as a URLProp object.
       */
      public URLProp getURLProp()
      {
          return url;
      }
  
      /**
       * The purpose of this method is to return the url that is associated
       * with this iCalendar object
       * @return The url as a string
       */
      public String getURL()
      {
          if(url != null)
          {
              return url.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the url that is associated with
       * this iCalendar object
       * @param newval The new value of the url as a URLProp object
       */
      public void setURLProp(URLProp newval)
      {
          url = newval;
      }
  
      /**
       * The purpose of this method is to return the attendees that are 
       * associated with this iCalendar object.
       * @return An enumeration full of Attendee objects
       */
      public Set getAttendees()
      {
          return (Set) attendees.clone();
      }
  
      public void setAttendees(Collection newvals)
      {
          attendees = null;
          if(newvals != null)
          {
              addAttendees(newvals);
          }    
      }    
  
      /**
       * The purpose of this method is to add an attendee to this iCalendar
       * object
       * @param newval The new value to be added to the Attendee list as 
       *        an Attendee object.
       */
      public void addAttendee(Attendee newval)
      {
          if(newval != null)
          {
              if(attendees == null)
              {
                  attendees = new HashSet();
              }
              attendees.add(newval);
          }
      }    
  
      /**
       * The purpose of this method is add attendees from an array to this
       * iCalendar object.
       * @param newvals The new values to be added in an array.
       */
      public void addAttendees(Collection newvals)
      {
          if(newvals != null)
          {
              if(attendees == null)
              {
                  attendees = new HashSet();
              }    
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object attendee = iter.next();
                      if(attendee instanceof Attendee)
                      {
                          attendees.add(attendee);
                      }
                  }
              }
          }
      }    
      
      /**
       * The purpose of this method is to remove an attendee from this iCalendar
       * object.
       * @param oldval The old value to be removed from the Attendee list as
       *        an Attendee object.
       */
      public void removeAttendee(Attendee oldval)
      {
          if(attendees != null)
          {
              if(oldval != null)
              {
                  attendees.remove(oldval);
              }
          }    
      }
  
      public void removeAttendees(Collection oldvals)
      {
          if(attendees != null && oldvals != null)
          {
              attendees.removeAll(oldvals);
          }
      }    
      
      /**
       * The purpose of this method is to clear all the Attendees from this 
       * iCalendar object.
       */
      public void clearAttendees()
      {
          attendees = null;
      }
  
      /**
       * The purpose of this method is to return all the request statuses
       * that are associated with this icalendar object.
       * @return An enumeration full of RequestStatus objects
       */
      public Set getRequestStatus()
      {
          return (Set) reqstats.clone();
      }    
  
      public void setRequestStatus(Collection newvals)
      {
          reqstats = null;
          if(newvals != null)
          {
              addRequestStatus(newvals);
          }
      }    
      
      /**
       * The purpose of this method is to add a request status to this iCalendar
       * object
       * @param newval The new value to add to the list of request statuses
       *        as a RequestStatus object.
       */
      public void addRequestStatus(RequestStatus newval)
      {
          if(newval != null)
          {
              if(reqstats == null)
              {
                  reqstats = new HashSet();
              }
              reqstats.add(newval);
          }    
      }    
  
      /**
       * The purpose of this method is to add all the request status in the
       * array to this iCalendar object.
       * @param newvals The new values to be added as an array.
       */
      public void addRequestStatus(Collection newvals)
      {
          if(newvals != null)
          {
              if(reqstats == null)
              {
                  reqstats = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object requestStatus = iter.next();
                      if(requestStatus instanceof RequestStatus)
                      {
                          reqstats.add(requestStatus);
                      }
                  }
              }
          }    
      }    
             
  
      /**
       * The purpose of this method is to remove a request status from this
       * iCalendar object.
       * @param oldval The old value that needs to be removed as a RequestStatus
       *        object
       */
      public void removeRequestStatus(RequestStatus oldval)
      {
          if(reqstats != null && oldval != null)
          {
              reqstats.remove(oldval);        
          }
      }
  
      public void removeRequestStatus(Collection oldvals) 
      {
          if(reqstats != null && oldvals != null)
          {
              reqstats.removeAll(oldvals);
          }
      }    
              
  
      /**
       * The purpose of this method is to clear all the Request Status from
       * the iCalendar object.
       */
      public void clearRequestStatus()
      {
          reqstats = null;
      }
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We need to put this back in the releas when we want to
           * write valid iCalendar
          if(wrt != null)
          {
              super.toICal(wrt);
              ICalUtils.toICal(wrt, getAttendees());
              ICalUtils.toICal(wrt, (ICalLineItem) getOrganizerProp());
              ICalUtils.toICal(wrt, getRequestStatus());
              ICalUtils.toICal(wrt, (ICalLineItem) getTimeStampProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getUIDProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getURLProp());
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }
          */
      }    
  }    
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/NoAlarm.java
  
  Index: NoAlarm.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.util.Set;
  import java.util.Collection;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.io.Writer;
  import org.apache.commons.periodicity.properties.Dtstart;
  import org.apache.commons.periodicity.properties.interfaces.Comment;
  import org.apache.commons.periodicity.util.ICalendarException;
  import org.apache.commons.periodicity.security.CheckPermissions;
  
  public abstract class NoAlarm extends TopParent
  {
      private Dtstart startprop = null;
      private HashSet comments = null;
  
      /**
       * The purpose of this method is to return the dtstart property that is
       * associated with this icalendar object.
       * @return The dtstart property as a Dtstart object.
       */
      public Dtstart getStartProp() throws Exception
      {
          return startprop;
      }
  
      /**
       * The purpose of this method is to set the start property that is 
       * associated with this  icalendar object.
       * @param newval The new start time property as a Dtstart object
       */
      public void setStartProp(Dtstart newval)
      {
          startprop = newval;
      }
  
      /**
       * The purpose of this method is to return all the comments that are
       * associated with this icalendar object.
       * @return An enumeration full of Comment objects
       */
      public Set getComments()
      {
          return (Set) comments.clone();
      }
  
      /**
       * The purpose of this method is to add a comment to the iCalendar object
       * @param newval The new value to be added as a Comment object
       */
      public void addComment(Comment newval)
      {
          if(newval != null)
          {
              if(comments == null)
              {
                  comments = new HashSet();
              }
              if(!comments.contains(newval))
              {
                  comments.add(newval);
              }
          }    
      }
  
      /**
       * The purpose of this method is to add the comments from the given
       * array to this iCalendar object.
       * @param newvals The new Comments to be added as an array.
       */
      public void addComments(Collection newvals)
      {
          if(newvals != null)
          {
              if(comments == null)
              {
                  comments = new HashSet();
              }
              Iterator iter = comments.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object comment = iter.next();
                      if(comment instanceof Comment &&
                             !comments.contains(comment))
                      {
                          comments.add(comment);
                      }
                  }
              }
          }    
      }   
  
      /**
       * The purpose of this method is to remove a comment from the icalendar
       * object.
       * @param oldval The old value to be removed as a Comment object
       */
      public void removeComment(Comment oldval)
      {
          if(comments != null && oldval != null)
          {
              comments.remove(oldval);
          }    
      }
  
      public void removeComments(Collection oldvals)
      {
          if(comments != null && oldvals != null)
          {
              comments.removeAll(oldvals);
          }
      }    
      
      /**
       * The purpose of this method is to clear all the comments from this
       * iCalendar object
       */
      public void clearComments()
      {
          comments = null;
      }
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We uncomment this when we want to write valid ical
          if(wrt != null)
          {
              super.toICal(wrt);
              ICalUtils.toICal(wrt, (ICalLineItem) getStartProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getComments());
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }  
          */
      }
      
  
  }    
      
  
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/TopParent.java
  
  Index: TopParent.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.util.Set;
  import java.util.Collection;
  import java.util.Iterator;
  import java.util.HashSet;
  import javax.ejb.EntityContext;
  import javax.security.auth.login.LoginContext;
  
  public abstract class TopParent extends Object
  {
      
      /** A vector to hold the x-properties that are associated with this 
       *  icalendar object.
       */
      private HashSet xs = null; 
  
      private String owningPrincipalName = null;
  
      private LoginContext loginContext = null;
  
      protected TopParent(){}
  
      public Object clone() throws CloneNotSupportedException
      {
          return super.clone();
      }    
  
      /**
       * The purpose of this method is to get all the x properties that
       * are associated with this icalendar object.
       * @return An enumeration populated with the X Properties of this object
       */
      public Set getXProps()
      {
          if(xs!=null)
          {
              return (Set) xs.clone();
          }
          else
          {
              return null;
          }
      }
  
      public void setXProps(Collection newvals)
      {
          xs = null;
          if(newvals != null)
          {
              addXProps(newvals);
          }
      }    
  
      /**
       * The purpose of this method is to add an x property to this icalendar 
       * object.
       * @param newval The new value to add to the x properties 
       */
      /* FIXME We need to uncomment this when we put the
       * XProp property back in the distribution.
      public void addXProp(XProp newval)
      {
          if(newval != null)
          {
              if(xs == null)
              {
                  xs = new HashSet();
              }
              if(!xs.contains(newval))
              {
                  xs.add(newval);
              }
          }
      }    
      */
  
      public void addXProps(Collection newvals)
      {
          if(newvals != null)
          {
              if(xs == null)
              {
                  xs = new HashSet();
              }
              Iterator iter = newvals.iterator();
              if(iter != null)
              {
                  while(iter.hasNext())
                  {
                      Object xprop = iter.next();
                      /* FIXME We need to uncomment this code when we add 
                       * the XProp to the distribution
                      if(xprop instanceof XProp &&
                             !xs.contains(xprop))
                      {
                          xs.add(xprop);
                      }
                      */
                  }
              }
          }    
      }
  
      /**
       * The purpose of this method is to remove an x property from this 
       * icalendar object.
       * @param oldval The old value to be remvoed from the iCalendar object
       */
      /* FIXME We need to fix this when we put the XProp back in the 
       * distribution.
      public void removeXProp(XProp oldval)
      {
          if(xs != null)
          {
              while(xs.removeElement((Object) oldval)){}
              if(xs.size() == 0)
              {
                  xs = null;
              }    
          }    
      }
      */
  
      public void removeXProps(Collection oldvals)
      {
          if(oldvals != null && xs != null)
          {
              xs.removeAll(oldvals);
          }
      }    
  
      /**
       * The purpose of this method is to remove all x properties from this 
       * iCalendar object.
       */
      public void clearXProps()
      {
          xs = null;
      }
  
      public String getOwningPrincipalName()
      {
          return owningPrincipalName;
      }
  
      public void setOwningPrincipalName(String newval)
      {
          owningPrincipalName = newval;
      }
  
      public LoginContext getLoginContext()
      {
          return loginContext;
      }
  
      public void setLoginContext(LoginContext newval)
      {
          loginContext = newval;
      }    
      
      public void ejbActivate()
      {
      }
  
      public void ejbLoad()
      {
      }
  
      public void ejbPassivate()
      {
      }
  
      public void ejbRemove()
      {
      }
  
      public void ejbStore()
      {
      }
  
      public void setEntityContext(EntityContext ctx)
      {
      }
  
      public void unsetEntityContext()
      {
      }
  }
      
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/VEvent.java
  
  Index: VEvent.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects;
  
  import java.io.Writer;
  import org.apache.commons.periodicity.properties.Transparency;
  import org.apache.commons.periodicity.properties.Dtend;
  import org.apache.commons.periodicity.properties.Status;
  import org.apache.commons.periodicity.util.ICalendarException;
  
  public class VEvent extends EventToDo 
  {
  
      public static final String VEVENT_BEGIN_TOKEN = "BEGIN:VEVENT\r\f";
      public static final String VEVENT_END_TOKEN = "END:VEVENT\r\f";
  
      /** A variable to hold the time transparency of the event */
      private Transparency trans = null;
  
      /** A variable to hold the end time property of the event */
      private Dtend endtime = null;
  
      /**
       * The purpose of this method is to create an empty event object
       */
      public VEvent(){}
  
      /**
       * The purpose of this method is to return the time transparency of this
       * iCalendar object.
       * @return The time transparency as a Transparency object
       */
      public Transparency getTransProp()
      {
          return trans;
      }
  
      /**
       * The purpose of this method is to return the time transparency of this
       * iCalendar object.
       * @return The time transparency as a string
       */
      public String getTransparency()
      {
          if(trans != null)
          {
              return trans.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the time transparency of this
       * iCalendar object.
       * @param newval The new value for the time transparency as a Transparency
       *        object.
       */
      public void setTransProp(Transparency newval)
      {
          trans = newval;
      }
  
      /**
       * The purpose of this method is to check to see if the time transparency
       * of this Event is transparent.
       * @return A boolean value that tells whether or not this event has a 
       *         transparent time transparency.
       */
      public boolean isTransparent()
      {
          if(trans != null)
          {
              return trans.isTransparent();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if the time transparency
       * of this event is opaque.
       * @return A boolean value that tells whether or not this event has a 
       *         opaque time transparency.
       */
      public boolean isOpaque()
      {
          if(trans != null)
          {
              return trans.isOpaque();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to return the end time of this event 
       * as a Dtend object
       * @return The end time as a Dtend object
       */
      public Dtend getEndTimeProp()
      {
          return endtime;
      }    
  
      /**
       * The purpose of this method is to set the end time of this event.
       * @param newval The new value of this end time object as a Dtend object
       */
      public void setEndTimeProp(Dtend newval)
      {
          endtime = newval;
      }
  
      /**
       * The purpose of this method is to set the status of this Event object
       * @param newval The new value for the status of this object as a
       *        Status object.
       */
      public void setStatusProp(Status newval) throws ICalendarException
      {
          if(newval == null)
          {
              super.setStatusProp(newval);
          }
          else
          {
              checkStatus(newval.getValue());
              super.setStatusProp(newval);
          }
      }
  
      /**
       * The purpose of this method is to check to see if status of this
       * iCalendar object is tentative.
       * @return A boolean value that tells whether or not the iCalendar
       *         object has a tentative status.
       */
      public boolean isTentative()
      {
          if(getStatusProp() != null)
          {
              return getStatusProp().isTentative();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if the status of this
       * iCalendar object is confirmed.
       * @return A boolean value that tells whether or not the iCalendar
       *         object has a confirmed status.
       */
      public boolean isConfirmed()
      {
          if(getStatusProp() != null)
          {
              return getStatusProp().isConfirmed();
          }
          else
          {
              return false;
          }
      }
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We need to uncomment this when we want to write valid ical
          if(wrt != null)
          {
              wrt.write(VEVENT_BEGIN_TOKEN);
              super.toICal(wrt);
              ICalUtils.toICal(wrt, (ICalLineItem) getEndTimeProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getTransProp());
              wrt.write(VEVENT_END_TOKEN);
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }
          */
      }    
  
      private void checkStatus(String newval)
      {
          /* FIXME We need to implement this to check for valid status */
      }    
  }     
  
  
  
  1.1                  jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/VToDo.java
  
  Index: VToDo.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.commons.periodicity.vobjects.entity;
  
  import java.io.Writer;
  import java.util.GregorianCalendar;
  import org.apache.commons.periodicity.util.ICalendarException;
  import org.apache.commons.periodicity.properties.Completed;
  import org.apache.commons.periodicity.properties.PercentComplete;
  import org.apache.commons.periodicity.properties.Due;
  import org.apache.commons.periodicity.properties.Status;
  import org.apache.commons.periodicity.io.ICalCompositeItem;
  
  public class VToDo extends EventToDoImpl implements ICalCompositeItem
  {
  
      public static final String VTODO_BEGIN_TOKEN = "BEGIN:VTODO\r\f";
      public static final String VTODO_END_TOKEN = "END:VTODO\r\f";
  
      /** A variable to hold the date-time completed */
      private Completed complete = null;
  
      /** A variable to hold the percent completed */
      private PercentComplete percent = null;
  
      /** A variable to hold the due date */
      private Due duedate = null;
  
      /**
       * The purpose of this method is to create an empty to do object.
       */
      public VToDo(){}
  
      /**
       * The purpose of this method is to get the completed property of the
       * VToDo object.
       * @return The date completed as a Completed object.
       */
      public Completed getCompletedProp()
      {
          return complete;
      }
  
      /**
       * The purpose of this method is to get the completed property as a 
       * date-time object.
       * @return The date completed as a VDateTime object.
       */
      public GregorianCalendar getCompletedDate()
      {
          if(complete != null)
          {
              return complete.getValue();
          }
          else
          {
              return null;
          }
      }
  
      /**
       * The purpose of this method is to set the date completed property
       * of the iCalendar object.
       * @param newval The new value for the date completed property
       */
      public void setCompletedProp(Completed newval)
      {
          complete = newval;
      }
  
      /**
       * The purpose of this method is to get the percentage complete property.
       * @return The percent complete as a PercentComplete object.
       */
      public PercentComplete getPercentProp()
      {
          return percent;
      }
  
      /**
       * The purpose of this method is to get the percent complete property.
       * @return The percent complete as an integer.
       */
      public int getPercentComplete()
      {
          if(percent != null)
          {
              return percent.getValue();
          }
          else
          {
              return -1;
          }
      }    
  
      /**
       * The purpose of this method is to set the percent complete property.
       * @param newval The new value of the percent complete as a 
       *        PercentComplete object.
       */
      public void setPercentProp(PercentComplete newval)
      {
          percent = newval;
      }
  
      /**
       * The purpose of this method is to return the due date of the to do
       * object.
       * @return The due date as a Due object.
       */
      public Due getDueDateProp()
      {
          return duedate;
      }
  
      /**
       * The purpose of this method is to set Due date of the object.
       * @param newval The new value for the due date as a Due object
       */
      public void setDueDateProp(Due newval)
      {
          duedate = newval;
      }
  
      /**
       * The purpose of this method is to set the status of the iCalendar
       * object.
       * @param The new value for the status of the To Do object.
       */
      public void setStatusProp(Status newval) throws ICalendarException
      {
          if(newval == null)
          {
              super.setStatusProp(newval);
          }
          else
          {
              checkStatus(newval.getValue());
              super.setStatusProp(newval);
          }
      }
  
      /**
       * The purpose of this method is to check to see if the status of this
       * iCalendar object is a needs action status.
       * @return A boolean value telling whether or not the iCalendar object
       *         has a needs action status
       */
      public boolean needsAction()
      {
         if(getStatusProp() != null)
          {
              return getStatusProp().needsAction();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if the status of this 
       * iCalendar object is a completed status.
       * @return A boolean value telling whether or not the iCalendar object
       *         has a completed status
       */
      public boolean isCompleted()
      {
          if(getStatusProp() != null)
          {
              return getStatusProp().isCompleted();
          }
          else
          {
              return false;
          }
      }
  
      /**
       * The purpose of this method is to check to see if the status of this
       * iCalendar object is an in-process status.
       * @return A boolean value that tells whether or not this is an
       *         in-process status.
       */
      public boolean inProcess()
      {
          if(getStatusProp() != null)
          {
              return getStatusProp().inProcess();
          }
          else
          {
              return false;
          }
      }    
  
      public void toICal(Writer wrt) throws Exception
      {
          /* FIXME We need to put this back in the release when we
           * want to write valid iCalendar
          if(wrt != null)
          {
              wrt.write(VTODO_BEGIN_TOKEN);
              super.toICal(wrt);
              ICalUtils.toICal(wrt, (ICalLineItem) getCompletedProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getDueDateProp());
              ICalUtils.toICal(wrt, (ICalLineItem) getPercentProp());
              wrt.write(VTODO_END_TOKEN);
          }
          else
          {
              throw new ICalendarException("wrt == null");
          }
          */
      }    
  
      private void checkStatus(String newval)
      {
          /* FIXME We need to implement this to check for all valid statuses
           * that can be associated with a VToDoBean
           */
      }
  }     
  
  
  
  
  1.2       +7 -7      jakarta-commons-sandbox/periodicity/src/xml/periodicity-schema.xml
  
  Index: periodicity-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/xml/periodicity-schema.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- periodicity-schema.xml	24 Feb 2002 04:34:21 -0000	1.1
  +++ periodicity-schema.xml	28 Feb 2002 04:57:18 -0000	1.2
  @@ -2,8 +2,8 @@
   <!DOCTYPE database SYSTEM
    "http://jakarta.apache.org/turbine/dtd/database.dtd">
   
  -<database name="periodicity" defaultIdBroker="idbroker">
  -   <table name="periodicity_vevents" description="Events">
  +<database name="periodicity" defaultIdMethod="idbroker">
  +   <table name="periodicity_vevents" idMethod="idbroker" description="Events">
         <column name="id"
                 required="true"
                 primaryKey="true"
  @@ -17,7 +17,7 @@
                 type="BIGINT"
                 description="Creation date"/>
         <column name="description"
  -              type="TEXT"
  +              type="CLOB"
                 description="Description"/>
         <column name="dtstart_date_time"
                 type="BIGINT"
  @@ -35,7 +35,7 @@
                 type="BIGINT"
                 description="Date of the last modification of the event"/>
         <column name="location"
  -              type="TEXT"
  +              type="CLOB"
                 description="Description"/>
         <column name="organizer"
                 type="VARCHAR"
  @@ -151,7 +151,7 @@
                 type="BIGINT"
                 description="Creation date"/>
         <column name="description"
  -              type="TEXT"
  +              type="CLOB"
                 description="Description"/>
         <column name="dtstart_date_time"
                 type="BIGINT"
  @@ -169,7 +169,7 @@
                 type="BIGINT"
                 description="Date of the last modification of the event"/>
         <column name="location"
  -              type="TEXT"
  +              type="CLOB"
                 description="Description"/>
         <column name="organizer"
                 type="VARCHAR"
  @@ -273,4 +273,4 @@
                 type="BIGINT"
                 description="Date Completed"/>
      </table>
  -</database>   
  +</database>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message