Exemplo n.º 1
0
 /**
  * Reads the attribute from XML.
  *
  * @param reader the reader
  * @throws Exception the exception
  */
 @Override
 public void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception {
   this.id = reader.readAttributeValue(XmlAttributeNames.Id);
   this.name = reader.readAttributeValue(XmlAttributeNames.Name);
   this.bias =
       EwsUtilities.getXSDurationToTimeSpan(reader.readAttributeValue(XmlAttributeNames.Bias));
 }
Exemplo n.º 2
0
  /**
   * Reads response elements from XML.
   *
   * @param reader the reader
   * @throws Exception the exception
   */
  @Override
  protected void readElementsFromXml(EwsServiceXmlReader reader) throws Exception {
    super.readElementsFromXml(reader);

    reader.readServiceObjectsCollectionFromXml(
        XmlElementNames.Folders,
        this,
        false, /* clearPropertyBag */
        null, /* requestedPropertySet */
        false); /* summaryPropertiesOnly */
  }
Exemplo n.º 3
0
  /**
   * Tries to read element from XML.
   *
   * @param reader accepts EwsServiceXmlReader
   * @return True if element was read
   * @throws Exception throws Exception
   */
  @Override
  public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception {

    if (reader.getLocalName().equalsIgnoreCase(XmlElementNames.Offset)) {
      this.offset = EwsUtilities.getXSDurationToTimeSpan(reader.readElementValue());
      return true;
    } else if (reader.getLocalName().equalsIgnoreCase(XmlElementNames.RelativeYearlyRecurrence)) {
      this.recurrence = new TimeChangeRecurrence();
      this.recurrence.loadFromXml(reader, reader.getLocalName());
      return true;
    } else if (reader.getLocalName().equalsIgnoreCase(XmlElementNames.AbsoluteDate)) {
      SimpleDateFormat sdfin = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
      Date tempDate = sdfin.parse(reader.readElementValue());
      this.absoluteDate = tempDate;
      return true;
    } else if (reader.getLocalName().equalsIgnoreCase(XmlElementNames.Time)) {
      SimpleDateFormat sdfin = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
      Date tempDate = sdfin.parse(reader.readElementValue());
      this.time = new Time(tempDate);
      return true;
    } else {
      return false;
    }
  }
Exemplo n.º 4
0
 /**
  * Reads the attribute from XML.
  *
  * @param reader accepts EwsServiceXmlReader
  * @throws Exception throws Exception
  */
 @Override
 public void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception {
   this.timeZoneName = reader.readAttributeValue(XmlAttributeNames.TimeZoneName);
 }